#include<stdio.h>
main()
{
struct xx
{
int x;
struct yy
{
char s;
struct xx *p;
};
struct yy *q;
};
}
Answers were Sorted based on User's Feedback
Answer / susie
Answer :
Compiler Error
Explanation:
in the end of nested structure yy a member have to be
declared.
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / dayana benny
The structure yy is nested within structure xx. Hence, the elements are of yy are to be accessed through the instance of structure xx, which needs an instance of yy to be known. If the instance is created after defining the structure the compiler will not know about the instance relative to xx. Hence for nested structure yy you have to declare member.
Is This Answer Correct ? | 3 Yes | 0 No |
#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }
Write a program that find and print how many odd numbers in a binary tree
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
main() { int y; scanf("%d",&y); // input given is 2000 if( (y%4==0 && y%100 != 0) || y%100 == 0 ) printf("%d is a leap year"); else printf("%d is not a leap year"); }
write a c-program to find gcd using recursive functions
main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); } int i;
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
4 Answers Google, HCL, Quick Heal, WTF,
Given n nodes. Find the number of different structural binary trees that can be formed using the nodes.
16 Answers Aricent, Cisco, Directi, Qualcomm,
How to access command-line arguments?
main() { int i=-1,j=-1,k=0,l=2,m; m=i++&&j++&&k++||l++; printf("%d %d %d %d %d",i,j,k,l,m); }
main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }
1. const char *a; 2. char* const a; 3. char const *a; -Differentiate the above declarations.