- 2
Can anyone explain me this code execution step by step please...... And also about char line_text code usage.
#include <stdio.h> float temp_f; float temp_c; char line_text[500]; int main() { printf("Input a tempture(in centigrade\n"); fgets(line_text,sizeof(line_text),stdin); sscanf(line_text,"%f",&temp_c); temp_f =((9.0/5.0)*temp_c)+32.0; printf("%f degree fahrenheit.\n",temp_f ); return 0; }
2 Antworten
0
Which line in particular requires explanation? I'm leaving you here the references for fgets() and sscanf() in a hope it helps you for better understanding.
http://www.cplusplus.com/reference/cstdio/fgets/
http://www.cplusplus.com/reference/cstdio/sscanf/
0
I don't understand this can anyone explain step by step process of excuetion.