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

Difference between for loop and while loop?

Answer Posted / dev yadav

in for loop we should know initial &last condition.....but in while loop we only know the last condition....
ex. of for loop..for(i=0;i<=10;i++){
printf("%d",i);
}
ex. of while loop..while(i<=10){
printf("%d",i);
i++;
}

Is This Answer Correct ?    10 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of header files?

1100


provide an example of the Group by clause, when would you use this clause

2186


How can I recover the file name given an open stream?

1004


There seem to be a few missing operators ..

1046


PROGRAM TO WRITE CONTENTS OF 1 FILE IN REVERSE TO ANOTHER FILE,PROGRAM TO COPY 1 FILE TO ANOTHER BY SPECIFYING FILE NAMES AS COMMAND LINE

2014


What is difference between constant pointer and constant variable?

1296


How important is structure in life?

1082


Who is the main contributor in designing the c language after dennis ritchie?

997


What are the advantage of c language?

1049


the question is that what you have been doing all these periods (one year gap)

2077


Can you subtract pointers from each other? Why would you?

957


Can we replace the struct function in tree syntax with a union?

1302


1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?

2458


how can f be used for both float and double arguments in printf? Are not they different types?

1060


What is the most efficient way to store flag values?

1181