I wrote a simple program named b.c to call dir
in Windows 10 cmd via C.
This is what the script looks like:
#include <stdlib.h>
int main()
{
system("dir");
return 0;
}
I typed this in cmd
gcc b.c
b
but it returns
J:\fundamental of C programming>b
'b' is not recognized as an internal or external command, operable program or batch file.
This is how I add path
I don't think it is path matter.
So how can I fix it?