+ 9

Can you give me some examples of things we can do in a C program and not in C++??

I don't understand... Is there anything in C not in C++? //Except conio.h maybe...

9th Apr 2017, 6:11 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
15 Respuestas
+ 8
There is nothing in terms of "missing features" in C that you can't do in C++. If anything, C++ has things C can't do, specifically classes. (C++ is also known as "C with classes.") Edit: "new" is not something C is missing. "new" just allocates memory for a given object and returns a pointer to it. This can be done with "malloc" in C.
9th Apr 2017, 6:26 AM
Neen
Neen - avatar
+ 7
@Krishna Teja Yeluripati Sir, then there will be many such egs..., as many keywords and operators are not there in C, which are there in C++...
9th Apr 2017, 6:18 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 7
I wanted the list of missing features...
9th Apr 2017, 6:19 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 7
@Neen Thank You!
9th Apr 2017, 10:26 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 6
Please give me an answer, all C lovers?!!!
9th Apr 2017, 6:12 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 5
Name a variable as "new".
9th Apr 2017, 6:15 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 1
Question is "things we can do in C and not in C++" Since C++ is superset of C (derived from C there is nothing that can be achieved logically using C but not using C++. And there is no feature of C that is missing in C++.
9th Jun 2017, 3:21 AM
Sandeep Sood
Sandeep Sood - avatar
+ 1
@Sandeep Sood Even then people wish to use C in Code Playground... Why?
9th Jun 2017, 3:24 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
Since C is easier to learn and use than C++
9th Jun 2017, 3:25 AM
Sandeep Sood
Sandeep Sood - avatar
+ 1
@Sandeep Sood First you say there is nothing in C++ that cant be done in C. Then you say C is easier. I agree. But who asked C programmers to use C++ code? They can simply type C codes in the C++ Playground and compile them, right? Why do they still need a seperate support for C? A SoloLearn tutorial only has basics... They just need to change some things like malloc instead of new, FILE* instead of fstream, etc,etc... So, the last question, if C features are there in C++ and there are more features, why do engineers still prefer C?
9th Jun 2017, 3:32 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
embedded project, arduino programs.
9th Jun 2017, 10:04 AM
hung
+ 1
@Hung Arduino Sketches are made using Arduino's own IDE, not any C Compiler... And can't embedded projects be made using c++? I can control 8086 using C++ as well as Raspberry PIs GPIO Pins...
9th Jun 2017, 10:11 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
@ Kinshuk Vashisht as already replied. C is easier to learn and use than C++. For applications in which OOP is not required why go in complexity of C++. Using IDE of C++ to write code of C still means C is preferred.
9th Jun 2017, 1:02 PM
Sandeep Sood
Sandeep Sood - avatar
+ 1
@Sandeep Sood Ok, I got it. Thank You!
9th Jun 2017, 1:26 PM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
+ 1
@Kinshuk Vashisht. Welcome Bro !! ☺☺
10th Jun 2017, 3:38 AM
Sandeep Sood
Sandeep Sood - avatar