Examveda

What will be the output of the following C code?
char str[20]; 
strcpy(str, "123456"); 
res = atoi(str);
printf("%s  %d\n", str, res);

A. 123456 0

B. 123456 0.0

C. 123456 123456

D. 123456 123456.0

Answer: Option C


This Question Belongs to C Program >> Standard Library Functions

Join The Discussion

Related Questions on Standard Library Functions