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 is 'bus error'?

1164


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

2214


What is the role of this pointer?

1080


What is the difference between far and near in c?

1079


What is difference between class and structure?

1127


What is #line?

1070


What is a program flowchart and how does it help in writing a program?

1154


What is pointer & why it is used?

1131


Why is void main used?

1105


Explain two-dimensional array.

1089


How many types of sorting are there in c?

1067


What does c mean before a date?

1196


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

2049


What are the types of arrays in c?

1187


Why c is called procedure oriented language?

1062