1- Which of the following software translates source code into object code?
A) Compiler
B) Interpreter
C) Assembler
D) None
2-Which one of the following is not a keyword in C language?
A) main
B) endl
C) float
D) switch
3-Identify the invalid character constant:
A) '\n'
B) '$'
C) '12'
D) 'p'
4-What is the binary number equivalent of the decimal number 12?
A) 1100
B) 1010
C) 1001
D) 1110
5-Determine the order of evaluation of operations within the expression A<B&&C||D>A
A) &&, ||, <, >
B) <, >, &&, ||
C) >, <, &&, ||
D) &&,<, >, ||
6-How many times the printf statement within the while loop will be executed? x=1; while(x=0) printf("hello");
A) 1
B) 0
C) infinite
D) 2
7-Find the output generated by the given program. #include <stdio.h. void main() { printf("Bre\nak"); }
A) Break
B) Bre\nak
C) Break
D) None
8-Which of the following is not an iterative statement?
A) switch
B) while
C) do while
D) for
9-Identify the storage class with which & operator cannot be used. A) register
B) static
C) extern
D) auto
10-Identify the invalid declaration: A) int &p;
B) int *p[10];
C) int **p;
D) int *p[ ];
Answers
Answered by
7
The correct answer for 1 is A.
The correct answer for 2 is B.
The correct answer for 3 is B.
The correct answer for 4 is A.
The correct answer for 5 is B.
The correct answer for 6 is C.
The correct answer for 7 is A.
The correct answer for 8 is A.
The correct answer for 9 is A.
The correct answer for 10 is B.
Similar questions