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...

#include <stdio.h>
#define sqr(x) (x*x)
int main()
{
int x=2;
printf("value of x=%d",sqr(x+1));
}

What is the value of x?

Answer Posted / divakar

ouput :value of x=5
bcoz sqr(x+1)=(x+1*x+1) if u substitute x=2 u will get 5
since '*' is having more priority than '+'

at the of prog if u add prinf("%d",x); u will get 2
bcoz x value is not changed

Is This Answer Correct ?    32 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the difference between structs and unions in c?

980


What is the difference between declaring a variable and defining a variable?

1216


What does printf does?

1208


What is a function in c?

1517


Explain what is the difference between a free-standing and a hosted environment?

1149


What is #define in c?

1006


what is the height of tree if leaf node is at level 3. please explain

2113


What is #include cctype?

1088


An application package has been provided to you without any documents for the following application. The application needs to be tested. How will you proceed?

1201


What are qualifiers?

997


What is a void * in c?

1046


Is null a keyword in c?

1166


What are the features of c language?

1038


Explain why c is faster than c++?

1033


How do I copy files?

1021