Vidyalelo
C Programming · Q69

File Input Output

Programming · C Programming · question 69

Q69

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

A.
myworld
B.
myworld(note: spaces to the left of myworld)
Answer
C.
myworld (note:followed by two spaces after myworld)
D.
Undefined

Answer: Option B

Solution

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