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 prod(a,b)=a*b
main()
{
int x=2;
int y=3;
printf("%d",prod(x+2,y-10)); }

the output of the program is
a.8
b.6
c.7
d.none

Answers were Sorted based on User's Feedback



# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(..

Answer / arun raj

It will lead to compilation error..
Note: # define prod(a,b)=a*b
'=' is not allowed with #define

regards,
Arun Raj

Is This Answer Correct ?    19 Yes 1 No

# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(..

Answer / mannucse

d

Is This Answer Correct ?    13 Yes 2 No

# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(..

Answer / shruti

the syntax for writting the macro is wrong..

we can't have "=" sign while writing macro..
i.e. #define -----

Is This Answer Correct ?    8 Yes 0 No

# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(..

Answer / shinu

d

Is This Answer Correct ?    3 Yes 0 No

# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(..

Answer / hussain reddy

d

Is This Answer Correct ?    3 Yes 0 No

# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(..

Answer / vint

Assuming '=' is added by mistake in the macro.
#define prod(a,b) a*b
int main()
{
int x=2, y=3;
printf("%d",prod(x+2,y-10));
return 0;
}
Ans: None
The output is -2
a*b
x+2*y-10
2+2*3-10
2+6-10
8-10
-2

Is This Answer Correct ?    4 Yes 1 No

# define prod(a,b)=a*b main() { int x=2; int y=3; printf("%d",prod(..

Answer / sivasyam

with out using conditional opraters and conditional
statments(i.e &,| etc, and if,whileand etc.,) find the
bigeesst value between two values

Is This Answer Correct ?    2 Yes 1 No

Post New Answer

More C Interview Questions

Why array starts with index 0

2 Answers  


Why isnt there a numbered, multi-level break statement to break out

0 Answers  


What are global variables and how do you declare them?

0 Answers  


Can a file other than a .h file be included with #include?

0 Answers   Aspire, Infogain,


What is the meaning of int *x[]();?

1 Answers  


in b=6.6/a+(2*a+(3*c)/a*d)/(2/n); which operation will be performed first a) 6.6/a b) 2*a c) 3*c d) 2/n

1 Answers  


If we have an array of Interger values, find out a sub array which has a maximum value of the array and start and end positions of the array..The sub array must be contiguious. Take the start add to be 4000. For Ex if we have an array arr[] = {-1,-2,-5,9,4,3,-6,8,7,6,5,-3} here the sub array of max would be {8,7,6,5} coz the sum of max contiguous array is 8+7+6+5 = 26.The start and end position is 4014(8) and 4020(5).

5 Answers   Microsoft, Motorola,


What does struct node * mean?

0 Answers  


praagnovation

0 Answers  


How is pointer initialized in c?

0 Answers  


How can I implement a delay, or time a users response, with sub-second resolution?

0 Answers  


Explain is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

0 Answers  


Categories