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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain is it valid to address one element beyond the end of an array?

736


How to declare pointer variables?

686


Which driver is a pure java driver

993


What are the types of variables in c?

578


how could explain about job profile

1451






Do character constants represent numerical values?

844


What is function prototype in c language?

614


What is the right type to use for boolean values in c? Is there a standard type?

564


What are the types of macro formats?

606


Where in memory are my variables stored?

637


Tell me the use of bit field in c language?

629


Write a program to implement queue.

666


Why is c called c?

627


Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?

577


What does. int *x[](); means ?

636