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
What is return type in c?
the question is that what you have been doing all these periods (one year gap)
A function can make the value of a variable available to another by a) declaring the variable as global variable b) Passing the variable as a parameter to the second function c) Either of the two methods in (A) and (B) d) binary stream
explain what is a newline escape sequence?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
Why is c called a structured programming language?
What are the different types of constants?
What is this pointer in c plus plus?
write a program to generate address labels using structures?
design and implement a data structure and performs the following operation with the help of file (included 1000 student marks in 5 sub. and %also) 1.how many students are fail in all 5 subjects (if >35) 2. delete all student data those are fail in all 5 subjects. 3. update the grace marks (5 no. if exam paper is 100 marks) 4. arrange the student data in ascending order basis of marks. 5.insert double of deleted students with marks in the list.
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
i have a written test for microland please give me test pattern
Array is an lvalue or not?
Why do we use c for the speed of light?
What are the benefits of c language?