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();
}

Answers were Sorted based on User's Feedback



WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h>..

Answer / pratik

but how answer came ? ?

Is This Answer Correct ?    0 Yes 3 No

WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h>..

Answer / vijay

20 21 20 20

Is This Answer Correct ?    2 Yes 7 No

WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h>..

Answer / 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

WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h>..

Answer / shashikant

20,20,22,22

Is This Answer Correct ?    2 Yes 15 No

WHAT WILL BE OUTPUT OF BELOW CODE . . AND PLEASE EXPLAIN HOW IT COME .. #include<stdio.h>..

Answer / priyanka

20,20,21,20

Is This Answer Correct ?    5 Yes 20 No

Post New Answer

More C Interview Questions

Why the use of alloca() is discouraged?

2 Answers   Oracle,


How can I allocate arrays or structures bigger than 64K?

5 Answers  


how to introdu5ce my self in serco

0 Answers  


Is there a way to have non-constant case labels (i.e. Ranges or arbitrary expressions)?

0 Answers  


please tell me the logic for this C program : INPUT (string):ABCD OUTPUT :BCDA CDAB DABC

2 Answers   Mphasis,


How can you draw circles in C?

0 Answers   Accenture,


Explain how do you override a defined macro?

0 Answers  


what are the advantage of pointer variables? write a program to count the number of vowels and consonants in a given string

3 Answers  


How can I call a function, given its name as a string?

4 Answers   ABC Telecom,


Is c procedural or object oriented?

0 Answers  


In C, What is the #line used for?

2 Answers  


illustrate the use of address operator and dereferencing operator with the help of a program guys plzzz help for this question

0 Answers  


Categories