Skip to content

This is a test repository for the C programming language with many examples of C code features

License

Notifications You must be signed in to change notification settings

emanuelefavero/c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C

This is a test repository for the C programming language where you can test your C code. It also contains many examples of C code features

Run C code in this repository

You can use main.c to write your C code

How to run C code

There are various ways to run C code in this repository. To find out how to install the necessary tools, please refer to the Resources section.

cpace - development environment (auto compile and run)

cpace main.c

gcc - compiler

gcc main.c -o main

Tip: Rename main in -o main to any name you want

  • Run the compiled code:
./main

Note: You could also use clang instead of gcc to compile C code

Docker

To run the code in a Docker container, you can use the following commands:

docker build -t c-program .
docker run c-program

Note: you need to install Docker on your machine to run the code in a Docker container. The Dockerfile is already in the repository

Note: Running the code in a Docker container could be really useful when running not safe c code

Note: If you change the content of the main.c file, you need to rebuild the Docker image

Resources

Note: You need to already have gcc and node.js installed on your machine to install and use cpace

License

About

This is a test repository for the C programming language with many examples of C code features

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published