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

What are the different file extensions involved when programming in C?

1290


Write a program to find factorial of a number using recursive function.

1129


What is the right type to use for boolean values in c? Is there a standard type?

1018


What is bin sh c?

1047


How can I prevent another program from modifying part of a file that I am modifying?

1063


What is formal argument?

1141


What functions are used in dynamic memory allocation in c?

1090


What is the argument of a function in c?

1056


What is function prototype in c with example?

1096


Where is c used?

1101


Can you please explain the difference between strcpy() and memcpy() function?

1078


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.

1950


What is the explanation for modular programming?

1220


Explain how do you use a pointer to a function?

1116


How the c program is executed?

1163