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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

c language supports bitwise operations, why a) 'c' language is system oriented b) 'c' language is problem oriented c) 'c' language is middle level language d) all the above

606


How do you convert a decimal number to its hexa-decimal equivalent.Give a C code to do the same

645


Explain what are preprocessor directives?

617


Why is struct padding needed?

621


Can true be a variable name in c?

553






What is a pointer and how it is initialized?

596


How will you declare an array of three function pointers where each function receives two ints and returns a float?

770


Is it better to use a macro or a function?

644


When is a “switch” statement preferable over an “if” statement?

639


Why isn't any of this standardized in c? Any real program has to do some of these things.

615


How do you use a 'Local Block'?

712


What is meant by operator precedence?

664


WRITE A PROGRAM TO MERGE TWO SORTED ARRAY USING MERGE SORT TECHNIQUE..

1584


What is the translation phases used in c language?

622


Can we assign string to char pointer?

578