Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C code? #include <stdio.h> int main() { int p = 10, q = 20, r; if (r = p = 5 || q > 20) printf("%d", r); else printf("No Output\n"); }
Q2
All keywords in C are in . . . . . . . .
Q3
What will be the output of the following C code? #include <stdio.h> int main() { int x = -2; x = x >> 1; printf("%d\n", x); }
Q4
What will be the output of the following C code? main() { enum resut {pass, fail}; enum result s1,s2; s1=pass; s2=fail; printf("%d",s1); }
Q5
What will be the output of the following C code? #include <stdio.h> void main() { char a = 'A'; char b = 'B'; int c = a + b % 3 - 3 * 2; printf("%d\n", c); }
Q6
Which among the following are the fundamental arithmetic operators, i.e, performing the desired operation can be done using that operator only?
-
A
-
B
-
C
-
D
Q7
What will be the output of the following C code? #include <stdio.h> int main() { int y = 1; if (y & (y = 2)) printf("true %d\n", y); else printf("false %d\n", y); }
Q8
What will be the output of the following C code? #include <stdio.h> int main() { int x = 1; int y = x == 1 ? getchar(): 2; printf("%d\n", y); }
Q9
Which of the following statement is false?
Q10
What will be the output of the following C code? #include <stdio.h> int main() { int i = 10; int *p = &i; printf("%d\n", *p++); }
Q11
In expression i = g() + f(), first function called depends on . . . . . . . .
Q12
What will be the output of the following C code? #include <stdio.h> void main() { int k = 4; int *const p = &k; int r = 3; p = &r; printf("%d", p); }
Q13
What will be the output of the following C code? #include <stdio.h> void main() { int a = 5 * 3 + 2 - 4; printf("%d", a); }
Q14
What will be the output of the following C code? #include <stdio.h> int main() { int c = 2 ^ 3; printf("%d\n", c); }
Q15
What will be the output of the following C code snippet? #include <stdio.h> void main() { unsigned int x = -5; printf("%d", x); }
Q16
Which of the following is a User-defined data type?
Q17
What will be the data type of the result of the following operation? (float)a * (int)b / (long)c * (double)d
Q18
What will be the output of the following C code? #include <stdio.h> void main() { int k = 8; int m = 7; k < m ? k++ : m = k; printf("%d", k); }
Q19
Which of the following keywords is used to define an alternate name for an already existing data type?
Q20
What will be the output of the following C code? #include <stdio.h> int main() { int y = 0; if (1 |(y = 1)) printf("y is %d\n", y); else printf("%d\n", y); }
Q21
Which of the following declaration is illegal?
Q22
When double is converted to float, then the value is?
Q23
What will be the output of the following C code? #include <stdio.h> void main() { int h = 8; int b = (h++, h++); printf("%d%d\n", b, h); }
Q24
The following C code can be rewritten as . . . . . . . . c = (n) ? a : b;
Q25
What will be the value of the following C expression? (x = foo()) != 1 considering foo() returns 2