answersLogoWhite

0

How does c plus plus code compiled?

User Avatar

Anonymous

11y ago
Updated: 8/19/2019

When you invoke the compiler, the preprocessor (also known as the precompiler) runs first to process all the precompiler directives and macros; the lines beginning with the pound symbol (#) such as #define and #include. The preprocessor also strips out all of the comments. The preprocessor achieves this by creating one or more temporary, intermediate files containing nothing but C++ code. The compiler then compiles these intermediate files into object code which the linker uses to create the final executable.

User Avatar

Wiki User

11y ago

What else can I help you with?

Related Questions

What is a source code file in c plus plus?

A source code file is a plain-text file containing C++ instructions. The instructions must be compiled and linked to create a native machine code executable.


Is C plus plus interpreted as the program is executed?

No. Neither C nor C++ are interpreted. Both need to be compiled and linked to produce highly-optimised machine code, which is then executed.


What are the interpreter in c plus plus?

C++ is a compiled language, not an interpreted language.


'How does a C plus plus code execute on a computer system' like does the computer has a library or such that can understand C plus language and translate it into binary?

By execution time, the code has already been translated into binary ("compiled"). However, the program may still rely on outside libraries (.dlls for example) that have also been pre-compiled.


Is c plus plus a complied or interpreted language?

C++ is generally a compiled language.


Can all C programs are executable in C plus plus?

Some C programs can be compiled in C++, yes.


Is C plus plus interpreted or compiled?

C++ is conventionally regarded as a compiled language, however there's nothing in the language itself that prevents it from being interpreted.


There a program that uses both interpreted and compiled code?

Yes.EasyTreve Plus has both an interpreted and a compiled version available.


What is the different between Compiler and Interpreter in C or C plus plus programming?

It is easy to tell: there is no interpreter for C and C++, they are compiled languages.


How does a C plus plus code execute on a computer system?

C++ is plain-text source code -- it cannot be executed. It must first be compiled and then linked to produce a machine code file specific to the hardware you are targeting. That is, a C++ program compiled and linked for Windows platforms will not execute on Mac or Linux platforms -- it must be compiled and linked separately on each platform. If the source code includes platform-specific libraries and code, compiler directives can be used to filter the correct libraries and code for each platform being targeted. Once compiled and linked, the resulting machine code file (typically an EXE or DLL) can then be executed. Some sources are intended to build static libraries (LIB files). These cannot be executed as they are intended for static linking (achieved during the link process). The C++ Standard Library is typically implemented via static libraries.


Is Java or C plus plus faster?

Java is considerably more convenient than either C or C++ due to its extremely high level of abstraction. However, that convenience comes at the cost of both performance and efficiency.


Is there any software for running a c plus plus codes in Linux obuntu?

C++ source code cannot be run, it must be compiled and linked to produce an executable. Linux has many compilers available, with gcc being one of the most popular.