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. }
Comment on the output of this C code? 1. #include
2. int main()
3. {
4. float f1 = 0.1;
5. if (f1 == 0.1)
6. printf("equal\n");
7. else
8. printf("not equal\n");
9. }
What will be the value of d in the following program? 1. #include
2. int main()
3. {
4. int a = 10, b = 5, c = 5;
5. int d;
6. d = b + c == a;
7. printf("%d", d);
8. }
Comment on the output of this C code? 1. #include
2. int main()
3. {
4. int i = 2;
5. int i = i++ + i;
6. printf("%d\n", i);
7. }
Comment on the output of this C code? 1. #include
2. int main()
3. {
4. float f1 = 0.1;
5. if (f1 == 0.1f)
6. printf("equal\n");
7. else
8. printf("not equal\n");
9. }
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 is the output of this C code? 1. #include
2. void foo(const int *);
3. int main()
4. {
5. const int i = 10;
6. printf("%d ", i);
7. foo(&i);
8. printf("%d", i);
9. }
10. void foo(const int *i)
11. {
12. *i = 20;
13. }
For the following code snippet: char *str = “Sanfoundry.com\0” “training classes”; The character pointer str holds reference to string:
Which of the following is not a pointer declaration?
Which data type is most suitable for storing a number 65000 in a 32-bit system?
What is the output of this C code? 1. #include
2. int main()
3. {
4. int x = 2, y = 2;
5. x /= x / y;
6. printf("%d\n", x);
7. return 0;
8. }
Function tolower(c) defined in library works for
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. float x = 'a';
5. printf("%f", x);
6. return 0;
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int a = 10, b = 5, c = 5;
5. int d;
6. d = a == (b + c);
7. printf("%d", d);
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. }
What is the final value of j in the below code? 1. #include
2. int main()
3. {
4. int i = 0, j = 0;
5. if (i && (j = i + 10))
6. //do something
7. ;
8. }
What is the output of this C code? 1. #include
2. void main()
3. {
4. int a = 5, b = -7, c = 0, d;
5. d = ++a && ++b || ++c;
6. printf("\n%d%d%d%d", a, b, c, d);
7. }
What is the output of this C code? 1. #include
2. void main()
3. {
4. int a = 3;
5. int b = ++a + a++ + --a;
6. printf("Value of b is %d", b);
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int a = 10, b = 10;
5. if (a = 5)
6. b--;
7. printf("%d, %d", a, b--);
8. }
What is the output of this C code? 1. #include
2. void main()
3. {
4. int y = 3;
5. int x = 5 % 2 * 3 / 2;
6. printf("Value of x is %d", x);
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int i = 23;
5. char c = -23;
6. if (i < c)
7. printf("Yes\n");
8. else
9. printf("No\n");
10. }
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. }
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. }
Relational operators cannot be used on:
Does logical operators in C language are evaluated with short circuit?
Comment on the output of this C code? 1. #include
2. int main()
3. {
4. int i = 2;
5. int i = i++ + i;
6. printf("%d\n", i);
7. }
When do you need to use type-conversions?
What is the output of this C code? 1. #include
2. void main()
3. {
4. int k = 8;
5. int x = 0 == 1 && k++;
6. printf("%d%d\n", x, k);
7. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. printf("sanfoundry\r\nclass\n");
5. return 0;
6. }
What is the output of this C code? 1. #include
2. void main()
3. {
4. int b = 6;
5. int c = 7;
6. int a = ++b + c--;
7. printf("%d", a);
8. }
Result of a logical or relational expression in C is
Does this compile without error? 1. #include
2. int main()
3. {
4. int k;
5. {
6. int k;
7. for (k = 0; k < 10; k++);
8. }
9. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int a = 1, b = 1, d = 1;
5. printf("%d, %d, %d", ++a + ++a+a++, a++ + ++b, ++d + d++ + a++);
6. }
In expression i = g() + f(), first function called depends on
What is the output of this C code? 1, #include
2. int main()
3. {
4. int c = 2 ^ 3;
5. printf("%d\n", c);
6. }
What is the output of this C code? 1. #include
2. void main()
3. {
4. int a = 5 * 3 % 6 - 8 + 3;
5. printf("%d", a);
6. }
What is the output of this C code? 1. #include
2. int main()
3. {
4. int y = 2;
5. int z = y +(y = 10);
6. printf("%d\n", z);
7. }
The name of the variable used in one function cannot be used in another function
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. }