16
Loading subject content…
Loading subject content…
Loading practice questions…
What will be the output of the program?
#include <stdio.h>
int main(void) {
int a[2][3] = {1, 2, 3, 4, 5, 6};
printf("%d\n", *(*(a + 1) + 1));
return 0;
}What will be the output of the program?
#include <stdio.h>
int main(void) {
int a[] = {4, 8, 15, 16, 23, 42};
printf("%zu\n", sizeof(a) / sizeof(a[0]));
return 0;
}What will be the output of the program?
#include <stdio.h>
int main(void) {
int m[2][3] = {{1, 2, 3}, {4, 5, 6}};
int i, j, s = 0;
for (i = 0; i < 2; i++) for (j = 0; j < 3; j++) if (i == 1) s += m[i][j];
printf("%d\n", s);
return 0;
}What will be the output of the program?
#include <stdio.h>
int main(void) {
int a[5] = {5, 3, 9, 1, 7}, i, max = a[0];
for (i = 1; i < 5; i++) if (a[i] > max) max = a[i];
printf("%d\n", max);
return 0;
}