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


Please Help Members By Posting Answers For Below Questions

A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1691


Can include files be nested? How many levels deep can include files be nested?

649


Where are some collections of useful code fragments and examples?

703


Why doesnt long int work?

602


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1512






What is the purpose of clrscr () printf () and getch ()?

589


What is calloc()?

617


What is clrscr in c?

664


console I/O functions means a) the I/O operations done on disk b) the I/O operations done in all parts c) the input given through keyboard is displayed VDU screen d) none of the above

645


what is the structure pointer?

1636


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

703


WRITE A CODE IN C TO SEARCH A FILE FROM NOTEPAD FILE.

2017


Why c is called a middle level language?

628


Write a program to find factorial of a number using recursive function.

632


Can a local variable be volatile in c?

571