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);
}
Answer Posted / 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 |
Post New Answer View All Answers
Give differences between - new and malloc() , delete and free() ?
program to find out date after adding 31 days to a date in the month of febraury also consider the leap year
What are pragmas and what are they good for?
How do we print only part of a string in c?
How many data structures are there in c?
Explain how do you declare an array that will hold more than 64kb of data?
Write an algorithm for implementing insertion and deletion operations in a singly linked list using arrays ?
What 'lex' does?
What are the output(s) for the following ? #include char *f() {char *s=malloc(8); strcpy(s,"goodbye")} main() { char *f(); printf("%c",*f()='A'); }
Why do we need functions in c?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
How can you return multiple values from a function?
What is the return type of sizeof?
please give me some tips for the placement in the TCS.
What is the difference between exit() and _exit() function in c?