C LANGUAGE QUIZ 8 1 Created on May 04, 2020 By Sirjana GhimireAcharya C Language Quiz 8 1 / 10 What is the size of the following union definition?#include<stdio.h>union abc {char a,b,c,d,e,f,g,h;int i;}abc;main(){printf( "%d", sizeof( abc ));} 1 2 4 8 2 / 10 2. "Stderr" is a standard error. Yes Standard error stream Standard error types Standard error function 3 / 10 3. In the standard library of C programming language, which of the following header file is designed for basic mathematical operations? conio.h math.h dos.h stdio.h 4 / 10 4. What will be the output o program?#include <stdio.h>int main(){int i;for(i=0;;i++){printf("%d",i);}} Run time error infinite loop Compile time error None are correct 5 / 10 5. Which of the given printf statement(s) would be able to print arr[5][5][5](i) printf("%d",arr[5][5][5]);(ii) printf("%d",*(*(*(arr+5)+5)+5));(iii) printf("%d",(*(*(arr+5)+5))[5]);(iv) printf("%d",*((*(arr+5))[5]+5)); only (i) would compile and print 123. both (i) and (ii) would compile and both would print 123. all (i), (ii), (iii) and (iv) would compile but only (i) and (ii) would print 123. all (i), (ii), (iii) and (iv) would compile and all would print 123. 6 / 10 6. Pick the correct statement for the below program:#include "stdio.h" void fun(int n){int idx;int arr1[n] = {0};int arr2[n];for (idx=0; idx<n; idx++)arr2[idx] = 0;}int main(){fun(4);return 0;} Definition of both arr1 and arr2 is incorrect because variable is used to specify the size of array. That’s why compile error. Apart from definition of arr1 arr2, initialization of arr1 is also incorrect. arr1 can’t be initialized due to its size being specified as variable. That’s why compile error. Initialization of arr1 is incorrect. arr1 can’t be initialized due to its size being specified as variable. That’s why compile error. No compile error. The program would define and initializes both arrays to ZERO. 7 / 10 7. What is the output of the following program?#include<stdio.h>main(){int a[] = {20,30,40,50};printf("%d", *a);} 20 30 40 50 50 40 30 20 20 Compile error. 8 / 10 8. What is the output of the following program?#include<stdio.h>main(){union abc {int x;char ch;}var;var.ch = 'A';printf("%d", var.x);} A error 65 97 9 / 10 9. What’s going to happen when we compile and run the following C program snippet?#include "stdio.h"int main(){int a = 20;int b = 30;printf("=%d",(a+1),(b=a+2));printf(" %d=",b);return 0;} =21 30= =21 22= Compiler Error due to (b=a+2) in the first printf(). No compile error but output would be =21 X= where X would depend on compiler implementation. 10 / 10 10. extern int fun(); - The declaration indicates the presence of a global function defined outside the current module or in another file. True False Your score is The average score is 30% LinkedIn Facebook Twitter 0% Restart quiz