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

Is it acceptable to declare/define a variable in a c header?

1099


What is a program flowchart and explain how does it help in writing a program?

1285


Explain how can you be sure that a program follows the ansi c standard?

1450


what is a function method?give example?

2350


Give me the code of in-order recursive and non-recursive.

1360


write a program to find out prime number using sieve case?

2074


Explain how can I manipulate strings of multibyte characters?

1187


What is the difference between procedural and declarative language?

1127


How many keywords are there in c?

1061


What is cohesion and coupling in c?

1017


What is the full form of getch?

1255


Tell me what is the purpose of 'register' keyword in c language?

993


What is the use of #define preprocessor in c?

1055


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2034


Can you explain what keyboard debouncing is, and where and why we us it? please give some examples

2182