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

Answers were Sorted based on User's Feedback



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

Answer / raghu

no this code is illegal.

legal one:

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

Is This Answer Correct ?    26 Yes 7 No

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

Answer / siva

This code is illegal.

Is This Answer Correct ?    10 Yes 2 No

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

Answer / preeti

no. It is illegal ..
Struct shd be ended by a semi colon ..

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

Is This Answer Correct ?    8 Yes 2 No

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

Answer / dilpreet

yes, it is nested structure

Is This Answer Correct ?    6 Yes 5 No

Post New Answer

More C Interview Questions

how to devloped c lenguege?

4 Answers  


write a c program to find reminder and quotient if one number is divided by other.to code this program don't use more than 2 variables

2 Answers   TCS,


What is the use of volatile?

0 Answers  


How can I get back to the interactive keyboard if stdin is redirected?

0 Answers  


size maximum allocated by calloc()

3 Answers   DELL,






What is the difference between a function and a method in c?

0 Answers  


Define recursion in c.

0 Answers  


What is console in c language?

0 Answers  


WHAT IS THE DIFFERENCE BETWEEN malloc() and calloc() in c file management?

28 Answers   3D PLM, Code Studio, Deltech, IBM,


What is c system32 taskhostw exe?

0 Answers  


What are Macros? What are its advantages and disadvantages?

0 Answers   TCS,


Write a C program on Centralized OLTP, Decentralized OLTP using locking mechanism, Semaphore using locking mechanism, Shared memory, message queues, channel of communication, sockets and a simple program on Saving bank application program using OLTP in IPC?

0 Answers  


Categories