Vidyalelo
C Programming · Q99

File Input Output

Programming · C Programming · question 99

Q99

What will be the output of the following C code? #include int main(int argc, char** argv) char *s = "myworld"; int i = 3; printf("%10.*s", i, s);

A.
myw(note:7 spaces before myw)
Answer
B.
myworld(note:2 spaces before myworld)
C.
myworld (note:2 spaces after myworld)
D.
myw(note:6 spaces after myw)

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board