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

Can we include one C program into another C program if yes how?

7 Answers   Infosys,


Write a program to add the following ¼+2/4+3/4+5/3+6/3+... (Like up to any 12 no.s)

1 Answers   HTC,


Why are algorithms important in c program?

0 Answers  


What does == mean in texting?

0 Answers  


void main() {int i=2; printf("%d%d%d",i,++i,i++); getch(); }

9 Answers  


why 'c' is called middle level language.

2 Answers  


can anyone please tell me wat is backlogs... i was looking for the job openings where i read this.. eligibility criteria minimum 70% in degree without backlogs. is that arrear.. if so is it standing arrear or history of arrears... please help me...

11 Answers   CTS, Indian Navy, L&T, Microsoft, SSB, TCE, TCS,


dynamically allocate memory for linear array of n integers,store some elements in it and find some of them

1 Answers  


please can any one suggest me best useful video tutorials on c i am science graduate.please help me.u can email me to sas29@in.com

0 Answers  


Is array name a pointer?

0 Answers  


how does the C compiler interpret the following two statements p=p+x; q=q+y; a.p=p+x; q=q+y b.p=p+xq=q+y c.p=p+xq; q=q+y d.p=p+x/q=q+y

4 Answers   TCS,


int j =15,i; for (i=1; 1<5; ++i) {printf ("%d%d ",j,i); j = j-3; }

2 Answers  


Categories