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 / rajadurai thangaraj

22 21 22 22

stack execution:-

4 ->printf k now k=22
3 ->printf 21 k=k+1 now k=22, k of 1&2 also 22
2 ->k=k+1 printf k now k=21, k of 1 also 21
1 ->printf k now k=20

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is build process in c?

1079


in any language the sound structure of that language depends on its a) character set, input/output function, its control structures b) character set, library functions, input/output functions its control structures c) character set, library functions, control sturctures d) character set, operators, its control structures

1141


Explain can static variables be declared in a header file?

1103


What is table lookup in c?

1032


Why we not create function inside function.

2141


What is difference between array and structure in c?

1091


The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1167


is it possible to create your own header files?

1044


The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none

1190


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2038


What should malloc() do?

1100


What would be an example of a structure analogous to structure c?

941


Explain what is the difference between a string copy (strcpy) and a memory copy (memcpy)? When should each be used?

1032


Why we use int main and void main?

1016


What is c preprocessor mean?

1238