printf("%d",(printf("Hello")); What it returns?
Answers were Sorted based on User's Feedback
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 |
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")));
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 |
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 |
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 |
What's the difference between constant char *p and char * constant p?
what is the output for the code : main() { int i,j; printf("%d %d ",scanf("%d%d",&i,&j)); }
who will call your main function in c under linux?
What is register variable in c language?
How does the C program handle segmentation faults?
How do I access command-line arguments?
what is the difference between global variable & static variable declared out side all the function in the file.
What is string in c language?
what is the output of the program and explain why?? #include<stdio.h> void main ( ) { int k=4,j=0: switch (k) { case 3; j=300; case 4: j=400: case 5: j=500; } printf (“%d\n”,j); }
write a program to rearrange the array such way that all even elements should come first and next come odd
what is an inline fuction??
Explain logical errors? Compare with syntax errors.