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 sizeof array in c?

1114


Why we use int main and void main?

1119


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

2223


What library is sizeof in c?

1142


What do you mean by Recursion Function?

1179


What is I ++ in c programming?

1170


What are the different types of constants?

1129


What are the 3 types of structures?

1065


int i=10; printf("%d %d %d", i, i=20, i);

1699


Give the rules for variable declaration?

1219


What is the difference between int main and void main?

1097


Write a program to check palindrome number in c programming?

1066


What is the size of structure in c?

1215


Explain what is operator promotion?

1150


a value that does not change during program execution a) variabe b) argument c) parameter d) none

1291