#define square(x) x*x

main()

{

int i;

i = 64/square(4);

printf("%d",i);

}

Answers were Sorted based on User's Feedback



#define square(x) x*x main() { int i; i = 64/square(4); print..

Answer / susie

Answer :

64

Explanation:

the macro call square(4) will substituted by 4*4
so the expression becomes i = 64/4*4 . Since / and * has
equal priority the expression will be evaluated as (64/4)*4
i.e. 16*4 = 64

Is This Answer Correct ?    231 Yes 14 No

#define square(x) x*x main() { int i; i = 64/square(4); print..

Answer / boby

64

Is This Answer Correct ?    20 Yes 1 No

#define square(x) x*x main() { int i; i = 64/square(4); print..

Answer / mayur rangade

64

Is This Answer Correct ?    13 Yes 0 No

#define square(x) x*x main() { int i; i = 64/square(4); print..

Answer / manish

16

Is This Answer Correct ?    2 Yes 13 No

Post New Answer

More C Code Interview Questions

Sir... please give some important coding questions asked by product companies..

0 Answers  


main() { int i, n; char *x = “girl”; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(“%s\n”,x); x++; } }

2 Answers  


What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF) ;

1 Answers  


What are segment and offset addresses?

2 Answers   Infosys,


Write a program to model an exploding firecracker in the xy plane using a particle system

0 Answers   HCL,






create a login program that ask username and password. if you input username or password 3 times wrong, the program will terminate else the program will prompt a message "congratulations"

2 Answers  


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

3 Answers  


Which one is taking more time and why ? :/home/amaresh/Testing# cat time.c //#include <stdio.h> #define EOF -1 int main() { register int c; while ((c = getchar()) != EOF) { putchar(c); } return 0; } ------------------- WIth stdio.h:- :/home/amaresh/Testing# time ./time_header hi hi hru? hru? real 0 m4.202s user 0 m0.000s sys 0 m0.004s ------------------ Witout stdio.h and with #define EOF -1 =================== /home/amaresh/Testing# time ./time_EOF hi hi hru? hru? real 0 m4.805s user 0 m0.004s sys 0 m0.004s -- From above two case , why 2nd case is taking more time ?

0 Answers  


create a C-code that will display the total fare of a passenger of a taxi if the driver press enter,the timer will stop. Every 10 counts is 2 pesos. Initial value is 25.00

0 Answers   Microsoft,


&#8206;#define good bad main() { int good=1; int bad=0; printf ("good is:%d",good); }

2 Answers  


void main() { printf(“sizeof (void *) = %d \n“, sizeof( void *)); printf(“sizeof (int *) = %d \n”, sizeof(int *)); printf(“sizeof (double *) = %d \n”, sizeof(double *)); printf(“sizeof(struct unknown *) = %d \n”, sizeof(struct unknown *)); }

1 Answers  


write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details

2 Answers   TCS,


Categories