GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Placement Papers  >  TCS  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 11 of 87    Print  
Which of the following is not an infinite loop ?
a.while(1){
....
}
b.for(;;){
...
}
c.x=0;
do{
/*x unaltered within the loop*/
...
}while(x==0);
d.# define TRUE 0
while(TRUE){
....
}
D



  
Total Answers and Comments: 2 Last Update: September 25, 2007   
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 10, 2006 16:20:59   #1  
laxmikanth        

RE: Which of the following is not an infinite loop ?

ans is d.

we have defined true as 0 in macro.so where ever True is there 0 will be substituted.while(0) is not an infinite loop where as while(1) is an infinite loop.


 
Is this answer useful? Yes | No
September 25, 2007 03:17:51   #2  
poornima        

RE: Which of the following is not an infinite loop ?
D is the right answer.
 
Is this answer useful? Yes | No

 Related Questions

What is true about the followingC Functionsa.Need not return any valueb.Should always return an integerc.Should always return a floatd.Should always return more than one value.

Which of the following represents true statementeither x is inthe range of 10 and 50 or y is zeroa.x>=10 && x<=50 || y==0;b.c.d.

Which of the following is not an infinite loop ?a.while(1){....}b.for(;;){...}c.x=0;do{/*x unaltered within the loop*/...}while(x==0);d.# define TRUE 0while(TRUE){....}

Read the folllowing code# define MAX 100# define MIN 100........if(x>MAX)x=1;else if(x

Latest Answer : answer is 5 times ...

What is incorrect among teh followingA recursive functiiona.calls itselfb.is equivalent to a loopc.has a termination condd.does not have a return value at all

# define prod(a,b)=a*bmain(){int x=2;int y=3;printf("%d",prod(x+2,y-10)); }the output of the program is a.8b.6c.7d.none

What is true about the following C FunctionsA. Need not return any valueB. Should always return an integerC. Should always return a floatD. Should always return more than one value

Which of the following represents true statement either x is in the range of 10 and 50 or y is zeroA. x >= 10 && x <= 50 || y = = 0B. x<50C. y!=10 && x>=50D. None of these

Which of the following is not an infinite loop?A. while(1){ ....}B. for(;;){...}C. x=0;       do{ /*x unaltered within the loop*/       .....}while(x = = 0);D. # define TRUE 0     ...     while(TRUE){ ....}


 Sponsored Links

 
Related Articles

How to achieve looping in C++

How to achieve looping in C In object oriented programming language whenever a block of statements has to be repeated a certain number of times or repeated until a condition becomes satisfied the concept of looping is used mosgoogle center The following commands used in C for achieving looping for
 

How to define command line arguments

The main functions can have arguments passed which are called as command line arguments. There are two command line arguments: Argument count denoted by argc and Argument vector denoted by argv The argc is an integer variable which denotes the number of parameters passed and argv is pointer to a
 

Tried and True Resume Writing Rules

You can have all the experience, personality, and credentials you need to land the best jobs in any area of the world, but if you don&rsquo;t know how to put them onto paper in the form of a resume, you may be unemployed. Writing a resume isn&rsquo;t as simple as scribbling down your past ex
 

PHP Tutorials - Loops

PHP Tutorials Loops In this PHP Tutorial you will learn about Loops while loop do while loop and the&nbsp; for loop along with syntax and sample PHP loop codes mosgoogle while loop A while statement executes a code block until a condition is set Example php x 3; Category
 

C Programming - Decision Making - Looping

C Programming Decision Making Looping In this tutorial you will learn about C Programming Decision Making Looping The While Statement The Do while statement The Break Statement Continue statement and For Loop mosgoogle During looping a set of statements are executed until some conditions for termina
 

Tried and True Resume Writing Rules

Tried and True Resume Writing Rules You can have all the experience personality and credentials you need to land the best jobs in any area of the world but if you don&rsquo; t know how to put them onto paper in the form of a resume you may be unemployed mosgoogle Writing a resume isn&rsquo;
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape