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 |
Hai friends im a i year student. i want to develop my knowledge in the field of TSR in c. How I'm Improve ?
Process by which one bit pattern in to another by bit wise operation is?
What is header file in c?
what is the difference between char * const and const char *?
Convert the following expression to postfix and prefix X $ Y Z - M + N + P / Q / (R + S)
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
what is the full form of c language
There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.
What is variable in c with example?
Difference between null pointer and dangling pointer?
Why array is used in c?
Is that possible to add pointers to each other?