Online Test for C

  1. Which of the following is a Compound assignment operators?
    +=
    *=
    /=
    All the above

  1. Find Error/Output in follwing code:
  2.                                 
    int main()
    
    {
      int a = 10, b = 25;
      a = b++ + a++;
      b = ++b + ++a;
      printf("%d %d n", a, b);
    36 64
    35 62
    36 63
    30 28


  1. A zero value is considered to be false and a non-zero value is considered to be true.
    True
    False

  1. A file opened for writing already exists its contents would be overwritten.
    True
    False

  1. The _______ memory allocation function modifies the previous allocated space.
    calloc
    free
    malloc
    realloc

  1. Which of the following is NOT a valid Real Constant?
    +345.23
    45 22.22
    0.000564
    -3.2


  1. What is %f, %d, %s and %c?
    Number Specifier
    Format Specifier
    Access Specifier
    None of the above

  1. Which of the following is correct set of keywords?
    unsigned, external, typedef, signed
    unsigned, volatile, typedef, every
    unsigned, volatile, typedef, sizeof
    None of the above

  1. The keywords are also called
    Safe words
    Static words
    Reserved words
    Reused words

  1. Switch statement can have any number of case instances
    True
    False

Post Your Question
Social Sharing
Search