Is the following code legal?

typedef struct a

{

int x;

aType *b;

}aType



Is the following code legal? typedef struct a { int x; aTy..

Answer / susie

Answer :

No

Explanation:

The typename aType is not known at the point of declaring
the structure (forward references are not made for typedefs).

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Code Interview Questions

To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

1 Answers  


void main() { int const * p=5; printf("%d",++(*p)); }

3 Answers   Infosys, Made Easy, State Bank Of India SBI,


how to concatenate the two strings

1 Answers  


Write a program that reads a dynamic array of 40 integers and displays only even integers

2 Answers  


Program to Delete an element from a doubly linked list.

4 Answers   College School Exams Tests, Infosys,


#define a 10 int main() { printf("%d..",a); foo(); printf("%d..",a); return 0; } void foo() { #undef a #define a 50 }

3 Answers  


What is your nationality?

1 Answers   GoDB Tech,


main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }

1 Answers  


how can i search an element in an array

2 Answers   CTS, Microsoft, ViPrak,


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"); }

1 Answers  


#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE"); }

1 Answers  


how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.

19 Answers   Cap Gemini, Infosys,


Categories