A
Q. What will be the output of this code?
Code:
void main()
{
struct xx
{
int x=3;
char name[] = "hello";
};
struct xx *s = malloc(sizeof(struct xx));
printf("%d", s->x);
printf("%s", s->name);
}
{
struct xx
{
int x=3;
char name[] = "hello";
};
struct xx *s = malloc(sizeof(struct xx));
printf("%d", s->x);
printf("%s", s->name);
}
- Correct Answer - Option(B)
- Views: 19
- Filed under category C Programming
- Hashtags:
Discusssion
Login to discuss.