Is the following code legal?
struct a
{
int x;
struct a b;
}

Answer Posted / raghu

no this code is illegal.

legal one:

struct a
{
int x;
struct a *b;
}

Is This Answer Correct ?    26 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to pass an entire structure to functions?

651


What functions are used for dynamic memory allocation in c language?

693


a parameter passed between a calling program and a called program a) variable b) constant c) argument d) all of the above

739


What is function and its example?

743


Is it acceptable to declare/define a variable in a c header?

763






What is the meaning of typedef struct in c?

691


pgm to find number of words starting with capital letters in a file(additional memory usage not allowed)(if a word starting with capital also next letter in word is capital cann't be counted twice)

1959


What is a header file?

726


Write a program to swap two numbers without using the third variable?

694


What is function what are the types of function?

641


What is #define used for in c?

710


What is the use of clrscr?

690


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2337


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

711


Explain how can I read and write comma-delimited text?

780