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 / dasari prasad
Output is 22 21 21 22
Because n printf evaluation starts from last parameter
because of STACK.. so calculate k value from last i.e k=20
and ++k=21 ,k++=21(post incre),k=22.
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Where we use clrscr in c?
What is an operator?
What does d mean?
what do you mean by enumeration constant?
Write a Program to accept different goods with the number, price and date of purchase and display them
Differentiate between calloc and malloc.
Explain how do you override a defined macro?
The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.
which is conditional construct a) if statement b) switch statement c) while/for d) goto
What is struct node in c?
What is the use of pointers in C?
Differentiate between the = symbol and == symbol?
Explain what are the __date__ and __time__ preprocessor commands?
Can a variable be both static and volatile in c?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;