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
What are static variables in c?
Write a program to print fibonacci series using recursion?
What tq means in chat?
Which is better pointer or array?
What is p in text message?
What are # preprocessor operator in c?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
Give differences between - new and malloc() , delete and free() ?
What is exit() function?
What are header files? What are their uses?
Is printf a keyword?
What are keywords in c with examples?
Explain the difference between null pointer and void pointer.
What is a loop?
What does return 1 means in c?