0

Why is my code working without declaring the square function in C and I'm directly using it?

https://code.sololearn.com/cPraXa24B2d9/?ref=app

30th Jul 2018, 1:06 PM
Parth Salat
Parth Salat - avatar
3 Antworten
+ 1
It's likely compiler dependant. I think some versions​ of GCC will generate a warning, but still compile with our errors​. I think Sololearn will only output warnings​ if there are errors also.
31st Jul 2018, 5:26 AM
Jared Bird
Jared Bird - avatar
0
it doesn't matter that you have written function at the bottom of main function or upper side you just need to write it to call in a program.
30th Jul 2018, 1:49 PM
Rohan Vijayvergiya
Rohan Vijayvergiya - avatar
0
you have written your logic for the square of a number without using inbuilt libraries ..if u dont feel like developing ur own logic then you can use the in built pow function ...for example you can build your own logic for concatenating two strings or use the in built function called concat() which is available under string.h i suppose
30th Jul 2018, 2:09 PM
Suhail Pappu
Suhail Pappu - avatar