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
How would you obtain the current time and difference between two times?
What are high level languages like C and FORTRAN also known as?
Can we replace the struct function in tree syntax with a union?
Do you know the purpose of 'register' keyword?
Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.
Where can I get an ansi-compatible lint?
How can I list all of the predefined identifiers?
What is a macro in c preprocessor?
Why c is called a middle level language?
What are dangling pointers in c?
What is the c language function prototype?
What is sorting in c plus plus?
is it possible to create your own header files?
Which of these functions is safer to use : fgets(), gets()? Why?
What is the difference between test design and test case design?