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

22 21 21 20 THIS WILL THE OUTPUT..

this is merely an STACK operation.... here we have 4
parameters.. so the four parameters will be pushed inside
the stack one by one... as

TOP : k
++k
k++
BOTTOM : k

so the expressions will be evaluated from the top.. and thus
the answer....


thank u

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does static variable mean in c?

1086


What do you mean by Recursion Function?

1106


cavium networks written test pattern ..

4065


Explain what is the use of a semicolon (;) at the end of every program statement?

1214


What are the 32 keywords in c?

1076


What is the best way of making my program efficient?

1017


What are the __date__ and __time__ preprocessor commands?

1092


What are local variables c?

991


what are the advanced features of functions a) function declaration and prototypes b) calling functions by value or by reference c) recursion d) all the above

1106


Can math operations be performed on a void pointer?

1033


What is preprocessor with example?

1037


Explain modulus operator. What are the restrictions of a modulus operator?

1001


Why we use int main and void main?

1065


Explain the Difference between the New and Malloc keyword.

1119


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

1083