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
How we can insert comments in a c program?
What is the correct code to have following output in c using nested for loop?
What are the types of data files?
What are the different types of data structures in c?
Is c call by value?
Explain the Difference between the New and Malloc keyword.
What is time complexity c?
How is a null pointer different from a dangling pointer?
find the value of y y = 1.5x+3 for x<=2 y = 2x+5 for x>2
Are bit fields portable?
Why do we use int main?
What is operator precedence?
Differentiate call by value and call by reference?
What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?
What is the return type of sizeof?