How to compile, run C, C + + programs under Linux?
Source: Internet
Author: User
The most important software development tool in Linux is GCC. GCC is the GNU C and C + + compiler. In fact, GCC can compile three kinds of C, C + +, and object C (an object-oriented extension of the C language). Use the GCC command to compile and connect both C and C + + source programs at the same time.
#DEMO #: HELLO.C
If you have two or a few C sources, you can also easily compile, connect, and build executables using GCC. For example, suppose you have two source files Main.c and factorial.c two source files, now you want to compile a program that generates a factorial calculation.
-----------------------
List FACTORIAL.C
-----------------------
#include <stdio.h>
#include <stdlib.h>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.