+ 1
Can we write C with a C++ compiler
7 ответов
+ 6
You can in most of the time.
In sololearn, you can also do this but the scanf() won't work for taking input inside the CPP compiler in sololearn though it will work with most other compilers like cxxdroid.
+ 4
@Athena
There are also other things that don't work in cpp but works in c.
An example taken from geeksforgeeks:
https://code.sololearn.com/ca9a22a5A18A (gets an error)
https://code.sololearn.com/ca12a3a234A2 (gets warning but works fine)
There are also some other things except this.
Reference :
https://www.geeksforgeeks.org/write-c-program-wont-compiler-c/
+ 3
yes
+ 3
Take a look
https://code.sololearn.com/cVzD0FP2PEs2/?ref=app
+ 2
athena as stated scanf
And i also found round() wont work
https://code.sololearn.com/cj1RAcNsbLsK/?ref=app
+ 1
Brain & Bones like what?
+ 1
You may use turbo C