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

What is the difference between #include

and #include “header file”?

969


how to print the character with maximum occurence and print that number of occurence too in a string given ?

2410


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

2135


Can you think of a logic behind the game minesweeper.

2413


List some of the static data structures in C?

1155


Differentiate between null and void pointers.

1116


Is file a keyword in c?

884


Explain what are its uses in c programming?

1014


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1047


How reliable are floating-point comparisons?

1031


What is difference between function overloading and operator overloading?

1044


What math functions are available for integers? For floating point?

1076


Why main function is special give two reasons?

1483


Explain the use of #pragma exit?

1110


Difference between MAC vs. IP Addressing

1093