Skip to content
Sign upLog in
This post is read-only. Explore Repls and connect with other creators on Community.View Community
The info in this post might be out of date, check out our docs instead. View docs
7

How to run multiple C files.

DeepakR_28
DeepakR_28

image

This is how I can store and run different python files in the same repl, how to do it for C language.

2 years ago
Answered by Wumi4View Answer

Voters

Comments

TopNew
4
Wumi4
Wumi4

You can open the Repl Terminal by using Ctrl+Shift+P or Ctrl+Shift+S. In the terminal, type:

# filename and filename.c are the file name that you want to compile gcc -o filename filename.c

Then you should see an executable file called filename, run that file by using:

./filename
2 years ago
1
DeepakR_28
DeepakR_28

@Wumi4
Thank you soooo much!!!

2 years ago
1
DeepakR_28
DeepakR_28

@Wumi4

image

it was working fine, but suddenly after fixing some errors i cant run any file.. why is is saying permission denied?? any help if possible??

2 years ago
2
Wumi4
Wumi4

@DeepakR_28 I think because your executable file does something that requires root permission (which is not possible in Repl) to do or Repl requires root permission to run every executable file. So maybe the possible way is to run it on your local computer or use .replit, of course with gcc installed. If you are in Windows, use MinGW for gcc binding.

2 years ago
1
programmeruser
programmeruser

@DeepakR_28 chmod +x <the name of the executable

2 years ago