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

20 20 22 22
solution

1) k corresponds to 20 20
2) k++ corresponds to k = k then k+1 20

after assignment k becomes 21

3) ++k corresponds to k + 1 then k = k 22
4) k corresponds to k 22

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain can you assign a different address to an array tag?

1017


Differentiate fundamental data types and derived data types in C.

987


How many levels deep can include files be nested?

1104


What is selection sort in c?

1021


What is a protocol in c?

951


What is the difference between array and pointer?

969


What is function and its example?

1114


program to find error in linklist.(i.e find whether any node point wrongly to previous nodes instead of next node)

2048


write a c program in such a way that if we enter the today date the output should be next day's date.

2140


How can you return multiple values from a function?

1054


Explain how can you tell whether two strings are the same?

973


HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????

2641


What are the types of i/o functions?

1256


How can I display a percentage-done indication that updates itself in place, or show one of those twirling baton progress indicators?

975


What are the data types present in c?

1093