main()
{
printf(5+"good morning");
printf("%c","abcdefgh"[4]);
}the o/p is morning and e...how someone explain
Answer / vignesh1988i
the o/p depends upon the compiler and cant be predicted
wat's hapenning inside .... each will have different
opinion.....my opinion is :
here in the first printf statement "good morning" acts as
an string and 5+"good morning" means print the string
after the 5th character in the string starting from 0....
so o/p is :
morning
for second one :
this printf can be re-written as the first printf statement
printf("%c",4+"abcdefgh");
here only the 4th character will get printed ... in this
case it will print 'e'..
thank u
| Is This Answer Correct ? | 26 Yes | 11 No |
how to make program without <> in library.
What does %f mean c?
though sbi was nationalized why its not comes under nationalized banks and its comes under publicsector banks
3 Answers State Bank Of India SBI,
Why c++ is called c++ and not c+?
Is linux written in c?
I heard that you have to include stdio.h before calling printf. Why?
Explain how do I determine whether a character is numeric, alphabetic, and so on?
Who is the founder of c language?
Determine the code below, tell me exactly how many times is the operation sum++ performed ? for ( i = 0; i < 100; i++ ) for ( j = 100; j > 100 - i; j--) sum++;
How can I read and write comma-delimited text?
Explain what happens if you free a pointer twice?
Which of these statements are false w.r.t File Functions? i)fputs() ii)fdopen() iii)fgetpos() iv)ferror() A)ii B)i,ii C)iii D)iv