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

What are void pointers in c?

1058


Explain the difference between call by value and call by reference in c language?

1158


Why isn't any of this standardized in c? Any real program has to do some of these things.

1264


What is difference between Structure and Unions?

1301


please send me the code for multiplying sparse matrix using c

2219


What are inbuilt functions in c?

1080


What is a structure member in c?

1050


What is the difference between array and pointer in c?

1219


How is a pointer variable declared?

1157


What is the value of a[3] if integer a[] = {5,4,3,2,1}?

1145


How can a program be made to print the name of a source file where an error occurs?

1265


How can I generate floating-point random numbers?

1201


What is indirection in c?

1114


Why is void main used?

1142


When is a void pointer used?

1303