- 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; }

24th Aug 2021, 2:52 AM
KISI BI SUBJECT
KISI BI SUBJECT - avatar
2 Réponses
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/
25th Aug 2021, 1:47 PM
Ipang
0
I don't understand this can anyone explain step by step process of excuetion.
26th Aug 2021, 5:45 AM
KISI BI SUBJECT
KISI BI SUBJECT - avatar