Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C code? #include <stdio.h> void main() { int x = 0, y = 2, z = 3; int a = x & y | z; printf("%d", a); }
Q2
Operation "a = a * b + a" can also be written as . . . . . . . .
Q3
What will be the output of the following C code? #include <stdio.h> int main() { printf("examveda\r\nclass\n"); return 0; }
Q4
Which of the following typecasting is accepted by C?
Q5
Which of the following data type will throw an error on modulus operation(%)?
Q6
Which of the following is an invalid assignment operator?
Q7
Which of the following is a ternary operator?
Q8
What will be the output of the following C code? #include <stdio.h> void main() { int a = 5, b = -7, c = 0, d; d = ++a && ++b || ++c; printf("\n%d%d%d%d", a, b, c, d); }
Q9
What will be the output of the following C code? #include <stdio.h> int main() { int x = 2, y = 1; x *= x + y; printf("%d\n", x); return 0; }
Q10
In the following code snippet, character pointer str holds a reference to the string . . . . . . . . char *str = "Examveda.com\0" "programming";
Q11
What will be the output of the following C code? #include <stdio.h> int main() { int y = 2; int z = y +(y = 10); printf("%d\n", z); }
Q12
What will be the output of the following C code? #include <stdio.h> void main() { int k = 4; float k = 4; printf("%d", k) }
Q13
Relational operators cannot be used on . . . . . . . .
Q14
What will be the output of the following C code? #include <stdio.h> #define a 10 int main() { const int a = 5; printf("a = %d\n", a); }
Q15
For which of the following, "PI++;" code will fail?
Q16
What will be the output of the following C code? #include<stdio.h> main() { typedef int a; a b=2, c=8, d; d=(b*2)/2+8; printf("%d",d); }
Q17
What is the size of myArray in the code shown below? (Assume that 1 character occupies 1 byte) typedef char x[10]; x myArray[5];
Q18
Which of the following cannot be a variable name in C?
Q19
We want to declare x, y and z as pointers of type int. The alias name given is: intpt The correct way to do this using the keyword typedef is:
Q20
What will be the output of the following C code? #include <stdio.h> int main() { int a = 2; if (a >> 1) printf("%d\n", a); }
Q21
Which of the following are unary operators?
Q22
What will be the output of the following C code? #include <stdio.h> int const print() { printf("example.com"); return 0; } void main() { print(); }
Q23
What will be the output of the following C code? #include <stdio.h> void main() { double b = 3 && 5 & 4 % 3; printf("%lf", b); }
Q24
What will be the output of the following C code? #include <stdio.h> int main() { int i = -3; int k = i % 2; printf("%d\n", k); }
Q25
What will be the output of the following C function? #include <stdio.h> void reverse(int i); int main() { reverse(1); } void reverse(int i) { if (i > 5) return ; printf("%d ", i); return reverse((i++, i)); }