C Programming - Strings - Discussion
|
|
|
|
Read more:"When ambition ends, happiness begins."
- (Proverb)
|
| 4. |
What will be the output of the program ?
#include<stdio.h>
int main()
{
printf(5+"Good Morning\n");
return 0;
}
|
| [A]. |
Good Morning | [B]. |
Good | | [C]. |
M | [D]. |
Morning |
Answer: Option C
Explanation:
printf(5+"Good Morning\n"); It skips the 5 characters and prints the given string.
Hence the output is "Morning"
|
|
Ravi said:
(Wed, Aug 17, 2011 07:47:04 PM)
|
|
| |
| Why is it so? that it leaves the first 5 characters and takes tha last characters? |
|
|