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 objective question c program
  • c was primarily devoloped as a
  • mcq based on c
  • download c&c multiple choice questions
  • which is not a correct variable type under c/c
  • set 3 4 of McQ of c/ c
  • one word c anc c technical questions
  • MCQ Header files in C contains

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