#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

To Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates. String contains only lowercase characters ['a'-'z']

0 Answers  


Design an implement of the inputs functions for event mode

0 Answers   Wipro,


Finding a number which was log of base 2

1 Answers   NetApp,


How do I write a program to print proper subset of given string . Eg :input: abc output:{},{a},{b},{c},{a,b},{a,c},{b,c}, {a,b,c}.I desperately need this program please mail me to saravana6m@gmail.com

11 Answers   Deshaw, Infosys,


String copy logic in one line.

11 Answers   Microsoft, NetApp,






main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }

1 Answers  


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

4 Answers  


1) int i=5; j=i++ + i++ + i++; printf("%d",j);This code gives the answer 15.But if we replace the value of the j then anser is different?why? 2)int i=5; printf("%d",i++ + i++ + i++); this givs 18.

8 Answers   IBPS, Infosys, TCS,


void main() { int *i = 0x400; // i points to the address 400 *i = 0; // set the value of memory location pointed by i; }

2 Answers  


#if something == 0 int some=0; #endif main() { int thing = 0; printf("%d %d\n", some ,thing); }

1 Answers  


Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal.

6 Answers   Fusion Systems GmbH,


main() { char a[4]="HELLO"; printf("%s",a); }

3 Answers   CSC,


Categories