Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

Answers were Sorted based on User's Feedback



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

Answer / aju.b

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

Result is Hello5

Is This Answer Correct ?    173 Yes 15 No

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

Answer / vikas pawar

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


Result is Hello5
Inner printf prints Hello and outer printf gives length of
string i.e. 5

Is This Answer Correct ?    69 Yes 8 No

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

Answer / srinivasa. p

Hello5

Printf() return number character print on STD::out

Is This Answer Correct ?    29 Yes 10 No

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

Answer / anil kumar

Result is Hello5
Inner printf prints Hello and outer printf gives length of
string i.e. 5

Is This Answer Correct ?    14 Yes 2 No

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

Answer / varun

error bcz 1 bracket is missing.
if corected
output will b

Hello5

Is This Answer Correct ?    12 Yes 4 No

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

Answer / amit shrivastava

it will show hello5
hello from the inner printf and 5 value return by the outer
printf function,as printf return int value of the string
and in the example there is 5 wrds so the lenght is 5 which
it return.

Is This Answer Correct ?    9 Yes 2 No

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

Answer / anupam sen

printf function returns the number of character it prints
so output:Hello5

Is This Answer Correct ?    5 Yes 0 No

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

Answer / vivek_akathara

if the statement is as shown above then it will show an
error due to incomplete parentheses(there are 3 opening and
2 closing)

once that is corrected then you will get the output as
hello5 for the reasons explained above.

Is This Answer Correct ?    7 Yes 4 No

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

Answer / dally

It will print hello with length of 5.Because return value of
printf is length of that string.

Is This Answer Correct ?    2 Yes 0 No

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

Answer / dinesh gupta

error
bcos one bracket is missing
if make correction
then out put is ........ hello5
reason..inner statement print hello and as wellas returns the lenth of the string to outer print statement,which give 5

Is This Answer Correct ?    2 Yes 0 No

Post New Answer



More C Interview Questions

How to access or modify the const variable in c ?

16 Answers   HCL, HP,


what will be the output of" printf("%d%d",scanf("%d% d",&a&b));"

4 Answers  


in one file global variable int i; is declared as static. In another file it is extern int i=100; Is this valid ?

4 Answers   Infosys, NetApp,


differentiate between const char *a; char *const a; and char const *a;

2 Answers   College School Exams Tests, HCL, TCS,


1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.

2 Answers  






What is the size of array float a(10)?

0 Answers  


How macro execution is faster than function ?

0 Answers   Wipro,


what about "char *(*(*a[])())();"

3 Answers   Oracle,


why u join this call center?

6 Answers   DELL,


How to implement variable argument functions ?

1 Answers   HP,


Is void a keyword in c?

0 Answers  


Why does not use getgh(); and <conio.h> in c language.

3 Answers   Elofic,






Categories