C/C++ Programming Language - Set 4

10 Questions | Total Attempts: 5638

SettingsSettingsSettings
Please wait...
C/C++ Programming Language - Set 4

Online MCQ Quiz on C/C++ Programming - Set 4 No. Of Questions:- 10 Time:- 10 Minutes Full Mark:- 100 Pass Mark:- 70 This Quiz is for those user who wants to test their knowledge/skill in C/C++ Programming Language. For more MCQ Questions and Online Quizzes please visit https://www. McqQuestions. Com


Questions and Answers
  • 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

    • D. 

      None

  • 10. 
    Which one of the following is the boolean operator for logical and?
    • A. 

      &

    • B. 

      & &

    • C. 

      |

    • D. 

      | &