C Language - Structures,Unions
You Are Here :: Home > C Language > Structures,Unions General Questions
43. | What is the output of this C code? #include
struct student
{
char *c;
};
void main()
{
struct student s[2];
printf("%d", sizeof(s));
}
|
|||||||
|
44. | What is the output of this C code? #include
struct shalu
{
char *c;
};
void main()
{
struct shalu *s;
s->c = "hi";
printf("%s", s->c);
}
|
|||||||
|
45. | What is the output of this C code? #include
struct move
{
char *c;
};
void main()
{
struct move m;
struct move *s = &m;
(*s).c = "front";
printf("%s", m.c);
}
|
|||||||
|
46. | What is the output of this C code? #include
struct p
{
int x;
int y;
};
int main()
{
struct p p1[] = {1, 2, 3, 4, 5, 6};
struct p *ptr1 = p1;
printf("%d %d\n", ptr1->x, (ptr1 + 2)->x);
}
|
|||||||
|
47. | For the following declaration of structure, which of the following will stop the loop at the last node of a linked list? struct node
{
struct node *next;
};
|
|||||||
|
48. | What is the output of this C code? #include
typedef struct student
{
char *a;
}stu;
void main()
{
stu s;
s.a = "bye";
printf("%s", s.a);
}s
|
|||||||
|
« previous
1
2
3
4
5
6
7
8
9
...next »