24. Which of the following is an invalid variable assignment assume all ecesary
ID: 3872357 • Letter: 2
Question
24. Which of the following is an invalid variable assignment assume all ecesary lbrury files have been ineluded)? a. char e = '0'; b, char c "c3". c. long z 3; d. string w 5' e, short z = 3; 25. In a C++ program, two slash marks (//) indicate a. the beginning of a single-line comment b. integer division c. the beginning of a block of code d. e. the beginning of a multiline comment the end of a statement A statement that starts with a octothorpe or hashtag symbol (#) is called a a. library file b. c. header file 26, d. comment e. assignment statement preprocessor directive The central processing unit of a computer consists primarily of: a. b. 27· input and output devices memory and secondary storage C++ code d. e. control unit and arithmetic-logic unit control unit decoder c. 28. What is stored in the variable n by the following C++ statement? int n = (4.0 + 6.1) * 8 + 5 / 2.0; a. 46 b. 83 c. 60.6 d. 46.8 e. 37.85 Exam-1F CMPSC 201 - Fall 2017Explanation / Answer
Please give the thumbs up, if it is helpful for you!!. Let me know if you have any doubts.
24) b => char c= "c3";
Explanation: Character should not be in double quotes.
25) a => the beginning of a single-line comment
Explanation: double slash is used for single line comment
26) b => preprocesor directive
Explanation: All preprocessor directives begin with #
27) d => contol unit and arithmetic-logic unit
Explanation: A typical CPU has a number of components. The first is the arithmetic logic unit (ALU), which performs simple arithmetic and logical operations. Second is the control unit (CU), which manages the various components of the computer.
28) b => 83
Explanation:
int n = (4.0 +6.1) * 8 + 5/ 2.0
=> 10.1*8 + 5/2.0
=> 80.8 + 2.5
=> 83.3
Since n is integer type so it holds 83.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.