In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to run linux c program commands, I hope you will learn something after reading this article, let's discuss it together!
Linux runs the c program command: first open the terminal of kali linux, open the file and write code with vim tool; then type [gcc test.cgcc] to compile; finally, run [test.out] and enter [. / test.out] in the terminal.
The way linux runs c program commands:
1. Open the terminal of kali linux. Create a file and name it test.c. Enter: touch test.c at the terminal.
2. You can see that a source file with the suffix test.c has been generated. Then use the vim tool to open the file and write code. Type: vim test.c or gvim test.c in the terminal to open the file and write the code.
3. Finished writing this code. Now start compiling the source file. Enter in the terminal: gcc test.cgcc is the C language compiler included with linux. If it is windows, use the ide tool to compile. Linux systems generally write C language with gcc + vim+gdb three built-in tools on it.
4. After typing gcc test.c and compiling C source files. Then you can see a.out 's file. The general linux system defaults to a.out as a compiled file. Now run the a.out file. Open the terminal in the directory of the a.out file and type. / a.out to run the file.
5. If you want to compile the file name, do not use the a.out file. You can type. GCC test.c-o test.out at compile time and then you can see that there is a test.out. It's a file.
-o the filename generated by the compilation that follows.
6. Run test.out and enter. / test.out in the terminal. The result is shown in the figure. This is done by compiling and running the C language under the linux system.
After reading this article, I believe you have a certain understanding of "how to run the c program command in linux". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.