Question 41
Question 42
Question 44
Question 45
Question 46
Question 47
Question 48
#include <stdio.h>
struct test {
int i;
char *c;
}st[] = {5, \"become\", 4, \"better\", 6, \"jungle\", 8, \"ancestor\", 7, \"brother\"};
main ()
{
struct test *p = st;
p += 1;
++p -> c;
printf(\"%s,\", p++ -> c);
printf(\"%c,\", *++p -> c);
printf(\"%d,\", p[0].i);
printf(\"%s \\n\", p -> c);
}
Question 49
#include
void swap (int *x, int *y)
{
static int *temp;
temp = x;
x = y;
y = temp;
}
void printab ()
{
static int i, a = -3, b = -6;
i = 0;
while (i <= 4)
{
if ((i++)%2 == 1) continue;
a = a + i;
b = b + i;
}
swap (&a, &b);
printf(\"a = %d, b = %d\\n\", a, b);
}
main()
{
printab();
printab();
}
Question 50
Which one of the choices given below would be printed when the following program is executed?
#include
int a1[] = {6, 7, 8, 18, 34, 67};
int a2[] = {23, 56, 28, 29};
int a3[] = {-12, 27, -31};
int *x[] = {a1, a2, a3};
void print(int *a[])
{
printf(\"%d,\", a[0][2]);
printf(\"%d,\", *a[2]);
printf(\"%d,\", *++a[0]);
printf(\"%d,\", *(++a)[0]);
printf(\"%d\\n\", a[-1][+1]);
}
main()
{
print(x);
}
There are 86 questions to complete.