Is there something we can do in C but not in C++?

Declare variable names that are keywords in C++ but not C.

Answer Posted / ruth

Aside from a few minor differences, there's nothing C can
do that C++ can't. About the only things I can think of are:

int foo = Something();

int array[ foo ]; // C++ can't do this, but C can IIRC


Of course C++ provides alternatives to do the same thing:

vector<int> array(foo); // similar code in C++


C is more friendy for making external libraries. A DLL
compiled in C will likely work in any C/C++ program made in
any other C/C++ compiler. Whereas DLLs made with C++ often
only work in C++ programs made in the same C++ compiler

Is This Answer Correct ?    4 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between c and python?

678


What is a keyword?

856


How do I get an accurate error status return from system on ms-dos?

746


Explain how do you print only part of a string?

752


Why void is used in c?

666






How to write a program for machine which is connected with server for that server automatically wants to catch the time for user of that machine?

1689


what is bit rate & baud rate? plz give wave forms

1625


Write a program to find factorial of a number using recursive function.

740


What is typedef struct in c?

690


How can you find the exact size of a data type in c?

684


Where does the name "C" come from, anyway?

726


using for loop sum 2 number of any 4 digit number in c language

1852


What is a stream in c programming?

695


What are header files why are they important?

688


A collection of functions,calls,subroutines or other data a) library b) header files c) set of files d) textfiles

752