C Language - Structures,Unions
You Are Here :: Home > C Language > Structures,Unions General Questions
49. | What is the output of this C code? #include
struct student
{
char *name;
};
void main()
{
struct student s[2], r[2];
s[1] = s[0] = "shal";
printf("%s%s", s[0].name, s[1].name);
}
|
|||||||
|
50. | What is the output of this C code? #include
struct student
{
};
void main()
{
struct student s[2];
printf("%d", sizeof(s));
}
|
|||||||
|
51. | What is the output of this C code? (Assuming size of int be 4)
#include
struct temp
{
int a;
int b;
int c;
} p[] = {0};
main()
{
printf("%d", sizeof(p));
}
|
|||||||
|
52. | Which of the following structure declaration doesn't require pass-by-reference? |
|||||||
|
53. | What is the output of this C code? #include
union p
{
int x;
char y;
}k = {.y = 97};
int main()
{
printf("%d\n", k.y);
}
|
|||||||
|
54. | struct employee_rec { char name[30];
int dependents;
float pay_rate;
} full_time, part_time;
How many members does the above structures have?
|
|||||||
|
« previous
1
2
3
4
5
6
8
9
...next »