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 |
how to add numbers without using arithmetic operators.
How do I declare an array of N pointers to functions returning pointers to functions returning pointers to characters?
How will you write a code for accessing the length of an array without assigning it to another variable?
When c language was developed?
write a program that print itself even if the source file is deleted?
What is c basic?
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
What library is sizeof in c?
advantages of pointers?
Explain data types & how many data types supported by c?
Explain what header files do I need in order to define the standard library functions I use?
Write a program in c to replace any vowel in a string with z?