Question
#include<stdio.h>
int main()
{
struct a
{
float category:5;
char scheme:4;
};
printf("size=%d, sizeof(struct a));
return 0;
}
Point out the error in the program?
#include<stdio.h>
int main()
{
struct a
{
float category:5;
char scheme:4;
};
printf("size=%d, sizeof(struct a));
return 0;
}
Answer: Option B
Was this answer helpful ?
Bit field type must be signed int or unsigned int.
The char type: char scheme:4; is also a valid statement.
Was this answer helpful ?
Submit Solution