0 of 100 Questions completed Questions: You have already completed the quiz before. Hence you can not start it again. Quiz is loading… You must sign in or sign up to start the quiz. You must first complete the following: 0 of 100 Questions answered correctly Your time: Time has elapsed You have reached 0 of 0 point(s), (0) Earned Point(s): 0 of 0, (0) CONGRAT 1. What will be the output of the following statement ? int a=10; printf(“%d &i”,a,10); 2. What will be the output of the following arithmetic expression ? 5+3*2%10-8*6 3 What will be the output of the following statement ? 4. What will be the output of the following statements ? int a = 4, b = 7,c; c = a = = b; printf(“%i”,c); 5. What will be the output of the following statements ? int a = 5, b = 2, c = 10, i = a>b 6. What will be output if you will compile and execute the following c code? struct marks{ 7. What will be the output of the following statements ? int x[4] = {1,2,3}; printf(“%d %d %d”,x[3],x[2],x[1]); 8. What will be the output of the following statement ? printf( 3 + “goodbye”); 9. What will be the output of the following statements ? long int a = scanf(“%ld%ld”,&a,&a); printf(“%ld”,a); 10. What will be the output of the following program ? #include 11. What will be the output of the following statements ? int i = 1,j; j=i— -2; printf(“%d”,j); 12. What will be the output of following program ? #include 13. What will be the output of following statements ? char x[ ] = “hello hi”; printf(“%d%d”,sizeof(*x),sizeof(x)); 14. What will be the output of the following statements ? int a=5,b=6,c=9,d; d=(ac?1:2):(c>b?6:8)); printf(“%d”,d); 15. What will be the output of the following statements ? int i = 3; 16. What will be the output of the following program ? #include 17. int testarray[3][2][2] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12}; What value does testarray[2][1][0] in the sample code above contain? 18 .What is the output? void main() 19. What is the output of the following code? #include 20 What is the output of this program? main() 21. What would be the output of the following program? #include 22.What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array? 23. What will be the value of `a` after the following code is executed #define square(x) x*x 24 What will the code below print when it is executed? #include 25. With what do you replace the ???? to make the function shown below return the correct answer? long factorial (long x) 26. What is printed when the sample code below is executed? int y[4] = {6, 7, 8, 9}; 27. What will the output of the sample code below be? int i = 4; case 8: 28. What will be output if you will compile and execute the following c code? void main() 29.What will be output if you will compile and execute the following c code? #define call(x) #x 30. What will be output if you will compile and execute the following c code? #define message “union is 31. What will be output if you will compile and execute the following c code? void main(){ 32. What will be output if you will compile and execute the following c code? void main() 33.What will be output if you will compile and execute the following c code? int extern x; 34.What will be output if you will compile and execute the following c code? void main(){ 35.What will be output if you will compile and execute the following c code? 35.What will be output if you will compile and execute the following c code? #include “string.h” 37. Write c program to print “hello” without using ; (semicolon) Upload your answer to this question. This response will be reviewed and graded after submission. 38- What is the output of the following code snippet? #include<stdio.h> 39. Which operator is used to continue the definition of macro in the next line? 40. Function fopen() with the mode “r+” tries to open the file for _______. 41.What is the output of the following program? #include<stdio.h> void swap(int m, int n) m = n; swap(x,y); 42. Identify the incorrect file opening mode from the following. 43 What is the output of the following program? #include<stdio.h> void f() ++i; main() 44. What is the output of the below code snippet? #include<stdio.h> printf(“%u”,*p); 45.What is the output of the following code snippet? #include<stdio.h> printf(“%c”, c); 46. The type name/reserved word ‘short’ is _______. 47. int x=~1; What is the value of ‘x’? 48.What is your comment on the below C statement? signed int *p=(int*)malloc(sizeof(unsigned int)); 49. Identify the invalid constant used in fseek() function . 50.What is the size of ‘int’? 51. What is the output of the below code snippet? #include<stdio.h> main() c = a + b; 52.What is the size of the following union definition? #include<stdio.h> union abc { main() 53. What is the output of the following program? #include<stdio.h> main() r = y%x; 54. What is the output of the following program? #include<stdio.h> main() void *q=p; 55.What is the output of the following code snippet? #include<stdio.h> printf(“%u\n”, i–); 56.What is the output of the following program? #include<stdio.h> printf(“%d %d”, india, GREAT); 57.What is the output of the following program? #include<stdio.h> main() int *p; 58. What is the output of the below code snippet? #include<stdio.h> 59.What is the output of the below code snippet? #include<stdio.h> printf(“a = %d, b = %d\n”, a, b, c); 60.What is the output of the following code snippet? #include<stdio.h> } 61. Who is father of C Language? 62. C Language developed at _____? 63. For 16-bit compiler allowable range for integer constants is ______ ? 64. C programs are converted into machine language with the help of 65. A C variable cannot start with 66. Which of the following is allowed in a C Arithmetic instruction 67. Which of the following shows the correct hierarchy of arithmetic operations in C 68. What is an array? 69. What is right way to Initialization array? 70. An array elements are always stored in _________ memory locations. 71. What is the right way to access value of structure variable book{ price, page }? 72. perror( ) function used to ? 73. Bitwise operators can operate upon? 74. What is C Tokens? 75. What is Keywords? 77. What is constant? 78. Which is the right way to declare constant in C? 79. Which operators are known as Ternary Operator? 80. In switch statement, each case instance value must be _______? 81. What is the work of break keyword? 82. What is function? 82. Which one of the following sentences is true ? 83. A binary tree with 27 nodes has _______ null branches. 84. Which one of the following is not a linear data structure? 85. Recursive functions are executed in a? 86. Queue is a _____________ list. 87. The statement print f (“%d”, 10 ? 0 ? 5 : 1 : 12); will print? 88. To represent hierarchical relationship between elements, which data structure is suitable? 89. Which of the following data structure is linear type? 90. The statement printf(“%c”, 100); will print? 91. The _______ memory allocation function modifies the previous allocated space. 92. Number of binary trees formed with 5 nodes are 93. The “C” language is 94. The worst case time complexity of AVL tree is better in comparison to binary search tree for 95. In which tree, for every node the height of its left subtree and right subtree differ almost by one? 96. C is ______ Language? 97. The Default Parameter Passing Mechanism is called as 98. The Default Parameter Passing Mechanism is called as 99. In which linked list last node address is null? 100. Which is the correct syntax to declare constant pointer? Quiz Summary
Information
Results
Results
0 Essay(s) Pending (Possible Point(s): 0) Categories
1. Question
2. Question
3. Question
printf(“%X%x%ci%x”,11,10,’s’,12); 4. Question
5. Question
void main()
{ printf(“hello”); main(); } 6. Question
int p:3;
int c:3;
int m:2;
};
void main(){
struct marks s={2,-6,5};
printf(“%d %d %d”,s.p,s.c,s.m);
} 7. Question
8. Question
9. Question
10. Question
void main()
{ int a = 2;
switch (A)
{ case 1:
printf(“goodbye”); break;
case 2:
continue;
case 3:
printf(“bye”);
}
} 11. Question
12. Question
main()
{
int x,y = 10;
x = y * NULL;
printf(“%d”,x);
} 13. Question
14. Question
15. Question
printf(“%d%d”,i,i++); 16. Question
void main()
{
int a = 36, b = 9;
printf(“%d”,a>>a/b-2);
} 17. Question
18. Question
{
int a=10,b=20;
char x=1,y=0;
if(a,b,x,y)
{
printf(“EXAM”);
}
} 19. Question
void main()
{
int s=0;
while(s++<10)>
# define a 10
main()
{
printf(“%d..”,a);
foo();
printf(“%d”,a);
}
void foo()
{
#undef a
#define a 50
} 20. Question
{
struct
{
int i;
}xyz;
(*xyz)->i=10;
printf(“%d”,xyz.i);
} 21. Question
main()
{
char str[]=”S\065AB”;
printf(“n%d”, sizeof(str));
} 22. Question
23. Question
a = square(2+3) 24. Question
void func()
{
int x = 0;
static int y = 0;
x++; y++;
printf( “%d — %dn”, x, y );
}
int main()
{
func();
func();
return 0;
} 25. Question
{
????
return x * factorial(x – 1);
} 26. Question
int *ptr = y + 2; printf(“%dn”, ptr[ 1 ] ); 27. Question
switch (i)
{
default: ;
case 3:
i += 5;
if ( i == 8)
{
i++;
if (i == 9) break;
i *= 2;
}
i -= 4;
break;
i += 5;
break;
}
printf(“i = %dn”, i); 28. Question
{
if(printf(“cquestionbank”))
printf(“I know c”);
else
printf(“I know c++”);
} 29. Question
void main(){
printf(“%s”,call(c/c++));
} 30. Question
power of c”
void main()
{
clrscr();
printf(“%s”,message);
getch();
} 31. Question
int a=25;
clrscr();
printf(“%o %x”,a,a);
getch();
} 32. Question
{
int i=0;
if(i==0){
i=((5,(i=3)),i=1);
printf(“%d”,i);
}
else
printf(“equal”);
} 33. Question
void main()
printf(“%d”,x);
x=2;
getch();
}
int x=23; 34. Question
int a,b;
a=1,3,15;
b=(2,4,6);
clrscr();
printf(“%d “,a+b);
getch();
} 35. Question
void main(){
static main;
int x;
x=call(main);
clrscr();
printf(“%d “,x);
getch();
}
int call(int address){
address++;
return address;
} 36. Question
void main(){
clrscr();
printf(“%d %d”,sizeof(“string”),strlen(“string”));
getch();
} 37. Question
38. Question
main()
{
const int a = 5;
a++;
printf(“%d”, a);
} 39. Question
40. Question
41. Question
{
int x = m;
n = x;
}
main()
{
int x=5, y=3;
printf(“%d %d”, x, y);
} 42. Question
43. Question
{
static int i;
printf(“%d”, i);
}
{
f();
f();
f();
} 44. Question
main()
{
unsigned x = 5, y=&x, *p = y+0;
} 45. Question
main()
{
char c = ‘A’+255;
} 46. Question
47. Question
48. Question
49. Question
50. Question
51. Question
{
int a = 1;
float b = 1.3;
double c;
printf(“%.2lf”, c);
} 52. Question
char a,b,c,d,e,f,g,h;
int i;
}abc;
{
printf( “%d”, sizeof( abc ));
} 53. Question
{
int r, x = 2;
float y = 5;
printf(“%d”, r);
} 54. Question
{
int x = 65, *p = &x;
char *r=q;
printf(“%c”,*r);
} 55. Question
main()
{
short unsigned int i = 0;
} 56. Question
main()
{
enum { india, is=7, GREAT };
} 57. Question
{
register int x = 5;
p=&x;
x++;
printf(“%d”,*p);
} 58. Question
main()
{
char s[]=”hello”, t[]=”hello”;
if(s==t){
printf(“eqaul strings”);
}
} 59. Question
main()
{
int a = 5, b = 3, c = 4;
} 60. Question
main()
{
int const a = 5;
a++;
printf(“%d”,a);
} 61. Question
62. Question
63. Question
64. Question
65. Question
66. Question
67. Question
68. Question
69. Question
70. Question
71. Question
72. Question
73. Question
74. Question
75. Question
76. Question
77. Question
78. Question
79. Question
80. Question
81. Question
82. Question
83. Question
84. Question
85. Question
86. Question
87. Question
88. Question
89. Question
90. Question
91. Question
92. Question
93. Question
94. Question
95. Question
96. Question
97. Question
98. Question
99. Question
100. Question
SCREEN TEST – C Programming