What is the output of this C code? 1. #include
2. void main()
3. {
4. int x = 0, y = 2, z = 3;
5. int a = x & y | z;
6. printf("%d", a);
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 2, y = 2;
5. float f = y + x /= x / y;
6. printf("%d %f\n", x, f);
7. return 0;
8. }
What is the value of i and j in the below code? 1. #include
2. int x = 0;
3. int main()
4. {
5. int i = (f() + g()) | g(); //bitwise or
6. int j = g() | (f() + g()); //bitwise or
7. }
8. int f()
9. {
10. if (x == 0)
11. return x + 1;
12. else
13. return x - 1;
14. }
15. int g()
16. {
17. return x++;
18. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 1, y = 0, z = 3;
5. x > y ? printf("%d", z) : return z;
6. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int i = 10;
5. int *p = &i;
6. printf("%d\n", *p++);
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. const int p;
5. p = 4;
6. printf("p is %d", p);
7. return 0;
8. }
Which of the following is not a valid variable name declaration?
Which of the following is a User-defined data type?
What will happen if the below program is executed? 1. #include
2. int main()
3. {
4. int main = 3;
5. printf("%d", main);
6. return 0;
7. }
Comment on the output of this C code? 1. #include
2. int main()
3. {
4. int i, n, a = 4;
5. scanf("%d", &n);
6. for (i = 0; i < n; i++)
7. a = a * 2;
8. }
What is the output of the following C code(on a 64 bit machine)? 1. #include
2. union Sti
3. {
4. int nu;
5. char m;
6. };
7. int main()
8. {
9. union Sti s;
10. printf("%d", sizeof(s));
11. return 0;
12. }
Which of the following is not an arithmetic operation?
What is the value of i and j in the below code? 1. #include
2. int x = 0;
3. int main()
4. {
5. int i = (f() + g()) || g();
6. int j = g() || (f() + g());
7. }
8. int f()
9. {
10. if (x == 0)
11. return x + 1;
12. else
13. return x - 1;
14. }
15. int g()
16. {
17. return x++;
18. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. printf("Hello World! %d \n", x);
5. return 0;
6. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 2, y = 0;
5. int z;
6. z = (y++, y);
7. printf("%d\n", z);
8. return 0;
9. }
What is the output of this C code? 1. #include
2. void main()
3. {
4. unsigned int x = -5;
5. printf("%d", x);
6. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int i = 0;
5. int x = i++, y = ++i;
6. printf("%d % d\n", x, y);
7. return 0;
8. }
What is the output of this C code? 1. #include
2. void main()
3. {
4. int x = 97;
5. char y = x;
6. printf("%c\n", y);
7. }
Which of the following cannot be a variable name in C?
Which among the following are the fundamental arithmetic operators, ie, performing the desired operation can be done using that operator only?
-
-
-
-
Comment on the output of this C code? 1. #include
2. int main()
3. {
4. const int i = 10;
5. int *ptr = &i;
6. *ptr = 20;
7. printf("%d\n", i);
8. return 0;
9. }
C99 standard guarantees uniqueness of ____ characters for internal names.
What is the output of this C code? 1. #include
2. int main()
3. {
4. int a = 10, b = 5, c = 3;
5. b != !a;
6. c = !!a;
7. printf("%d\t%d", b, c);
8. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 1, y = 0;
5. x &&= y;
6. printf("%d\n", x);
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int a = 2;
5. if (a >> 1)
6. printf("%d\n", a);
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 2, y = 0, l;
5. int z;
6. z = y = 1, l = x && y;
7. printf("%d\n", l);
8. return 0;
9. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 2, y = 0;
5. int z = (y++) ? 2 : y == 1 && x;
6. printf("%d\n", z);
7. return 0;
8. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int i = 0;
5. int j = i++ + i;
6. printf("%d\n", j);
7. }
Relational operators cannot be used on:
The format identifier ‘%i’ is also used for _____ data type?
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 2, y = 0;
5. int z = (y++) ? y == 1 && x : 0;
6. printf("%d\n", z);
7. return 0;
8. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int y = 1, x = 0;
5. int l = (y++, x++) ? y : x;
6. printf("%d\n", l);
7. }
What is the output of this C code? (7 and 8 are entered) 1. #include
2. void main()
3. {
4. float x;
5. int y;
6. printf("enter two numbers \n", x);
7. scanf("%f %f", &x, &y);
8. printf("%f, %d", x, y);
9. }
Enum types are processed by
What is the output of this C code? 1. #include
2. int main()
3. {
4. int a = 10;
5. double b = 5.6;
6. int c;
7. c = a + b;
8. printf("%d", c);
9. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. j = 10;
5. printf("%d\n", j++);
6. return 0;
7. }
Which expression has to be present in the following? exp1 ? exp2 : exp3;
Which is valid C expression?
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 2, y = 0;
5. int z = x && y = 1;
6. printf("%d\n", z);
7. }
What will be the data type of the expression (a < 50) ? var1 : var2; provided a = int, var1 = double, var2 = float