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

Is c weakly typed?

972


How can I check whether a file exists? I want to warn the user if a requested input file is missing.

1087


How many loops are there in c?

1049


How can you determine the size of an allocated portion of memory?

1241


What is the use of f in c?

936


What is the default value of local and global variables in c?

986


Explain what are its uses in c programming?

1020


Where are local variables stored in c?

985


Write a program for finding factorial of a number.

1035


Explain what are the different data types in c?

1162


How can I ensure that integer arithmetic doesnt overflow?

1086


What is c language used for?

929


When should a type cast be used?

968


program to find out date after adding 31 days to a date in the month of febraury also consider the leap year

3023


Is c# a good language?

964