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 / 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 |
What is a static function in c?
How to set a variable in the environment list?
What is the use of linkage in c language?
Explain data types & how many data types supported by c?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Add Two Numbers Without Using the Addition Operator
How will you declare an array of three function pointers where each function receives two ints and returns a float?
Can you explain what keyboard debouncing is, and where and why we us it? please give some examples
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
What is volatile variable in c with example?
What are dangling pointers in c?
How do you sort filenames in a directory?