Computer Programming (C/C++ Programming)

1 Which of the following function that must contain in all C++ programs?
a. start()
b. system()
c. main()
d. program()

2 What punctuation must use to end the code C/C++ expression statement?
a. . (dot)
b. ; (semi-colon)
c. : (colon)
d. ‘ (single quote)

3 What symbol must use to signal the begaining and ending of code blocks or compound statements?
a. { }
b. -> and <-
c. BEGIN and END
d. ( and )

4 Which of the following is a correct comment for comment in C programs?
a. */ Comments */
b. ** Comment **
c. /* Comment */
d. { Comment }

5 What value will return to the operating system upon the successful completion of a program?
a. -1
b. 1
c. 0
d. Programs do not return a value.

6 Which one of the following is the correct operator to compare two variables?
a. :=
b. =
c. equal
d. ==

7 Which one of the following is not a correct variable type in C++ programs?
a. float
b. real
c. int
d. double

8 The directives for the preprocessors begin with
a. Ampersand symbol (&)
b. Two Slashes (//)
c. Number Sign (#)
d. Less than symbol (<)

9 The header file iostream includes
a. The declarations of the basic standard input-output library.
b. The streams of includes and outputs of program effect.
c. Both of these
d. None of these

10 Which one of the following is the boolean operator for logical and?
a. &
b. &&
c. |
d. |&

1-C      2-B      3-A      4-C      5-C      6-D      7-B      8-C      9-A      10-B


Popular posts from this blog

Material Science Quiz (Mechanical Properties of Metals)

Material Science (Corrosion & Degradation of Materials)

Material Science Quiz (Failure)