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 f(x)
main()
{
printf("\n%d",f(2+2));
}

Answer Posted / suman halder

within printf statement,f(2+2) i.e f(4) must return a value so that this value could get printed through %d format specifier..
Now,as f(x) is a macro template and macro expansion code for this template is not specified..so,here the situation is like,we are trying to return an integer value from a function which is having a "void" return type..
so,compiler flashes "Expression syntax error"..as during preprocessing macro template can't be replaced by macro expansion...

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is abstract data structure in c?

1041


Describe the steps to insert data into a singly linked list.

1070


What is a pointer in c plus plus?

1305


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2326


What is the difference between fread and fwrite function?

1078


Why ca not I do something like this?

1010


given post order,in order construct the corresponding binary tree

2781


Write a c program to demonstrate character and string constants?

2192


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

5459


What is the use of parallelize in spark?

1030


Explain how are portions of a program disabled in demo versions?

1118


Write a programme using structure that create a record of students. The user allow to add a record and delete a record and also show the records in ascending order.

2092


Explain how can I right-justify a string?

1042


Explain goto?

1154


What is the purpose of realloc()?

1139