Introduction To C Programming Quiz

20 Questions | Attempts: 11124
Share

SettingsSettingsSettings
Introduction To C Programming Quiz - Quiz

Play this amazing quiz that covers the questions related to introduction to C programming. Whether you are a hardcore C programmer or just have started learning about it, playing this quiz will absolutely benefit you and you'd be able to learn some new terms related to the C language. C is a general-purpose programming language used to develop software. Dennis M. Ritchie developed it in 1972. Do you think you can easily score well on the test? Take it up and check your result.


Questions and Answers
  • 1. 
    A placeholder begins with the symbol _____.
    • A. 

      *

    • B. 

      !

    • C. 

      %

    • D. 

      &

  • 2. 
    The "\n" character does which of the following operations?
    • A. 

      Double line spacing

    • B. 

      Character deletion

    • C. 

      Character backspace

    • D. 

      Places cursor on the next line

  • 3. 
    #define PI 3.14159 The above code represents which of the following?
    • A. 

      Preprocessor directive

    • B. 

      Variable

    • C. 

      Constant macro

    • D. 

      Macro

  • 4. 
    Which symbol separates variable names?
    • A. 

      &

    • B. 

      . (period)

    • C. 

      ' (apostrophe)

    • D. 

      , (comma)

    • E. 

      ; (semicolon)

  • 5. 
    Which symbol terminates a C statement?
    • A. 

      . (period)

    • B. 

      ; (semicolon)

    • C. 

      : (colon)

    • D. 

      , (comma)

  • 6. 
    The ___________ ignores comments and they are not translated into machine language.
    • A. 

      Compiler

    • B. 

      Translator

    • C. 

      Both

    • D. 

      None

  • 7. 
    Which of the following represent comments in C?
    • A. 

      <, >

    • B. 

      [ , ]

    • C. 

      /*, /*

    • D. 

      */, /*

    • E. 

      /*, */

  • 8. 
    Which arithmetic operator in C returns the integer remainder of the result of dividing its first operand by its second?
    • A. 

      %

    • B. 

      /

    • C. 

      \

    • D. 

      *

  • 9. 
    Which of the following is a valid name for an identifier in C?
    • A. 

      !Here

    • B. 

      4Me_To_You

    • C. 

      Emp_Num1

    • D. 

      All of the above points

  • 10. 
    Which of the following operations gets evaluated first?
    • A. 

      * - multiplication

    • B. 

      () - parentheses

    • C. 

      / - division

    • D. 

      + - addition

  • 11. 
    If your program gets an error when dividing by zero, this type of error is called?
    • A. 

      Syntax

    • B. 

      Run-time

    • C. 

      Undetected

    • D. 

      Logic

  • 12. 
    Your C program was able to compile. However, the result is incorrect. What type of error is this?
    • A. 

      Undetected

    • B. 

      Run-time

    • C. 

      Syntax

    • D. 

      Logic

  • 13. 
    Your C program always fails to compile and has these errors. What type of errors are present?
    • A. 

      Syntax

    • B. 

      Run-time

    • C. 

      Logic

    • D. 

      Undetected

  • 14. 
    The section of C code after the preprocessor directives is generally for?
    • A. 

      User-defined function definitions

    • B. 

      Function prototypes

    • C. 

      Variables

    • D. 

      Datatypes

  • 15. 
    Is the syntax for the following C statement correct?: scanf("%d", input);
    • A. 

      True

    • B. 

      False

    • C. 

      Not clear

    • D. 

      Can't say

  • 16. 
    When a C program asks the user to input data using the keyboard, the program is said to be in __________ mode.
    • A. 

      Batch

    • B. 

      Interactive

    • C. 

      Preprocessor

    • D. 

      Saving

  • 17. 
    What is the value of result after executing the following statement?result = 6 + 4 * 5 / 2
    • A. 

      25

    • B. 

      22

    • C. 

      16

    • D. 

      60

  • 18. 
    You can have ____________ main function(s).
    • A. 

      Only one

    • B. 

      Two

    • C. 

      More than two

    • D. 

      Can't say

  • 19. 
    In general, the body of a function is represented by the following symbols?
    • A. 

      [, ]

    • B. 

      {, }

    • C. 

      /, \

    • D. 

      /*, */

  • 20. 
    A number such as 45.567 needs to be stored in a variable of which data type?
    • A. 

      Int

    • B. 

      Char

    • C. 

      Double

    • D. 

      Float

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.