+ 1

[SOLVED] The following is illegal? How would you correct it?

int main() { float fval; int ival; int *pi; fval=ival=pi=0; }

20th Jun 2017, 6:10 AM
Adithya Pai
Adithya Pai - avatar
2 Respostas
+ 2
Here is a solution for your code. Apparently the commas work. edit I cleaned the code, tomake it easier to follow. https://code.sololearn.com/cMGs57M87KIH/?ref=app
20th Jun 2017, 6:18 AM
Manual
Manual - avatar
+ 2
int main() { float fval; int ival; int *pi; //This is your problem fval=ival=pi=0; } define them as zero one at a time or try using commas. //not sure if the commas will work.
20th Jun 2017, 6:13 AM
Manual
Manual - avatar