Is the following code legal?

typedef struct a aType;

struct a

{

int x;

aType *b;

};



Is the following code legal? typedef struct a aType; struct a { ..

Answer / susie

Answer :

Yes

Explanation:

The typename aType is known at the point of declaring the
structure, because it is already typedefined.

Is This Answer Correct ?    4 Yes 0 No

Post New Answer

More C Code Interview Questions

what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);

2 Answers  


write a program in c language to get the value of arroy keys pressed and display the message which arrow key is pressed?

1 Answers  


Cluster head selection in Wireless Sensor Network using C programming language.

0 Answers  


main() { int c=- -2; printf("c=%d",c); }

1 Answers   TCS,


const int perplexed = 2; #define perplexed 3 main() { #ifdef perplexed #undef perplexed #define perplexed 4 #endif printf("%d",perplexed); } a. 0 b. 2 c. 4 d. none of the above

1 Answers   emc2, HCL,






To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates.

19 Answers   Amazon, BITS, Microsoft, Syncfusion, Synergy, Vector,


Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)

7 Answers   Microsoft,


Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?

0 Answers   Honeywell,


Give a oneline C expression to test whether a number is a power of 2?

25 Answers   EA Electronic Arts, Google, Motorola,


find simple interest & compund interest

2 Answers  


char *someFun() { char *temp = “string constant"; return temp; } int main() { puts(someFun()); }

1 Answers  


how to create a 3x3 two dimensional array that will give you the sums on the left and bottom columns

0 Answers  


Categories