answersLogoWhite

0

Why the extension cpp of c?

User Avatar

Anonymous

15y ago
Updated: 8/17/2019

The extension of a file containing a C program can be any extension, so long as the compiler or platform can infer the proper rules to build it. Commonly, for C programs, the extension is .c, so myfile.c would be a C program. The term cpp is not a designation for C++. It means C Program Precompiler, and it is the normal way to build one or more C programs into an executable. Over the years, cpp has evolved into being able to handle all sorts of languages. C++ is one of them. Typical extensions for C++ programs are .cc, .cpp, and .cxx.

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

What is extension in c programming?

for c language it is .c and for c++ it is .cpp


What c plus plus program must be saved in a text with the extension cpp?

The .cpp extension is merely conventional; it is not required by the C++ standard. You can actually use any file extension you wish.


How the c and cpp extension files can be retrived using FIND command in Linux?

find . -iname '*.c' -o -iname '*.cpp'


How does a compiler interpret the difference between c and c plus plus?

from the extension of your file.If it has an extension of .cpp then it is a c++ programIf it's extension is .c, then it is a C program.


What is the extension of a C plus plus file?

.h for headers, .cpp or .cc for sources


How do you Open a text file as C plus plus source code?

All C++ source code is is a text file with the .cpp extension. So if you save your code as *****.cpp then it is automatically C++ source code.


A program without an extension name CPP will run?

Yes because a program can run without a CPP extension, especially if program extension is .exe


A program in c plus plus will run without an extension name CPP?

Yes. cpp is merely a convention to differentiate C++ source code from C source code, just as hpp is used to differentiate C++ header files from C header files (*.h). But they are just conventions, not rules: you can use any extension you like for both header and source files. For example, there's nothing to prevent you using the cpp extension for a header file. However, using the conventions makes it much easier to organise and recognise your files.


Where do you do C programming in Windows XP on a computer?

You would first need to obtain a C compiler. If you know C, you could compose it in Notepad and give it the .c extension (or C++ and give it the .cpp extension) if you wanted to. However, you would need a compiler if you wanted to compile the program and run it.


Why we use extension as cpp in c plus plus programs?

Source files use a .cpp file extension, while headers use .hpp. However, this is merely a convention. Most C++ programmers use .h for all headers, even though this convention implies a C-style header rather than a C++ header. Ultimately, the extension is immaterial. If the file can be included in other files, then it is a header, otherwise it is a source file.


What is new cpp headers?

Not sure what you mean by "new" headers. You probably mean the C++ standard library headers, however these headers have been in existence since before 1998 when the language first became standardised. Prior to that, C++ used the C standard library headers, all of which have a .h extension. The C++ standard library headers have no file extension.


Program that is executed in c but not in c?

Answer1. When you save file using extension ".c" the program executes using "C" compiler and it cannot execute any other program which is not in "C".So, we cannot execute program in "C" which is not in "C".2. When you save file using extension ".cpp" the program executes using "C++" compiler and it can execute program of "C" but it should be saved with extension ".cpp".So, There is a program which is not in "C++" can be executed in "C++" compiler.Another answerYour question is ambiguous. 1. Okay in C++ but not in C:int main (void){ cout