Online Test for C

  1. Select best option to consturct Real Constant
    An real constant must have at least one digit that can be either positive or negative
    Must have a decimal point
    No comma or blank allowed within real constant
    All of the above

  1. perror( ) function used to ?
    Work same as printf()
    prints the error message specified by the compiler
    prints the garbage value assigned by the compiler
    None of the above


  1. The statement printf("%c", 100); will print?
    prints 100
    print garbage
    prints ASCII equivalent of 100
    None of the above

  1. Find Error/Output in follwing code:
  2.                                 
    int main ()
    
    {
      int check = 2;
      switch (check)
        {
        case 1:
          printf ("D.W.Steyn");
        case 2:
          printf (" M.G.Johnson");
        case 3:
          printf (" Mohammad Asif");
        default:
          printf (" M.Muralidaran");
        }
      return 0;
    }
    D.W.Steyn
    D.W.Steyn M.G.Johnson
    M.G.Johnson
    M.G.Johnson Mohammad Asif M.Muralidaran

  1. Which of the following is a valid Integer Constant?
    35,75
    3 455
    +3333
    *56

  1. C programs are converted into machine language with the help of
    An Editor
    A compiler
    An operating system
    None of the above


  1. continue keyword skip one iteration of loop?
    True
    False

  1. How many keywords in C?
    30
    32
    38
    33

  1. Two case constants within the same switch statement can have the same value.
    True
    False

  1. C is ______ Language?
    Low Level
    High Level
    Assembly Level
    Machine Level

Post Your Question
Social Sharing
Search