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 / fazlur

Macro will blindly substitutes, it doesn't calculate. So
remember whenever you encounter the macro, you first
substitute the value then calculate later. Ofcourse the
answer would be 5 in this case.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is malloc() function?

1235


which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +

1781


What does %p mean?

1156


Why are all header files not declared in every c program?

1150


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2288


Why does everyone say not to use scanf? What should I use instead?

1472


What do you mean by a local block?

1130


What is the difference between functions abs() and fabs()?

1207


What is #error and use of it?

1347


Write a program to print "hello world" without using a semicolon?

1120


How can I call system when parameters (filenames, etc.) Of the executed command arent known until run time?

1158


Where static variables are stored in memory in c?

1052


Why is C language being considered a middle level language?

1209


What does the characters “r” and “w” mean when writing programs that will make use of files?

1540


Write a code to achieve inter processor communication (mutual exclusion implementation pseudo code)?

1169