GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  Programming  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 28 of 99    Print  
should the code below keep grabbing more resources as a variable is declared inside a while loop?
while(1)
{
int i = 10;
while(--i);
}
How does a while loop exactly work? can any explain me the same?

  
Total Answers and Comments: 1 Last Update: February 16, 2007     Asked by: chandan1008 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
February 16, 2007 13:46:03   #1  
fcawad_03 Member Since: October 2006   Contribution: 9    

RE: should the code below keep grabbing more resources...
General Formate of While Loop::While(Condition){ Statement; Statement;}while Loop take a terminating condition....if the conditon satisfy..then it allow to execute statement otherwise terminate the loop...
 
Is this answer useful? Yes | No

 Related Questions

Q1. write a program to find a given number is armstrong number or not ?Q2write a program which accepts a filename as a command line argument and reverse the contents of the file(i.e first character becomes the last character of the file and so on ?Q3 how can i call a function given its name as a string ?Q4 How to swap low-order byte and high order byte in an integer without using temporary variable?Q5 If we develop a project in C, then how can we create an .exe file of it?Q6 how to print 1 to 100
please let me know the answers to my email address as i having the interview in TCS so please please please please let me know  
Read Answers (16) | Asked by : M.srilatha

Q1 How to swap Low-order byte and high order byte in an integer without using temporary variable ?Q2 write a program to print numbers from 1 to 100 without using any condition checking ?Q3 If we develop a project in C,then how can we create an .exe file of it?Q4 Write a program which accepts a filename as a command like argument and reverse the contents of the file (i.e firs character becomesthe last character of the file and so on)input: the program takes the file name whose content should be
Read Answers (7) | Asked by : M.srilatha

Char str[]="DOLLAR";Here , you have the base address of array i.e. str.By using only one pointer variable, you have to replace the occurrence of 'L' with '$$'. (after replacement, it should be DO$$$$AR)can any body suggest efficient method?
Read Answers (2) | Asked by : pavan kumar reddy
Tags : Pointer

Latest Answer : There is no need of declaring the function main() as it is already known to compiler .main() is a function from where the execution starts. ...
Read Answers (1) | Asked by : Richa

View Question | Asked by : umesh

Latest Answer : Because it takes single line for initialization,condition check and incremention. in While loop default statement is not possible which is in for while statement must contain conditional statement which may not required in for semicolan after whie statement ...
Read Answers (3) | Asked by : j_priyaa

Should the code below keep grabbing more resources as a variable is declared inside a while loop?while(1){int i = 10;while(--i);}How does a while loop exactly work? can any explain me the same?

Given specification: if (x >2) then print 2*x; else print 2+x, where x is an integer variable. From the perspective of blackbox testing, discuss whether the following implementation is faulty if (x>=2) print (2*x) ;else print (2+x);
View Question | Asked by : northwest

int *ptr = (int *)malloc(100*(sizeof(int)));ptr++;free(ptr); 
Latest Answer : it will allocate 200 bytes of memory and returns pointer to the first location...correct me if iam wrongregardsumesh ...

View Question | Asked by : P. Mukherjee


 Sponsored Links

 
Related Articles

Accessing Repository Resources with SQL

Accessing Repository Resources with SQL In fact Oracle XML DB repository resources are stored in a set of database tables and indexes which can be accessed via SQL You are not supposed to access those tables directly Instead Oracle XML DB provides two public views RESOURCE VIEW and PATH VIEW through
 

Performing XSLT Transformations inside the Database

Performing XSLT Transformations inside the Database Now that you have the employees XSL stylesheet stored in the database and the xmlusr schema is permitted to access the hr employees table you can create a script that will instruct the database to build an HTML page based on the data stored in hr e
 

Performing XML Processing inside the Database

Performing XML Processing inside the Database When building XML enabled applications on top of Oracle there are many advantages to performing the XML processing inside the database when compared to performing it on the client The key advantages to perform XML processing inside the database are as fo
 

jQuery Table Row Finished Code

jQuery Table Row Finished Code The Finished Code Our second example page has demonstrated table row striping highlighting tooltips collapsing expanding and filtering Taken together the JavaScript code for this page is mosgoogle geshibot lang php" document ready function var highlighted
 

jQuery Interacting with Other Code

jQuery Interacting with Other Code We learned with our sorting and paging code that we can t treat the various features we write as islands The behaviors we build can interact in sometimes surprising ways; for this reason it is worth revisiting our earlier efforts to examine how they coexist with t
 

jQuery Completed sorting and paging code

Learning jQuery The Finished Code The completed sorting and paging code in its entirety follows mosgoogle geshibot lang php" fn alternateRowColors function tbody tr odd this removeClass even addClass odd ; tbody tr even this removeClass odd addClass even ; return this; ; document
 

How EDI work with XML

How EDI work with XML EDI and XML systems have been seen as the opportunity to create a holistic approach to data information exchange that can deliver and process simple durable and effective business transactions by electronic means To achieve this methods must be employed that are not only of val
 

code

geshibot lang javascript" head This is a JS snippet from Geshi Bot" Replaces the geshi default classes with mambo joomla classes function replaceGeshiWithMamboClasses if document document getElementsByTagName Category
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

ERP Human Resources: The Key for Success

ERP Human Resources The Key for Success The intense competitiveness in the global markets demand an improvement in the results In this context it is critical of the management of human resources The concept of Human Resources as a cost generator has to change into a profits generator mosgoogle cente
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape