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...


program to Reverse a linked list

Answers were Sorted based on User's Feedback



program to Reverse a linked list..

Answer / vikram singh saini

Here is the link:
http://niitdeveloper.blogspot.com/2010/12/accept-integers-print-in-reverse-order.html

This code accepts integers or numbers from user and print
them in reverse order using linkedlist.

Is This Answer Correct ?    6 Yes 12 No

program to Reverse a linked list..

Answer / shruthirap

node *reverse(node *first)
{
node *temp = NULL;

if(first->next != NULL)
{
temp = reverse(first->next);
temp->next = first;
return first;
}
else
return first;
}
//The only catch is that the supposed to be first node after
reordering, has to be kept either in some global pointer or
passed back by function. That's it :)

Is This Answer Correct ?    16 Yes 36 No

Post New Answer

More C Code Interview Questions

why the range of an unsigned integer is double almost than the signed integer.

1 Answers  


C statement to copy a string without using loop and library function..

2 Answers   Persistent, TCS,


Write a program using one dimensional array to assign values and then display it on the screen. Use the formula a[i]=i*10 to assign value to an element.

1 Answers   Samar State University,


why is printf("%d %d %d",i++,--i,i--);

4 Answers   Apple, Cynity, TCS,


why do you use macros? Explain a situation where you had to incorporate macros in your proc report? use a simple instream data example with code ?

0 Answers  


main() { char a[4]="HELL"; printf("%s",a); }

3 Answers   Wipro,


#include"math.h" void main() { printf("Hi everybody"); } if <stdio.h> will be included then this program will must compile, but as we know that when we include a header file in "" then any system defined function find its defination from all the directrives. So is this code of segment will compile? If no then why?

2 Answers  


Write a C function to search a number in the given list of numbers. donot use printf and scanf

5 Answers   Honeywell, TCS,


Cluster head selection in Wireless Sensor Network using C programming language.

0 Answers  


how to concatenate the two strings

1 Answers  


How we print the table of 3 using for loop in c programing?

7 Answers  


Implement a t9 mobile dictionary. (Give code with explanation )

1 Answers   Amazon, Peak6, Yahoo,


Categories