Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

application attempts to perform an operation?

1959


What should malloc() do? Return a null pointer or a pointer to 0 bytes?

1057


Add Two Numbers Without Using the Addition Operator

806


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1127


How do I convert a string to all upper or lower case?

1093


What is sorting in c plus plus?

959


Who is the founder of c language?

1148


Do you know what are bitwise shift operators in c programming?

1090


When is a “switch” statement preferable over an “if” statement?

1131


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.

2738


Write a program to compute the similarity between two strings - The program should get the two strings as input - Then it will output one single number which is the percentage of similarity between the two strings

2741


What is the use of #define preprocessor in c?

1055


Explain how do I determine whether a character is numeric, alphabetic, and so on?

1124


Why we use conio h in c?

1198


why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above

1109