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 |
Write the following function in C. stripos — Find position of first occurrence of a case- insensitive string int stripos ( char* haystack, char* needle, int offset ) Returns the numeric position of the first occurrence of needle in the haystack string. Note that the needle may be a string of one or more characters. If needle is not found, stripos() will return - 1. The function should not make use of any C library function calls.
3 Answers Google, Infosys, JTL, OpenFeel,
why array index always starts from zero??
we have a 3litres jug and a 5 litres jug and no measures on them. using these two jugs how can we measure 4 litres of water?
What is #line?
What is static and auto variables in c?
How to Throw some light on the splay trees?
User define function contain thier own address or not.
What are the types of arrays in c?
Can a variable be both const and volatile?
What is a symbolic constant?
What are the two types of functions in c?
how to make c program without a libary? e.g.#include<stdio.h> libary is not in c progaram.