A. -1
B. 1
C. 0
D. Programs do not return a value.
2. What is the only function all C++ programs must contain?
A. start()
B. system()
C. main()
D. program()
3. What punctuation is used to signal the beginning and end of code blocks?
A. { }
B. -> and <-
C. BEGIN and END
D. ( and )
4. What punctuation ends most lines of C++ code?
A. .
B. ;
C. :
D. '
5. Which of the following is a correct comment?
A. */ Comments */
B. ** Comment **
C. /* Comment */
D. { Comment }
6. Which of the following is not a correct variable type?
A. float
B. real
C. int
D. double
7. Which of the following is the correct operator to compare two variables?
A. :=
B. =
C. equal
D. ==
8. Which of the following statement is correct?
A. C++ enables to define functions that take constants as an argument.
B. We cannot change the argument of the function that that are declared as constant.
C. Both A and B.
D. We cannot use the constant while defining the function.
9. How much memory an integer, double, float and character takes to store the value?
A. 4 bytes, 8 bytes, 4 bytes and 1 byte
ANSWER KEY
1. (C) 2. (C) 3. (A) 4. (B) 5. (C) 6. (B) 7. (D) 8. (C) 9. (A) 10. (D)
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.