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 does printf does?

1321


Here is a neat trick for checking whether two strings are equal

1074


What do you mean by Recursion Function?

1179


Which header file is used for clrscr?

1108


Can a void pointer point to a function?

1080


Can you write the function prototype, definition and mention the other requirements.

1198


Why can’t we compare structures?

1325


What are identifiers c?

1142


I need a help with a program: Write a C program that uses data input in determining the whole of points A and a whole of circles B. Find two points in A so that the line which passes through them, cut through the maximum number of circles.

1994


What does it mean when the linker says that _end is undefined?

1148


ATM machine and railway reservation class/object diagram

5310


What is the difference between far and near in c?

1121


What is pointer in c?

1252


Explain bitwise shift operators?

1317


Explain what are multidimensional arrays?

1122