Can you tell me how to check whether a linked list is circular?



Can you tell me how to check whether a linked list is circular?..

Answer / hrpynux@gmail.com

If any node seems to be pointing towards the head or starting node then the linked list is circular. If no node is pointing to null.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****

2 Answers  


What are the types of assignment statements?

0 Answers  


what will be the result of the following program ? char *gxxx() { static char xxx[1024]; return xxx; } main() { char *g="string"; strcpy(gxxx(),g); g = gxxx(); strcpy(g,"oldstring"); printf("The string is : %s",gxxx()); } a) The string is : string b) The string is :Oldstring c) Run time error/Core dump d) Syntax error during compilation e) None of these

2 Answers   IBM,


Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We Are Student “ Output: "We Are Student"

1 Answers  


write a c programming using command line argument,demonstrate set operation(eg;union,intersection,difference) example output is c:>setop 12 34 45 1 union 34 42 66 c:>setop 12 34 1 42 66 c:>setop 12 34 diff 12 56 67 78 setop 12 34

0 Answers  






Process by which one bit pattern in to another by bit wise operation is?

0 Answers   InterGraph,


Why static variable is used in c?

0 Answers  


What are the advantages of using Unions?

0 Answers   IBS,


Differentiate between #include<...> and #include '...'

0 Answers  


Is null a keyword in c?

0 Answers  


Place the #include statement must be written in the program?

0 Answers  


what is the c source code for the below output? 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1

0 Answers  


Categories