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

The answer should be 22212120
Arguments passed to the printf statement would get executed
from the right to left..
1. k = 20
2. ++k = 21 (Pre Increment)
3. k++ = 21 (Post Increment(k value now is 22))
4. k = 22
Thus the output : 22212120

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

#include { printf("Hello"); } how compile time affects when we add additional header file .

1897


write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.

2105


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

2133


What is page thrashing?

1085


Explain what is a static function?

1113


Why is c fast?

1070


What is hashing in c?

1165


how to write optimum code to divide a 50 digit number with a 25 digit number??

3270


What is a nested loop?

1131


What is the purpose of the statement: strcat (S2, S1)?

1171


Why c is known as a mother language?

1088


What is #error and use of it?

1285


Explain the difference between ++u and u++?

1139


The process of repeatedly running a set of computer instructions until some condition is specifed a) condition b) sequential condition c) global d) iteration

1102


write a program to convert a expression in polish notation(postfix) to inline(normal) something like make 723+* (2+3) x 7 (not sure) just check out its mainly printing expression in postfix form to infix.

3975