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


int a=1,b=2,c=3;
printf("%d,%d",a,b,c);
What is the output?

Answers were Sorted based on User's Feedback



int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / rahul

1,2

Is This Answer Correct ?    67 Yes 7 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / jaya prakash

1,2

because arguments of functions stored in stock
in stock stored as
"%d,%d"
a
b
c
in printf fn,
args popped out from stack
first "%d,%d" is popped
it find two int involved by %d in the control string
so two more args popped out
a,b
after popping the addr's then the values in that location
printed.(1,2)

Is This Answer Correct ?    28 Yes 3 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / peeyush mishra

output will be 1,2

Is This Answer Correct ?    24 Yes 3 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / sateeshbabu aluri

o/p will be: 1 2 only
3 will be ommited because there is no conversion operator
in printf.

Is This Answer Correct ?    13 Yes 0 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / madhu

No doubt ans is : 1,2

Is This Answer Correct ?    6 Yes 1 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / poornima

Actually, Stack follows Last In First Out(LIFO) style.No
doubt in tht.
In code, there is only two format specifier(ie., 2 %d) tht
will corresponds to first two variables.
Elements are pushed from right to left fashion in variable
declaration part.
In stack, c is bottom-most element & a is top-most element.
so,by code a is popped first then b.so, it will print 1,2.

Is This Answer Correct ?    8 Yes 4 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / priya

answer will be 1,2

Is This Answer Correct ?    5 Yes 1 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / arunkumar ms

1,2

Is This Answer Correct ?    6 Yes 2 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / amaresh chandra das

Ans:1,2

because arguments of functions stored in stack in FIFO order

So Var a enters 1st so it will out (popped)1st too as it's
STACK's property.

Is This Answer Correct ?    10 Yes 7 No

int a=1,b=2,c=3; printf("%d,%d",a,b,c); What is the output? ..

Answer / geetha

answer is 1,2

Is This Answer Correct ?    4 Yes 1 No

Post New Answer

More C Interview Questions

print the following using nested for loop. 5 4 3 2 1 1 2 3 4 3 2 1 1 2 1 2 1 1 2 3 4 3 2 1 1 2 3 4 5

7 Answers   IBM,


What is typedf?

0 Answers  


Explain heap and queue.

0 Answers   Aricent,


What is the difference between fread buffer() and fwrite buffer()?

0 Answers  


Why static is used in c?

0 Answers  


what is object oriental programing?

1 Answers  


in C-programming language without using printf statement can we get output r not ? if yes how and if no also how ?

11 Answers   IBM,


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

0 Answers  


what is the return value (status code) of exit() function.... what the arguments(integer value) passed to it means....

1 Answers   TCS,


how to make a scientific calculater ?

0 Answers  


Can you write the function prototype, definition and mention the other requirements.

0 Answers   Adobe,


What's the best way of making my program efficient?

0 Answers   Celstream,


Categories