what is the difference between while and do while?
Answers were Sorted based on User's Feedback
Answer / jithender palle
In while case first execute the condition then ++/--,
In do while first ++/-- then condition execute
| Is This Answer Correct ? | 9 Yes | 0 No |
Answer / bhairavi
in while loop first condition is checked & then ++/-- is
done, in do while first whatever the condition given loop
execute atleast once ie.if i=0 the condition is while
(i<=0), i++ then also in do while loop i will increment
first & then it will check the condition so final value of
i will be 1
| Is This Answer Correct ? | 3 Yes | 0 No |
How to reverse a string using a recursive function, without swapping or using an extra memory?
31 Answers Cisco, Mind Tree, Motorola, Ophio, Sony, TCS, Wipro,
What are the types of macro formats?
#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); }
How many types of errors are there in c language? Explain
How do we open a binary file in Read/Write mode in C?
IS Doon college of Engn.. has good faculty
What is the collection of communication lines and routers called?
Explain a file operation in C with an example.
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
what is the return type of printf
why arithmetic operation can’t be performed on a void pointer?
what is unsigened char and what is the difference from char