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 / dasari prasad

Output is 22 21 21 22

Because n printf evaluation starts from last parameter
because of STACK.. so calculate k value from last i.e k=20
and ++k=21 ,k++=21(post incre),k=22.

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does sizeof return c?

1130


How the c program is executed?

1198


Is c still relevant?

1138


write a program to find the given number is prime or not

4844


How many types of operator or there in c?

1137


Why double pointer is used in c?

1090


Explain how do you list files in a directory?

1115


Explain heap and queue.

1143


What is the scope of an external variable in c?

1097


What does %c do in c?

1051


What is nested structure?

1097


Explain the binary height balanced tree?

1237


What is sizeof int?

1153


What are the advantages of Macro over function?

2096


typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?

1689