adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <stdio.h>    
    #include <stdlib.h>
    int main ()
    {
        char s[] = "365.24 29.53";
        char* p;
        double d1, d2;
        d1 = strtod (s, &p);
        d2 = strtod (p, NULL);
        printf ("%.2f\n", d1/d2);
        return 0;
    }

a.

12

b.

12.37

c.

13

d.

None of the mentioned

Answer: (b).12.37

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of this program?