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

THE ANSWER WILL BE
20 20 22 22
BECAUSE THE FIRST VALUE IS K=20 THEN IT WILL BE THE SAME
20 DUE TO K++, NOW THE VALUE WILL BE INCREMENTED & WILL BE
21, THEN ++K, MEANS THE VALUE WILL BE +1 THEN IT WILL BE 22
& LAST K WILL BE SAME 22.

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is f'n in math?

1054


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

1968


Is c compiled or interpreted?

1180


What is the difference between Printf(..) and sprint(...) ?

1513


Explain the difference between strcpy() and memcpy() function?

989


write a c program to find the sum of five entered numbers using an array named number

2124


What are loops c?

1044


How do I swap bytes?

1061


how to make a scientific calculater ?

2057


using for loop sum 2 number of any 4 digit number in c language

2320


What is dangling pointer in c?

1205


Why void is used in c?

1006


Can you please explain the scope of static variables?

1040


What are the 4 data types?

1002


What is the difference between strcpy() and memcpy() function in c programming?

1072