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 |
What does the && operator do in a program code?
Create a structure to specify data on students given below: Roll number, Name, Department, Course, Year of joining Assume that there are not more than 450 students in the college. 1.write a function to print names of all students who joined in a particular year 2.write a function to print the data of a student whose roll number is given
How can I swap two values without using a temporary?
Explain what standard functions are available to manipulate strings?
Which header file is essential for using strcmp function?
Which node is more powerful and can handle local information processing or graphics processing?
What is pointer and structure in c?
Explain what are bus errors, memory faults, and core dumps?
Can the curly brackets { } be used to enclose a single line of code?
Describe wild pointers in c?
write a program to sort the elements in a given array in c language
Is linux written in c?