Which of the Following will define a type NODE that is a
node in a Linked list?
A)struct node {NODE*next;int x;};type def struct node NODE;
B)typedef struct NODE {struct NODE *next;int x;};
C)typedef struct NODE {NODE *next;int x;};
D)typedef struct {NODE *next;int x;}NODE;

Answers were Sorted based on User's Feedback



Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NO..

Answer / shahzad

B)
coz ..linked list node contain two parts ..
one is address to next node
other is data part in single list....
writting keyword struct before NODE is must..

Is This Answer Correct ?    4 Yes 0 No

Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NO..

Answer / gorgeousgirl

all the four given options throws error...

the correct answer should be:

typedef struct node NODE;
struct node {NODE*next;int x;};

Is This Answer Correct ?    4 Yes 0 No

Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NO..

Answer / santhoo035

d)

Is This Answer Correct ?    4 Yes 1 No

Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NO..

Answer / ashwin kumar

Shahzad is correct


next node must be like a 1st node means it must have two
fields one for two store data and another field for
storing address of the next node.

in 2nd field where we have point to the next node we must
store address of the next node , so we are using pointer ,
as we are pointing to a next node of type structure so we
must use

struct NODE *next



plz info me if any mistake in my answer

molugu.ashwin@gmail.com

Is This Answer Correct ?    2 Yes 0 No

Which of the Following will define a type NODE that is a node in a Linked list? A)struct node {NO..

Answer / vikraman85

B is the answer..
b'coz in struct node *next only specify the address of the
next node.. others not..

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More C Interview Questions

What are terms in math?

0 Answers  


What is structure in c language?

0 Answers  


any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above

0 Answers  


Can we add pointers together?

0 Answers  


Name the language in which the compiler of "c" in written?

3 Answers   Bajaj,


What is wrong in this statement? scanf(“%d”,whatnumber);

0 Answers  


if array a conatins 'n' elements and array b conatins 'n-1' elements.array b has all element which are present in array a but one element is missing in array b. find that element.

18 Answers   Parexel, Ram Infotech, Zycus Infotech,


main() { printf("\n %d %d %d",sizeof('3'),sizeof("3"),sizeof(3)); }

6 Answers  


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

0 Answers  


What are the types of data structures in c?

0 Answers  


What is the difference between constant pointer and constant variable?

0 Answers   NIIT,


pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)

0 Answers   Huawei,


Categories