MCQ of C/C++ Programming Language – Set 4


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

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

4.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.4  Which of the following is a correct comment for comment in C programs?
a. */ Comments */
b. ** Comment **
c. /* Comment */
d. { Comment }

4.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.

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

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

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

4.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

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

 


 
Click Here for Answers

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




Incoming search terms:

  • cpp mcqs
  • which of the following is the correct operator to compare two variables
  • mcq on files in c
  • mcq based on c
  • which of the following is not a correct variable type
  • what value will return to the operating system upon the successful completion of a program
  • programming in c MCQ set
  • which of the following is not a correct variable type in c
  • multiple choice on files in c
  • mcqs on c code

One Response to “MCQ of C/C++ Programming Language – Set 4”

  1. Tarachand sharma 1 July 2013 at 2:27 PM

    sir i preparation of IAexam 2013
    plz send me most question


Leave a Reply