answersLogoWhite

0

Can a user compile c programme using c plus plus compiler?

Updated: 8/19/2019
User Avatar

Wiki User

13y ago

Best Answer

Usually, but not always. For example the following is legal in C, but illegal in C++:

char new [3] = "ABC";

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can a user compile c programme using c plus plus compiler?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Is NotePad Plus Plus a compiler?

Notepad++ is a text editor, not a compiler. You can however, enter source code into Notepad++ and then compile it with a compiler such as GCC.


Does C plus plus compiler will compile C in programming?

Yes we can compile a c program using c++ compiler. Because c++ evolved from the c. c++ have some additional features beyond c. c++ support almost all concepts used in c.


Why wont your C plus plus programs compile?

C++ programs won't compile if they contain compiler errors. The compiler will tell you precisely where the error is, and the type of error, unless the error is in a macro. The compiler cannot see macro definitions because they are inline expanded prior to compilation.


How is java different than any other OOP languages like C plus plus?

Every languages are different, a C++ compiler cannot compile a Java source.


Can I programming with Ansi c plus plus with w2000p?

Yes, if you have an ANSI C++ compiler. Most modern compilers are ANSI, and are capable of suppressing non-ANSI code, using a compiler option.


What steps are required to locate math.h in C plus plus?

To find math.h, simply include it ... #include <math.h> ... The compiler knows where the standard libraries are. This is a function of where the compiler is installed, and varies from system to system. By using the carets (< and >) you are telling the compiler to look in the "standard" places.


How do you compile a C code in MS VS c plus plus?

Just build it with F7, or execute it with F5/F5. The MS VS Compiler understands the difference between C and C++. You can name the source file as something.C, if you want.


Which compiler is used for writing c plus plus exception handling programs?

C++ compiler, obviously, a C compiler won't do.


How do you build c plus plus programs using netbeans IDE?

Netbeans is primarily a code editor and Java compiler. Although it supports the C++ language, it has no C++ compiler or linker. For that you must provide your own.


With the aid of a diagram illustrate how the c plus plus compiler works?

With the aid of a diagram,illustrate how the c plus plus compiler works?


Can the c plus plus language compiler also be used for the c language?

Yes, but you must tell the compiler that the code is C otherwise it will be treated as if it were C++, which could lead to subtle runtime errors where the languages contain "silent differences", or compilation errors where valid C code would be invalid in C++.Although you can mix C and C++ code in the same source, it makes sense to use separate translation units for each. Thus, when a header contains C code, you can include that header in a C++ program using the following construct:extern "C"{#include "c_header.h"}Everything between the opening and closing braces will be treated as C code and will be compiled as such.


Can we use same compiler for both c and c plus plus language?

Yes. In fact both the C++ compiler and the linker are intrinsically command-driven; the IDE (if you have one) simply provides a graphical front-end to both. Consult your compiler/linker documentation to view the required command line syntax. In particular, consult the 'makefile' topic which should show you how to create a command file (or batch file) that can automate the entire process for a particular project.