Inputs and Outputs Operations November 26, 2020December 21, 2020wefru Inputs and Outputs Operations Quiz 3 Created on November 26, 2020 By wefru Input and Output Operations TEST YOUR BROAD SKILLS 1 / 10 Q.61 What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array? The array size would appropriately not grow. The element will be set to 0. The program may crash if some important data gets overwritten. The array size would appropriately grow. 2 / 10 Q.62 What would be the output of the following program? #includemain(){char str[]="S\065AB"; printf("\n d", sizeof(str));} 6 45 64 66 3 / 10 Q.63 What will be the value of `a` after the following code is executed #define square(x) x*xa = square(2+3) 11 2 32 66 4 / 10 Q.64 #include void func(){int x = 0; static int y = 0; x++; y++;printf( "d -- d\n", x, y );}int main(){func();func(); return 0;}What will the code above print when it is executed? 1 -- 1 1 -- 2 1 -- 1 1 -- 1 1 -- 1 2-- 2 2 -- 1 1 -- 2 5 / 10 Q.65 long factorial (long x){????return x * factorial(x - 1);}With what do you replace the ???? to make the function shown above return the correct answer? if (x <= 1) return 1; if (x = 1) return 1; if (x >= 1) return 1; if (x == 1) return 1; 6 / 10 Q.66 int y[4] = {6, 7, 8, 9};int *ptr = y + 2; printf("d\n", ptr[ 1 ] );What is printed when the sample code above is executed? 9 3 4 5 7 / 10 Q.67 int i = 4; switch (i){default: ; case 3:i += 5;if ( i == 8){ i++;if (i == 9) break; i *= 2;}i -= 4;break; case 8:i += 5;break;}printf("i = d\n", i);What will the output of the sample code above be? i = 5 i = 6 i = 7 i = 8 8 / 10 Q.68 What will be output if you will compile and execute the following c code?void main() {if(printf("cquestionbank")) printf("I know c");elseprintf("I know c++");} cquestionbankI know c I know c I know c++ All the above 9 / 10 Q.69 What will be output if you will compile and execute the following c code?#define call(x) #xvoidmain(){printf(" s",call(c/c++));} c/c++ Error C C++ 10 / 10 Q.70 What will be output if you will compile and execute the following c code? #define message "union is\power of c" void main(){clrscr(); printf(" s",message); getch();} union is power of c Compiler error garbage value none of the above Your score is The average score is 17% LinkedIn Facebook Twitter VKontakte 0% Restart quiz