Vidyalelo
C Programming · Q204

Standard Library Functions

Programming · C Programming · question 204

Q204

What will be the output of the following C code? char word[20 ] = "1.234555 WELCOME"; char *w; double dis; dis= strtod(word, &w); printf("The number is %lf ", dis); printf("String is |%s|", w);

A.
The number is 1.234555 String is |WELCOME|
Answer
B.
The number is 1.2345550 String is |WELCOME|
C.
The number is 1.234555 String is |1.234555 WELCOME|
D.
Errror

Answer: Option A

Solution

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