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 capitalise first letter of each word in a given string?
what is printf
Linked lists -- can you tell me how to check whether a linked list is circular?
What is the package for freshers(Non IIT) in amazon(hyderabad). And what is the same for those who are a contract employee.
totally how much header files r in c language
12344321 123 321 12 21 1 1 how i print this program??
5 Answers DSR Management, Winit,
Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... }
What is nested structure?
what will be the output of this program........ main() { int a=2,b=4,c=6; printf("%d"); } why it gives the value of third variable.
Explain how can you determine the size of an allocated portion of memory?
Which is best book for data structures in c?
What is the most efficient way to count the number of bits which are set in a value?