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

Explain how can I pad a string to a known length?

639


What functions are in conio h?

647


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2714


What is the explanation for prototype function in c?

559


What is the easiest sorting method to use?

628






How can I send mail from within a c program?

573


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

638


Write a c program to build a heap method using Pointer to function and pointer to structure ?

4167


Please send me WIPRO technical question to my mail ID.. its nisha_g28@yahoo.com please its urgent

1638


How do I send escape sequences to control a terminal or other device?

600


what is event driven software and what is procedural driven software?

2003


What is getch?

624


Is c still used?

591


What is function what are the types of function?

552


Is it possible to pass an entire structure to functions?

548