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\n", dis);
printf("String is |%s|", w);
char word[20 ] = "1.234555 WELCOME";
char *w; double dis;
dis= strtod(word, &w);
printf("The number is %lf\n", dis);
printf("String is |%s|", w);A. The number is 1.234555 String is |WELCOME|
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

Join The Discussion