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 the importance of c in your views?
write a programming in c to find the sum of all elements in an array through function.
What is data type long in c?
Explain what math functions are available for integers? For floating point?
how to execute a program using if else condition and the output should enter number and the number is odd only...
Write a program that takes a 5 digit number and calculates 2 power that number and prints it(should not use big integers and exponential functions)
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
Tell me about low level programming languages.
How does sizeof know array size?
How do I use strcmp?
What are the types of bitwise operator?
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
What are multibyte characters?
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
How is = symbol different from == symbol in c programming?