WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW
IT COME ..
#include<stdio.h>
#include<conio.h>
void main()
{
int k=20;
printf("%d%d%d%d",k,k++,++k,k);
getch();
}
Answer Posted / rajadurai thangaraj
22 21 22 22
stack execution:-
4 ->printf k now k=22
3 ->printf 21 k=k+1 now k=22, k of 1&2 also 22
2 ->k=k+1 printf k now k=21, k of 1 also 21
1 ->printf k now k=20
Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Does c have circular shift operators?
How can I get back to the interactive keyboard if stdin is redirected?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
Function calling procedures? and their differences? Why should one go for Call by Reference?
A c program to display count values from 0 to 100 and flash each digit for a secong.reset the counter after it reaches 100.use for loop,. pls guys hepl me.. :(
What is a macro, and explain how do you use it?
How to get string length of given string in c?
GIven a sequence of characters. How will you convert the lower case characters to upper case characters. ( Try using bit vector - sol given in the C lib -> typec.h)
What does 1f stand for?
What is a struct c#?
What is the meaning of 2d in 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
What is spaghetti programming?
Can a program have two main functions?
Process by which one bit pattern in to another by bit wise operation is?