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 / vishwanath pillay

The answer will be :-

20, 21, 21, 21

At the start the value is initialized to 20.
since the line:-
printf("%d%d%d%d",k,k++,++k,k);
Answer:-- 20, 21, 21, 21

Is This Answer Correct ?    0 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of this pointer?

1343


How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

2099


What is meant by recursion?

1052


Why is c platform dependent?

1091


What is derived datatype in c?

1099


What is the difference between ++a and a++?

1213


What is the difference between scanf and fscanf?

1268


What is the scope of global variable in c?

998


Explain how do you sort filenames in a directory?

1042


Is it better to use a macro or a function?

1163


What is modifier & how many types of modifiers available in c?

1032


What is main function in c?

1081


Can two or more operators such as and be combined in a single line of program code?

1375


What is function pointer c?

1114


What is the best way to store flag values in a program?

1081