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 / sunil
answer is
22 21 21 20
printf .. executes from left hand side..
so first ..
printf("$d %d %d %d",k,K++,++k,k);
4.last k ie; 20
3.++k (pre) : 21
2.k++ (post) : 21 and then increamented
1.k : 22
answer is : 22 21 21 20
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is time null in c?
What are global variables and explain how do you declare them?
How can I change the size of the dynamically allocated array?
shorting algorithmS
What is main function in c?
Why can’t constant values be used to define an array’s initial size?
What is gets() function?
What is a constant?
What is the difference between class and object in c?
Explain the use of keyword 'register' with respect to variables.
what is reason of your company position's in india no. 1.
will u please send me the placement papers to my mail???????????????????
What is #line used for?
Tell me the use of bit field in c language?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.