Diff between for loop and while loop?

Answer Posted / keerthana

for loop is executed the condition is satified ..the loop
is executed. ex: n=5 ..the loop is 5 times executed..becoz
the condition is true..otherwise loop is exit.

while loop is executed the condition is true..otherwise
after one time..executed until the condition is false..

Is This Answer Correct ?    15 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a program to rearrange the array such way that all even elements should come first and next come odd

1752


How do we make a global variable accessible across files? Explain the extern keyword?

1414


Is there any demerits of using pointer?

619


What is context in c?

534


write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.

1512






A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor

618


Write the test cases for checking a variable having value in range -10.0 to +10.0?

1813


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

607


the number of measuring units from a arbitrary starting point in a record area or control block to some other point a) branching b) recording pointer c) none d) offset

635


Differentiate between null and void pointers.

625


What does the function toupper() do?

645


Are the expressions * ptr ++ and ++ * ptr same?

660


What is the difference between functions getch() and getche()?

613


Write a program to print numbers from 1 to 100 without using loop in c?

631


What is the mean of function?

642