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 is wild pointer in c?

1128


general for is %wd,f-d; in this system "w" means a) 'w' represent total width of digits b) 'w' represent width which includes the digits before,after decimal place and the decimal point c) 'w' represent width which includes the digits before only d) 'w' represent width after decimal place only

1118


What is const keyword in c?

1221


Which is an example of a structural homology?

1378


what do u mean by Direct access files? then can u explain about Direct Access Files?

2148


how should functions be apportioned among source files?

1167


Is sizeof a keyword in c?

1015


Explain what are multidimensional arrays?

1122


please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code

2230


What is the c value paradox and how is it explained?

1107


How can I read in an object file and jump to locations in it?

1072


What is a program?

1340


What is double pointer in c?

1089


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1445


Explain what is a const pointer?

1123