C Programming MCQ's - Set 2

10 Questions | Total Attempts: 603

SettingsSettingsSettings
Please wait...
C Programming Quizzes & Trivia

This quiz provides you the basic multiple choice questions on C constants.


Questions and Answers
  • 1. 
    Character Set of C language contains ?
    • A. 

      Alphabets

    • B. 

      Digits

    • C. 

      Special Symbols

    • D. 

      All of these

  • 2. 
    A variable name can have ?
    • A. 

      Any special symbol

    • B. 

      Blank space

    • C. 

      Comma ( , )

    • D. 

      Underscore

  • 3. 
    In C language , one of the following is not a valid data type
    • A. 

      Long

    • B. 

      Float

    • C. 

      Double

    • D. 

      Char

  • 4. 
    The format string %lf is used for ?
    • A. 

      Float

    • B. 

      Double

    • C. 

      Unsigned int

    • D. 

      Long double

  • 5. 
    A variable of type unsigned int can have a value in the range of ?
    • A. 

      -32768 to +32767

    • B. 

      0 to 32767

    • C. 

      0 to 65535

    • D. 

      -32767 to +32767

  • 6. 
    Which data type is not a primary data type
    • A. 

      Int

    • B. 

      Array

    • C. 

      Float

    • D. 

      Char

  • 7. 
    Which of the format string is not valid ?
    • A. 

      %ld

    • B. 

      %lf

    • C. 

      %lu

    • D. 

      %lc

  • 8. 
    Which is the valid string data
    • A. 

      'A'

    • B. 

      A

    • C. 

      "A"

    • D. 

      None of these

  • 9. 
    How much memory is required to store a value of type double ?
    • A. 

      4 bytes

    • B. 

      6 bytes

    • C. 

      8 bytes

    • D. 

      10 bytes

  • 10. 
    The modifier which is used to declare a variable as constant
    • A. 

      Short

    • B. 

      Signed

    • C. 

      Unsigned

    • D. 

      Const