The error in the printf line is that the quotation marks used for the string should be straight double quotes (" "), but in the code provided, curly quotes (“ ”) are used instead. The correct syntax should be:
printf("Temp: %f \n", Temp);
By replacing the curly quotes with straight double quotes, the error will be resolved.
C program:
double k, Temp;
for(k=-10, k<=40; k++){
Temp = k * 9/5 + 32;
printf(“Temp: %f \n”, Temp);
}
the printf line is giving me error. what is the error?
1 answer