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's the return value of malloc()
program to find a smallest number in an array
Write a simple program to find the size of different basic data types in C.
Explain the difference between malloc() and calloc() function?
What is malloc calloc and realloc in c?
What is the mean of this statement:: if(int i=0 * i=9)
What is keyword with example?
How do you override a defined macro?
What is your favorite subject?
1 Answers Ericsson, Invendis, Tech Mahindra,
is compiler do read the data line by line or not. ??
6 Answers LG Soft, Satyam, Tech Mahindra,
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Tell me can the size of an array be declared at runtime?