Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / puja

THE ANSWER WILL BE
20 20 22 22
BECAUSE THE FIRST VALUE IS K=20 THEN IT WILL BE THE SAME
20 DUE TO K++, NOW THE VALUE WILL BE INCREMENTED & WILL BE
21, THEN ++K, MEANS THE VALUE WILL BE +1 THEN IT WILL BE 22
& LAST K WILL BE SAME 22.

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between north western polytechnique university and your applied colleges?? please give ur answers for this. :)

2341


What is 1f in c?

2569


How do you list a file’s date and time?

1020


What is identifier in c?

963


Explain what will the preprocessor do for a program?

1003


Explain about the functions strcat() and strcmp()?

989


main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }

1446


Write a C program in Fibonacci series.

1045


Why do we use static in c?

1064


explain how do you use macro?

1098


What is the acronym for ansi?

997


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5893


How can my program discover the complete pathname to the executable from which it was invoked?

1033


Is c++ based on c?

1021


the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above

1196