Go through this linked list concept.While traversing through
the singly linked list sometimes the following code snippet
"while(head != NULL)" is used and other times
"while(head->link != NULL)"is used(Here head is the pointer
pointing to the first node,node has two parts data part and
link part).What is the difference between head != NULL and
Head->link != NULL and in which situation are they used?
Answer Posted / hari
When you want to check the value of the first node or before
traversing the node, we have to check whether head node is
available in the Linked list, those times, the "head !=
NULL" will be checked.
While traversing, whether the next node is available or to
verify the current node is last node, those times, we used
to check head->link != NULL.
Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
c programs are converted into machine language with the help of a) an interpreter b) a compiler c) an operatinf system d) none of the above
What is meant by keywords in c?
Difference between goto, long jmp() and setjmp()?
How many keywords (reserve words) are in c?
Why do we use & in c?
What does typedef struct mean?
Differentiate between calloc and malloc.
7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.
Explain how do you use a pointer to a function?
The difference between printf and fprintf is ?
Calculate 1*2*3*____*n using recursive function??
I need testPalindrome and removeSpace
#include
Explain how can a program be made to print the line number where an error occurs?
Can we change the value of static variable in c?
code for replace tabs with equivalent number of blanks