C Language 5
C Language 5
26. Do logical operators in the C language are evaluated with the short
circuit?
A. True
B. False o m
.c
C. Depends on the compiler
te
D. Depends on the standard a
Answer: A
q M
c
M
27. What is the result of logical or relational expression in C?
A. True or False
B. 0 or 1
Answer: B
A. structure
B. long
C. strings
D. float
Answer: A
B. ==
D. =
Answer: D
A. int
o m
B. float
.c
C. there is no type for an assignment expression
te
a
D. double
q M
Answer: A
c
M
31. What will be the value of the following assignment expression? (x =
foo())!= 1 considering foo() returns 2
A. 2
B. True
C. 1
D. 0
Answer: A
A. a *= b + 1;
B. (c = a * b)!=(a = c + a);
C. a = (b + 1)* a;
Answer: D
33. What will be the final value of c in the following C statement? (Initial
A. c = 1;
B. c = 2;
C. c = 3;
D. c = 4;
Answer: D
m
34. In expression i = g() + f(), first function called depends on __________
o
A. Compiler
.c
te
B. Associativiy of () operator
a
C. Precedence of () and + operator
q M
D. Left to write of the expression
c
Answer: A M
35. Which operators of the following have same precedence? P. "!=", Q.
"+=", R. "<<="
A. P and Q
B. Q and R
C. P and R
D. P, Q and R
Answer: B
A. Output will be 3, 2
B. Output will be 3, 1
C. Output will be 6, 1
Answer: D
B. e = ((a * b) + (c / (d * f)));
Answer: D
o m
38. While swapping 2 no’ what at precautions to be taken care? b = (b / a);
a = a * b; b = a / b; .c
te
A. Data type should be either of short, int and long a
q M
B. Data type should be either of float and double
c
M
C. All data types are accepted except for (char *)
Answer: B
Answer: D
Answer: B
Answer: B
m
o by C?
c
42. Which of the following typecasting is accepted
.
e
A. Widening conversions
at
B. Narrowing conversions
q M
c
C. Widening & Narrowing conversions
Answer: D
B. From the point of declaration to the end of the file in which it is defined
D. From the point of declaration to the end of the file being compiled
Answer: D
B. From the point of declaration to the end of the file in which it is defined
D. From the point of declaration to the end of the file being compiled
Answer: D
o m
c
46. In the standard library of C programming language, which of the
following header file is designed for basic .mathematical operations?
te
a
A. math.h
q M
B. conio.h
c
C. dos.h
D. stdio.h
M
Answer: A
Answer: C
A. A.float
B. B.double
C. C.long double
Answer: B
A. printf
B. fprintf
C. putchar
o m
D. scanf .c
te
Answer: D
a
q M
c
50. For a typical program, the input is taken using _________
A. scanf M
B. Files
C. Command-line
Answer: D
For Discussion / Reporting / Correction of any MCQ please visit discussion page by clicking on
'answer' of respective MCQ.
PlayStore
o m
.c
te
a
q M
c
M