0 0 0 gives segmentation fault , what is the output supposed to be?


#1

0
0
0
gives segmentation fault , what is the output supposed to be??


#2

Anybody knows answer to this ??? I am getting the same error.


#3

My code is running OK in case of 0 0 0 ,most probably you are accessing the memory that is not allotted to the program. I mean may be you accessing the next node of NULL at last of the list (in the function for finding length).


#4

just add the condition if either of the A and B are NULL so return NULL