Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void m..

Answer / sinchanforyou

It prints:

i=38

Is This Answer Correct ?    25 Yes 10 No

what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void m..

Answer / bala prasad

it prints
512

Is This Answer Correct ?    17 Yes 10 No

what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void m..

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

what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void m..

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 will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void m..

Answer / udai

512

Is This Answer Correct ?    8 Yes 6 No

what will be the output of this program? #include<stdio.h> #define cube(x) x*x*x void m..

Answer / srikanth karnati

please explain this program.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More C Interview Questions

Given only putchar (no sprintf, itoa, etc.) write a routine putlong that prints out an unsigned long in decimal. [ I gave the obvious solution of taking % 10 and / 10, which gives us the decimal value in reverse order. This requires an array since we need to print it out in the correct order. The interviewer wasn't too pleased and asked me to give a solution which didn't need the array ].

0 Answers  


suppose there are five integers write a program to find larger among them without using if- else

2 Answers  


how to find the given number is prime or not?

6 Answers   IMS, ING,


How do I round numbers?

0 Answers  


How can I determine whether a machines byte order is big-endian or little-endian?

0 Answers  


Write a c program for sum of first n terms of the series S = 1 - (1/3) + (1/5) -(1/7) + (1/9) ......

2 Answers  


Is exit(status) truly equivalent to returning the same status from main?

0 Answers  


What is binary tree in c?

0 Answers  


Can we change the value of #define in c?

0 Answers  


Write a program to produce the following output in c language? 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1

2 Answers  


can we declare a function in side the structure?

2 Answers   HCL,


what is differnence b/w macro & functions

1 Answers  


Categories