how does the for loop work actually..suppose for the
following program how it ll work plz explain to me
for(i=5;i>=0;i--)
prinf(i--);
Answer Posted / manju
The output for the given for loop is
5 3 1.
why because...
first the value of (i=5)>=0,so 5 is printed.After that i
value is decremented because of i-- in the printf() and
again i value is decremented as specified in for loop.
Now the value of i=3.
Again the loop will be continued untill the value of i
becomes 0.
| Is This Answer Correct ? | 15 Yes | 1 No |
Post New Answer View All Answers
If fflush wont work, what can I use to flush input?
Write a code to remove duplicates in a string.
What does the function toupper() do?
Explain modulus operator.
What is an auto keyword in c?
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
Is null a keyword in c?
What is pointers in c?
What is bin sh c?
Write a C program to help a HiFi’s Restaurant automate its breakfast billing system. Your assignment should implement the following items: a. Show the customer the different breakfast items offered by the HiFi’s Restaurant. b. Allow the customer to select more than one item from the menu. c. Calculate and print the bill to the customer. d. Produce a report to present your complete program and show more sample output. Assume that the HiFi’s Restaurant offers the following breakfast menu: Plain Egg $2.50 Bacon and Egg $3.45 Muffin $2.20 French Toast $2.95 Fruit Basket $3.45 Cereal $0.70 Coffee $1.50 Tea $1.80
Is r written in c?
What are the advantages of c language?
Can you please explain the difference between exit() and _exit() function?
Mention four important string handling functions in c languages .
What are the types of functions in c?