#define SQR(x) x * x

main()

{

printf("%d", 225/SQR(15));

}

a. 1

b. 225

c. 15

d. none of the above

Answers were Sorted based on User's Feedback



#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225..

Answer / anurag

the macro replacement will change printf to:

printf("%d", 225/15*15);

now, / and * have same priority so
225/15*15 = 15*15 = 225.

So answer is 225

Is This Answer Correct ?    24 Yes 2 No

#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225..

Answer / guest

b) 225

Is This Answer Correct ?    22 Yes 6 No

#define SQR(x) x * x main() { printf("%d", 225/SQR(15)); } a. 1 b. 225..

Answer / srividya h r

a.1

Is This Answer Correct ?    4 Yes 13 No

Post New Answer

More C Code Interview Questions

{ int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }

4 Answers  


#define int char main() { int i=65; printf("sizeof(i)=%d",sizeof(i)); }

1 Answers  


#include<stdio.h> main() { FILE *ptr; char i; ptr=fopen("zzz.c","r"); while((i=fgetch(ptr))!=EOF) printf("%c",i); }

1 Answers  


Is it possible to print a name without using commas, double quotes,semi-colons?

7 Answers  


Give a one-line C expression to test whether a number is a power of 2.

10 Answers   Microsoft,






What is the match merge ? compare data step match merge with proc sql merge - how many types are there ? data step vs proc sql

0 Answers  


main() { int i = 0xff ; printf("\n%d", i<<2); } a. 4 b. 512 c. 1020 d. 1024

2 Answers   HCL,


main() { int i=4,j=7; j = j || i++ && printf("YOU CAN"); printf("%d %d", i, j); }

1 Answers  


main() { main(); }

1 Answers  


how can u draw a rectangle in C

53 Answers   Accenture, CO, Codeblocks, Cognizant, HCL, Oracle, Punjab National Bank, SAP Labs, TCS, University, Wipro,


# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }

1 Answers  


What is full form of PEPSI

0 Answers  


Categories