Question 1 of 25
Hints left: 3
Q1
What will be the output of the following C code? (If the name entered is: Shyam) #include<stdio.h> #include<string.h> typedef struct employee { char name[50]; int salary; } e1; void main( ) { printf("Enter Employee name"); scanf("%s",e1.name); printf("\n%s",e1.name); }
Q2
What will be the output of the following C code? #include <stdio.h> int main() { unsigned int i = 23; signed char c = -23; if (i > c) printf("Yes\n"); else if (i < c) printf("No\n"); }
Q3
What will be the output of the following C code? #include <stdio.h> void main() { int h = 8; int b = 4 * 6 + 3 * 4 < 3 ? 4 : 3; printf("%d\n", b); }
Q4
What will be the output of the following C code? #include <stdio.h> void main() { int b = 5 & 4 | 6; printf("%d", b); }
Q5
What will be the output of the following C code? #include <stdio.h> int main() { printf("C programming %s", "Class by\n%s Shyam", "WOW"); }
Q6
What will be the output of the following C code? #include <stdio.h> int main() { int i = 23; char c = -23; if (i < c) printf("Yes\n"); else printf("No\n"); }
Q7
What will be the output of the following C code? #include <stdio.h> int main() { int a = 10, b = 10; if (a = 5) b--; printf("%d, %d", a, b--); }
Q8
function tolower(c) defined in library works for . . . . . . . .
Q9
What will be the output of the following C code? #include<stdio.h> enum class { a,b,c }; enum class m; main() { printf("%d",sizeof(m)); }
Q10
Which of the following statement is false?
Q11
Where in C the order of precedence of operators do not exist?
Q12
Which of the following is true for variable names in C?
Q13
What will be the output of the following C code? #include <stdio.h> int main() { signed char chr; chr = 128; printf("%d\n", chr); return 0; }
Q14
Which data type is most suitable for storing a number 65000 in a 32-bit system?
Q15
Associativity of an operator is . . . . . . . .
Q16
What will be the output of the following C code? #include <stdio.h> void main() { int x = 0; if (x = 0) printf("Its zero\n"); else printf("Its not zero\n"); }
Q17
What will be the output of the following C code? #include <stdio.h> void main() { int x = 4; int *p = &x; int *k = p++; int r = p - k; printf("%d", r); }
Q18
What will be the output of the following C code? #include <stdio.h> int main() { int x = 2, y = 0, l; int z; z = y = 1, l = x && y; printf("%d\n", l); return 0; }
Q19
What is the difference between the following 2 codes? #include <stdio.h> //Program 2 int main() { int d, a = 1, b = 2; d = a++ +++b; printf("%d %d %d", d, a, b); }
Q20
What will be the output of the following C code? #include <stdio.h> void main( { double b = 8; b++; printf("%lf", b); }
Q21
What will be the output of the following C code? #include <stdio.h> int main() { const int p; p = 4; printf("p is %d", p); return 0; }
Q22
What will be the output of the following C code? #include <stdio.h> int main() { int a = -1, b = 4, c = 1, d; d = ++a && ++b || ++c; printf("%d, %d, %d, %d\n", a, b, c, d); return 0; }
-
A
-
B
-
C
-
D
Q23
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); }
Q24
We want to create an alias name for an identifier of the type unsigned long. The alias name is: ul. The correct way to do this using the keyword typedef is . . . . . . . .
Q25
What will be the output of the following C code? #include <stdio.h> void main() { int x = 4; int *p = &x; int *k = p++; int r = p - k; printf("%d", r); }