Multiple Choice Questions On C Language - Set 2

Tuesday 5 June 2012


Following are the multiple choice questions on C Language with answers. Following are the important questions for competitive exams point of view. Appropriate explanations are also given with the answers.

1) Which of the following is not true in context of C language ?
  1. It is array of characters
  2. Last character of character array is always \0
  3. C inserts the null character automatically
  4. Any string in C can be read by the function getchar()
Show/Hide Answer
Answer =  B and C
Explanation: No Explanation 
2)  Which of the following operations can not be perform on pointers in C ?
  1. Addition of two pointers
  2. Subtraction of a number from a pointer
  3. Subtraction of one pointer from another
  4. Addition of a number to a pointer
Show/Hide Answer
Answer = A
Explanation: No Explanation
3) What will be the output of following program ?
             main( )
            {
                   static char a[]="BOMBAY"
                   char *b="BOMBAY";
                   printf("\n%d%d",size of(a),size of (b));
            } 
  1. a=7, b=7
  2. a=7, b=2
  3. a=2, b=7
  4. a=7, b=0
Show/Hide Answer
Answer = C
Explanation: No Explanation
4) What is the output of  C statement 7.5 % 3 ?
  1. 1.5
  2. 1
  3. No output
  4. Error
Show/Hide Answer
Answer = D
Explanation: No Explanation 
5) Any program in C has access to three standard files?
  1. standard input file, standard output file, standard error file
  2. stdin, stdout, stderr
  3. keywords, screen, stderr
  4. All of above
  5. None of above
Show/Hide Answer
Answer = B
Explanation: No Explanation 
6) An identifier in C  ?
  1. is a name of thing such as variable and function
  2. is made up of letters, numerals and the underscore
  3. can contain both uppercase and lowercase letters
  4. All of above
  5. None of above
Show/Hide Answer
Answer = D
Explanation:No  Explanation 
7) The single character input/output functions are  ?
  1. scanf( ) and printf( )
  2. getchar( ) and printf( )
  3. scanf( ) and putchar( )
  4. getchar( ) and putchar( )
  5. None of above
Show/Hide Answer
Answer = D
Explanation: No Explanation 
8) Precedence determines which operator ?

  1. is evaluated first
  2. is most important
  3. is fastest 
  4. Operates on the largest number
  5. None of above
Show/Hide Answer
Answer = A
Explanation: No Explanation 
9) In C, the NULL statement which does nothing is just ?
  1. a.,
  2. ;
  3. :
  4. .
Show/Hide Answer
Answer = B
Explanation:No Explanation 
10) The two operators && and || are ?
  1. arithmetic operators
  2. equality operators
  3. logical operators
  4. relational operators
  5. None of above
Show/Hide Answer
Answer = D 
Explanation: No Explanation 

Tags : C Language multiple choice questions with answers, C Language MCQs, Objective type questions on C Language with answers, Objective type questions on C Language, Quiz questions on C Language, Operating system MCQ, Multiple choice questions On C Language, UGC-NET test preperation, Computer subjects quiz

Do You Like This? Please take 5 seconds to share with your firends.