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                      
tip   SiteMap shows list of All Categories in this site.
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
Which of the following is not an infinite loop ?
   a.while(1){
     ....
     }
   b.for(;;){
     ...
     }
   c.x=0;
     do{
     /*x unaltered within theloop*/
     ...
     }while(x==0);
   d.# define TRUE 0
     ...
     while(TRUE){
     ....
     }
 Question Submitted By :: Manju
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
Answer
# 1
d
 
Is This Answer Correct ?    12 Yes 0 No
Deepa
 
  Re: Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
Answer
# 2
ya deepa is ryt.
true here equals zero...which is false.
so the correct answer is D.
 
Is This Answer Correct ?    6 Yes 0 No
Krishna Kumar
 
 
 
  Re: Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
Answer
# 3
a.

while (1) is an infinite loop..
 
Is This Answer Correct ?    1 Yes 4 No
Shruti
 
  Re: Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
Answer
# 4
it's 'b'
becoz  for for loop we initialise atleast one statement
 
Is This Answer Correct ?    0 Yes 7 No
Vaibhav
 
  Re: Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
Answer
# 5
yes.. deepa is right.. all are infinite loops except d. so d
is the answer
 
Is This Answer Correct ?    0 Yes 0 No
Balu
 
  Re: Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
Answer
# 6
its d.
 
Is This Answer Correct ?    0 Yes 0 No
Ramya
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
what about "char *(*(*a[])())();" Oracle2
if a five digit number is input through the keyboard, write a program to calculate the sum of its digits. (hint:-use the modulus operator.'%')  14
Write a program in c to input a 5 digit number and print it in words.  3
How to avoid structure padding in C? Tech-Mahindra5
write a program to find the frequency of a number  1
Design a program using an array that searches a number if it is found on the list of the given input numbers and locate its exact location in the list.  4
What's wrong with "char *p = malloc(10);" ?  4
write a “Hello World” program in “c” without using a semicolon? CTS6
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
Find the middle node in the linked list?? (Note:Do not use for loop, count and count/2) Subex5
write a c program for print your name .but,your name may be small letter mean print a capital letter or your name may be capital letter mean print a small letter .example \\enter ur name : sankar The name is: SANKAR (or) enter your name:SAnkar The name is:saNKAR IBM2
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }  3
why TCS selected more student in the software field from all institution. TCS4
consider the following program sigment int n,sum=1; switch(n) { case 2:sum=sum+2; case 3:sum*=2; break; default:sum=0;} if n=2, what is the value of sum a.0 b.6 c.3 d.none TCS5
What is the difference between null pointer and the void pointer?  2
What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }  2
Give a fast way to multiply a number by 7 Microsoft12
What is the difference between null pointer and void pointer CTS4
5. What kind of sorting is this: SORT (k,n) 1.[Loop on I Index] repeat thru step2 for i=1,2,........n-1 2.[For each pass,get small value] min=i; repeat for j=i+1 to N do { if K[j]<k[min] min=j; } temp=K[i];K[i]=K[min];K[min]=temp; 3.[Sorted Values will be returned] A)Bubble Sort B)Quick Sort C)Selection Sort D)Merge Sort Accenture2
what is data structure? CBSE4
 
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 © 2009  ALLInterview.com.  All Rights Reserved.

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