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 the function int countchtr(char string[],int ch);which returns the number of timesthe character ch appears in the string. for example the call countchtr("she lives in Newyork",'e') would return 3.

6 Answers  


if ENTERED FIVE DIGITS DESIGN A PROGRAM THAT WILL FIND CORRESPONDING VALUE FROM ASCII TABLE

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,


how 2 compile & execute c program with out using editor?

2 Answers   HP,


what is a function prototype?

1 Answers  






to print the salary of an employee according to follwing calculation: Allowances:HRA-20% of BASIC,DA-45% of BASIC,TA-10%. Deductions:EPF-8% of BASIC,LIC-Rs.200/-Prof.Tax:Rs.200/- create c language program?

0 Answers  


errors in computer programmes are called

1 Answers   NET,


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

0 Answers  


Are the expressions * ptr ++ and ++ * ptr same?

0 Answers  


What standard functions are available to manipulate strings?

0 Answers  


what is the difference between structural,object based,object orientd programming languages?

1 Answers   PanTerra,


What is the difference between CV and Resume ?

2 Answers  


Categories