Adentify the choice that best completes the statement Flash drive Read only memory d. I. Which of the following has a volatil
10. Which of the following is a reserved word in C++? a. continue h Return Int c. d. All of the above 11. The smallest indivi
rules Syntax rules d. None of the above 20. The order-of-precedence rules for arithmetic operations are Semantic rules a. b L Adentify the choice that best completes the statement Flash drive Read only memory d. I. Which of the following has a volatile memory? a. Hard disk h. Random access memory bits. Two byte consist of Two Four d. Sixteen a b. Eight 3. Which of the following translates instructions written in assembly language into machine code? c. Compiler d. Linker Assembler b. Decoder The program written in a high-level language is called a. Binary code b. Source code 4. c. Machine code d. Assembly code 5. Consider the following C++ program. #include using namespace std: int main() cout 10. Which of the following is a reserved word in C++? a. continue h Return Int c. d. All of the above 11. The smallest individual unit of a program written in any language is called a Program Function d. Library b Token 12. Which of the following is a legal identifier? value! a value 1 C. b 1 value value 1 d. 13. For a b0olean variable, which of the following represents a true value? 10 a. c. 1 b. -10 d. All of the above 14. Which of the following is a correct C++ statement? cout (7.8 +static cast (15) / 2) evaluates to c. 15 d. 14.8 15.3 a. b. 14 is equivalent to the 18. Suppose that alpha and beta are int variables. The statement alpha beta++ statement(s) alpha b. alpha – 1 + beta; a. alpha + beta; beta; c. alpha beta= beta + 1; d. beta alpha beta +1; beta; 19. cin and cout are predefined in header file. using namespace std b. c. d. a. 3 rules Syntax rules d. None of the above 20. The order-of-precedence rules for arithmetic operations are Semantic rules a. b Logica1 rules 21. Suppose that a is an int variable, b is a double variable and ch is a char variable and the input is: 12.23 AB Choose the values after the following statement executes cin >> a >> b >> ch a. a 12.23, b- ch-AB b. a 12, b-0.23, ch- AB c. a 12, b-0.23, ch – A d. a 1, b-2.23, ch- A 22. Suppose that ch1 and ch2 are two char variables and the input is Hello! Everyone I am Mike. Choose the values after the following statement executes: cin >> chl cin.ignore (11, ) ; cin >> ch2 ‘Everyone ch1-Hello’, b. ch1- H, ch2- chl ‘H’. chl H, ch2 = E ch2 a. ch2-‘I C d. 23. Which of the following function returns the next character from the input stream but does not remove the character from that stream? a. cin.get () b. cin.putback () c. cin.ignore () d. cin.peek ( 24. Which one of the following is member access operator? a. c. b. . d. ? 25. In C++, which of the following is not true? Blanks are used to separate numbers when data is input b. Blanks can appear within reserved words or identifiers Identifiers can contain digits d. Identifiers must begin with letter or underscore a. c. 26. Suppose that x 1565.683, y = 85.78, and z 123.982. What is the output of the followin statements? cout



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *