what will be the output of this program?
#include<stdio.h>
#define cube(x) x*x*x
void main()
{
int i,j=5;
i=cube(j+3);
printf("i=%d",i);
}
Answers were Sorted based on User's Feedback
Answer / vijay r15
ans 38
it will pass as (5+3)
So the operation will be as
5+3*5+3*5+3
Hence
5+15+15+3=38
Got it
With thanks and regards,
Vijay r15
raj.vijay55@gmail.com
| Is This Answer Correct ? | 8 Yes | 2 No |
Answer / sunil samal
38 because above declared the pree processer directive # defind cube (x) x*x*x
it passes the value (5+3)to the above directive
So the operation will be as
5+3*5+3*5+3
Hence
5+15+15+3=38
| Is This Answer Correct ? | 5 Yes | 1 No |
What is the meaning of c in c language?
What is wrong with this statement? Myname = 'robin';
Explain what is meant by high-order and low-order bytes?
What should be keep precautions while using the recursion method?
for(;;) printf("C language") What is out put of above??
2 Answers Practical Viva Questions,
What functions are used for dynamic memory allocation in c language?
What is main void in c?
What are the types of macro formats?
How do you override a defined macro?
Why can arithmetic operations not be performed on void pointers?
How was c created?
Why n++ execute faster than n+1 ?