C LANGUAGE QUIZ
1 .
Which of the following correctly declares an array?

Correct Answer : Option (A)

int anarray[9]; 
  Show Answer
2 .
An array is what kind of data type ?

Correct Answer : Option (C)

Homogenous 
  Show Answer
3 .
Which of the following is a two-dimensional array?

Correct Answer : Option (D)

int anarray[20][20];
  Show Answer
4 .
Which of the following function is more appropriate for reading in a multi-word string?

Correct Answer : Option (B)

gets();
  Show Answer
5 .
In what situation, install function returns NULL?

Correct Answer : Option (A)

When there is no memory for adding new name
  Show Answer
6 .
Which of the following functions compares two strings?

Correct Answer : Option (A)

strcmp(); 
  Show Answer
7 .
How will you print \n on the screen?

Correct Answer : Option (C)

printf("\\n"); 
  Show Answer
8 .
What will be printed as the result of the operation below.
main() 
{ 
    int x=20,y=35; 
    x=y++ + x++; 
    y= ++y + ++x; 
    printf("%d%d",x,y);
}​

Correct Answer : Option (B)

5 7 9 4 
  Show Answer
9 .
What is the output of this C code if there is no error in stream fp?
#include <stdio.h>
 int main()
  {
     FILE *fp;
     fp = fopen("newfile", "w");
     printf("%d\n", ferror(fp));
     return 0;
  }​

Correct Answer : Option (A)

0
  Show Answer
10 .
Which is a valid typecast?

Correct Answer : Option (B)

(char)a;
  Show Answer