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

# define x=1+4;
main()
{
int x;
printf("%d%d",x/2,x/4);
}

Answer Posted / rama krishna sidhartha

The preprocessor syntax is wrongly written. It should be as
follows :

#define x 1+4

void main()
{
printf("%d%d",x/2,x/4);
}

There is no need of declaring the variable 'x' in
between 'main()' function since it is already declared
in '#define' directive.

The output will be : 3 and 2

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 function what are the types of function?

1055


What is double pointer in c?

1089


What is the difference between the local variable and global variable in c?

1015


What is spark map function?

1206


Give me the code of in-order recursive and non-recursive.

1421


What are identifiers and keywords in c?

1197


What are the application of c?

1159


Differentiate between ordinary variable and pointer in c.

1252


what are the advantages of a macro over a function?

1191


Whats s or c mean?

1083


Explain how can I avoid the abort, retry, fail messages?

1103


What is the best organizational structure?

1169


What is the behavioral difference when include header file in double quotes (“”) and angular braces (<>)?

1395


I have a varargs function which accepts a float parameter?

1096


Explain 'bus error'?

1164