I am trying to run this basic file (ex1.c) with zsh
#include <stdio.h>
int main(int argc, char *argv[])
{
puts("hello world.");
return 0;
}
I am getting this error:
zsh: permission denied: ./ex1.c
You need to compile it first, probably by doing gcc -o ex1 ex1.c
.
After compiling it, you will have an executable called ex1
, which you can run by doing ./ex1
.
If you receive another permission denied
error, you can make it executable by doing chmod +x ex1
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With