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 |
Where in memory are my variables stored?
two variables are added answer is stored on not for third variable how it is possible?
is it possible to change the default calling convention in c ?
How do you override a defined macro?
How do c compilers work?
When you call malloc() to allocate memory for a local pointer, do you have to explicitly free() it?
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What are the different types of errors?
What is the o/p of the follow pgm? #include<stdio.h> main() { char char_arr[5]=”ORACL”; char c=’E’; prinf(“%s\n”,strcat(char_arr,c)); } a:oracle b. oracl c.e d.none
Table of Sudoku n*n
Write a C program to remove the repeated characters in the entered expression or in entered characters(i.e) removing duplicates
get any number as input except 1 and the output will be 1.without using operators,expressions,array,structure.don't print 1 in printf statement