printf("%d",(printf("Hello")); What it returns?

Answers were Sorted based on User's Feedback



printf("%d",(printf("Hello")); What it returns? ..

Answer / sangeetha

the inner printf statement will print Hello but the outer
printf is %d it will print an integer but we didnt call the
value it will give u the garbage value.and the output of the
program will be hello5.

Is This Answer Correct ?    2 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / sreenivasulu buddhala

It returns Hello5.since the inner printf been called
first,it would return the number of characters printed
successfully.so the result is Hello5

Is This Answer Correct ?    1 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / peddivinodkumarchowdary

hello5

Is This Answer Correct ?    1 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / kuldeep vishwakarma

printf("%d",(printf("Hello")));

ans: Hello5


printf("%d",(printf("Hello")));

ans: Hello5

printf("%d",(printf("Hello"));

ans: function call missing )
(because end parenthesis is not close)

Is This Answer Correct ?    0 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / vipin sharma

it will return hello 51

Is This Answer Correct ?    0 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / milan

it will return hello5,firstly the inner printf executes
print the hello and return the number of characters printed
that is 5 which get printed by outer printf...
More info at:
http://clanguagestuff.blogspot.com/2011/02/what-printf-returns.html

Is This Answer Correct ?    0 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / atul shukla

printf("%d",(printf("Hello"));

result is for sure hello5
anywhere if braces () are used it uses stack to perform its
operation last open braces will sort first and
print 'hello'and printf return int value its protype is
int printf(const char *format [,argument,...]);
value return will be length of string thats 5
u can change hello to any other string it will print lenght
of string only

Is This Answer Correct ?    0 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / mayur patil

answer is hello 11

Is This Answer Correct ?    0 Yes 0 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / soupal roy

hello4

Is This Answer Correct ?    1 Yes 2 No

printf("%d",(printf("Hello")); What it returns? ..

Answer / karna

hello5

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More C Interview Questions

write a c programs to do multiplication of two numbers with out using arithmatic operator ??????????

7 Answers   Infosys, TCS,


write a c program in such a way that if we enter the today date the output should be next day's date.

0 Answers  


#include <stdio.h> #define sqr(x) (x*x) int main() { int x=2; printf("value of x=%d",sqr(x+1)); } What is the value of x?

16 Answers   Accel Frontline, Opera, Oracle,


what is meant by the "equivalence of pointers and arrays" in C?

3 Answers   Satyam,


Why do we use header files in c?

0 Answers  






How can draw a box in cprogram without using graphics.h header file & using only one printf(); ?

4 Answers   NIIT,


What do you mean by invalid pointer arithmetic?

0 Answers  


Hai why 'c' is the middle language

4 Answers  


logic for generating all the combinations of the any number of given letters. ex::::::::: if a,b,c,d are given the o/p should be abcd,dcba,dbac,bcad,................ 4*3*2*1 combinations............

2 Answers   Infosys,


find largest element in array w/o using sorting techniques.

3 Answers   Zycus Infotech,


Where register variables are stored in c?

0 Answers  


Sir i want e-notes of C languge of BAlaguruswami book i.e scanned or pdf file of balaguruswamy book on c language.PLEASE SEND ME on my mail id ajit_kolhe@rediff.com

8 Answers  


Categories