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 ?
main( )
{
static char a[]="BOMBAY"
char *b="BOMBAY";
printf("\n%d%d",size of(a),size of (b));
}
1) Which of the following is not true in context of C language ?
- It is array of characters
- Last character of character array is always \0
- C inserts the null character automatically
- 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 ? Explanation: No Explanation
- Addition of two pointers
- Subtraction of a number from a pointer
- Subtraction of one pointer from another
- Addition of a number to a pointer
Show/Hide Answer
Answer = A
Explanation: No Explanation
3) What will be the output of following program ?Explanation: No Explanation
main( )
{
static char a[]="BOMBAY"
char *b="BOMBAY";
printf("\n%d%d",size of(a),size of (b));
}
- a=7, b=7
- a=7, b=2
- a=2, b=7
- a=7, b=0
Show/Hide Answer
Answer = C
Explanation: No Explanation
4) What is the output of C statement 7.5 % 3 ? Explanation: No Explanation
- 1.5
- 1
- No output
- Error
Show/Hide Answer
Answer = D
Explanation: No Explanation
5) Any program in C has access to three standard files? Explanation: No Explanation
- standard input file, standard output file, standard error file
- stdin, stdout, stderr
- keywords, screen, stderr
- All of above
- None of above
Show/Hide Answer
Answer = B
Explanation: No Explanation
6) An identifier in C ? Explanation: No Explanation
- is a name of thing such as variable and function
- is made up of letters, numerals and the underscore
- can contain both uppercase and lowercase letters
- All of above
- None of above
Show/Hide Answer
Answer = D
Explanation:No Explanation
7) The single character input/output functions are ? Explanation:No Explanation
- scanf( ) and printf( )
- getchar( ) and printf( )
- scanf( ) and putchar( )
- getchar( ) and putchar( )
- None of above
Show/Hide Answer
Answer = D
Explanation: No Explanation
8) Precedence determines which operator ? Explanation: No Explanation
- is evaluated first
- is most important
- is fastest
- Operates on the largest number
- None of above
Show/Hide Answer
Answer = A
Explanation: No Explanation
9) In C, the NULL statement which does nothing is just ? Explanation: No Explanation
- a.,
- ;
- :
- .
Show/Hide Answer
Answer = B
Explanation:No Explanation
10) The two operators && and || are ? Explanation:No Explanation
- arithmetic operators
- equality operators
- logical operators
- relational operators
- None of above
Show/Hide Answer
Answer = D
Explanation: No Explanation
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.
2 comments:
yes... && and || are logical operators not relational
The answer of question 10 should be C. Logical operators.
It needs correction. Thanks
Post a Comment