Skip to content

Tag Archives: C-C Quiz – 112

Pick the best statement for the below program: #include "stdio.h"    int main() {  union {int i1; int i2;} myVar = {.i2 =100};  printf("%d %d",myVar.i1,… Read More
Pick the best statement for the below program: #include "stdio.h"    int main() {  struct {int i; char c;} myVar = {.c ='A',.i = 100};… Read More
Pick the best statement for the below program: #include "stdio.h"    int main() {  struct {int a[2], b;} arr[] = {[0].a = {1}, [1].a =… Read More
Pick the best statement for the below program snippet: struct {int a[2];} arr[] = {1,2}; (A) No compile error and it’ll create array arr of… Read More
Pick the best statement for the below program: #include "stdio.h"    int main() {  struct {int a[2];} arr[] = {{1},{2}};     printf("%d %d %d %d",arr[0].a[0],arr[0].a[1],arr[1].a[0],arr[1].a[1]);… Read More