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

write a program of palindrome(madam=madam) using pointer?

5 Answers   L&T,


What is c token?

0 Answers  


Is c an object oriented programming language?

1 Answers  


tell me the full form of c?

2 Answers  


What is new line escape sequence?

0 Answers  


What is an auto variable in c?

0 Answers  


Input is "rama loves rajesh and rajesh Loves rama also and rajesh wear gloves and bloves" To print output is count the numbers of times repeted the word love without case sensitive.

0 Answers  


What tq means in chat?

0 Answers  


what is the difference between c and java?

1 Answers  


What is the function of volatile in c language?

0 Answers  


What is encapsulation?

2 Answers  


what is diffrence between string and character array?

1 Answers  


Categories