C Programming and Technical Programming Output

#include

int main()
{
struct value
{
int bit1:1;
int bit3:4;
int bit4:4;
}bit={1, 2, 13};

printf("%d, %d, %dn", bit.bit1, bit.bit3, bit.bit4);
return 0;
}

A. 1, 2, 13 B. 1, 4, 4
C. -1, 2, -3 D. -1, -2, -13

Read Solution (Total 4)

C Other Question

#include

int main()
{
char *names[] = { "Suresh", "Siva", "Sona", "Baiju", "Ritu"};
int i;
char *t;
t = names[3];
names[3] = names[4];
names[4] = t;
for(i=0; i<=4; i++)
printf("%s,", names[i]);
return 0;
}
int main()
{
struct value
{
int bit1:1;
int bit3:4;
int bit4:4;
}bit;
printf("%dn", sizeof(bit));
return 0;
}

A. 1 B. 2
C. 4 D. 9