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 / vishwanath pillay
The answer will be :-
20, 21, 21, 21
At the start the value is initialized to 20.
since the line:-
printf("%d%d%d%d",k,k++,++k,k);
Answer:-- 20, 21, 21, 21
Is This Answer Correct ? | 0 Yes | 11 No |
Post New Answer View All Answers
Write a program to generate random numbers in c?
How can I recover the file name given an open stream or file descriptor?
Explain what are global variables and explain how do you declare them?
What are pointers? Why are they used?
What are the different types of control structures in programming?
Write programs for String Reversal & Palindrome check
What is strcmp in c?
Can include files be nested? How many levels deep can include files be nested?
What is ponter?
Explain the difference between structs and unions in c?
How can I write a function that takes a format string and a variable number of arguments?
why wipro wase
What is main function in c?
Whats s or c mean?
Explain what is the use of a semicolon (;) at the end of every program statement?