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 is the output of the following program?
#include<stdio.h>
void main()
{
int x=4,y=3,z;
z=x-- -y;
printf("\n%d %d %d",x,y,z);
}

Answer Posted / ravi chandra

x=4
y=3
z=x-- -y;

x-- means at first the left hand value will be equal to x
i.e., z=x and then the value of x gets decrement..
z=x-- -y
z=4-- -3
z=4-3 and x=x-1
z=1 and x=3
the y value remains same y=3
therefore x=3 y=3 and z=1

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Who developed c language?

1095


How many levels of indirection in pointers can you have in a single declaration?

1088


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1343


What is self-referential structure in c programming?

1221


What is a substring in c?

1034


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2329


What are linker error?

1095


Device an algorithm for weiler-atherton polygon clipping, where the clipping window can be any specified polygon

5953


What is page thrashing?

1083


Tell me is null always defined as 0(zero)?

1089


code for quick sort?

2033


Why & is used in c?

1192


What is array of structure in c programming?

1291


What is the size of a union variable?

1053


any "C" function by default returns an a) int value b) float value c) char value d) a & b

1087