Computer Science, asked by anandkm6999, 1 year ago

What is the effect of executing the following statements : printf("\nOne\n Two \n Three \n");

Answers

Answered by guptaprine338
0
Fist change line
One
Second line
Two
Third line
Three
Answered by lovingheart
0

As soon as we see the given line, mostly we might thought the output as,

One

Two

Three

But actually the output will be

One

Two

Three

There will be a single space extra in second and third line. This is because inside the printf statement there is a space between each word. There would be leading and trailing spaces in the second and third word, where the leading space could be seen and trailing space cannot be seen since there is an “enter” encountered.

Similar questions