In Ubuntu linux, there is no direct compilation tool. C, java, and c ++ all need to download their own packages. Although this command is available from the beginning like gcc, it is necessary to compile and install the tool. How to compile C1. write the source code and save it as x. c2. open the terminal and switch it to the file directory. 3. Enter the command: gccx. c4. generally, a. out is generated. In this case, run the command:./a. out. I have encountered some problems. in linux of C Ubuntu, there is no direct compilation tool. C, java, and c ++ all need to download their own packages. Although this command is available from the beginning like gcc, it is necessary to compile and install the tool.
How to compile C
1. Write the source code and save it as x. c.
2. Open the terminal and switch to the file directory.
3. Enter the command gcc x. c.
4. Generally, a. out is generated. In this case, run the command:./a. out.
Problems encountered
Somehow, I don't know the very important address symbol "&" in C language during compilation. I often reported an error saying that this variable is not stated. Put it here first.
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.