ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
How would you sort a linked list?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How would you sort a linked list?
Answer
# 1
node *ptr1,*ptr2,*ptr3;
ptr1=start;
ptr2=ptr1->next;
ptr3=ptr2->next;
ptr1->next=NULL;
ptr2->next=ptr1;
while(ptr3!=NULL)
{
 ptr1=ptr2;
 ptr2=ptr3;
 ptr3=ptr3->next;
 ptr2->next=ptr1;
}
start = ptr2;
 
Is This Answer Correct ?    0 Yes 0 No
Prakashdasari
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
Write a C++ program without using any loop (if, for, while etc) to print numbers from 1 to 100 and 100 to 1;  7
a=0; while(a<5) printf("%d\n",a++); how many times does the loop occurs? a.infinite b.5 c.4 d.6 TCS5
where does malloc() function get the memory?  1
for(i=0;i=printf("Hello");i++); printf("Hello"); how many times how will be printed?????????  4
What are the uses of pre-processor directives?  2
Unsigned char c; for ( c=0;c!=256;c++2) printf("%d",c); No. of times the loop is executed ? Mascot3
#include<stdio.h> int SumElement(int *,int); void main(void) { int x[10]; int i=10; for(;i;) { i--; *(x+i)=i; } printf("%d",SumElement(x,10)); } int SumElement(int array[],int size) { int i=0; float sum=0; for(;i<size;i++) sum+=array[i]; return sum; } output? Ramco5
i want to have a program to read a string and print the frequency of each character and it should work in turbo c  2
How can we open a file in Binary mode and Text mode?what is the difference? PanTerra1
Write an implementation of “float stringToFloat(char *str).” The code should be simple, and not require more than the basic operators (if, for, math operators, etc.). • Assumptions • Don’t worry about overflow or underflow • Stop at the 1st invalid character and return the number you have converted till then, if the 1st character is invalid return 0 • Don’t worry about exponential (e.g. 1e10), instead you should treat ‘e’ as an invalid character • Write it like real code, e.g. do error checking • Go though the string only once • Examples • “1.23” should return 1.23 • “1a” should return 1 • “a”should return 0 Qualcomm5
what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means.... TCS1
write a program for even numbers?  8
how to convert binary to decimal and decimal to binary in C lanaguage  4
what is a headerfile?and what will be a program without it explain nan example? Assurgent5
HOW TO HANDLE EXCEPTIONS IN C  5
plz answer..... a program that reads non-negative integer and computes and prints its factorial  2
parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..  4
main() { char *p; p="Hello"; printf("%c\n",*&*p); } ME2
could u able to tell about suresoft technical session  1
what is pointer ? Kernex-Micro-Systems7
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com