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;

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is malloc() function?

642


Explain data types & how many data types supported by c?

588


What is the use of bit field?

650


Why isnt there a numbered, multi-level break statement to break out

595


What does nil mean in c?

676






State two uses of pointers in C?

644


Describe the complexity of Binary search, Quicksort and various other sorting and searching techniques..

653


Can you return null in c?

603


If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?

783


What language is c written?

583


What is wrong in this statement? scanf(ā€œ%dā€,whatnumber);

731


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1191


What is difference between array and structure in c?

585


What are the advantages of external class?

598


Where define directive used?

611