I put the code in a source file and give it permission to execute then when I run this file, the output appears in the picture what does that mean? How can I solve it?
#include <stdio.h>
//unsigned long balance;
//float deposit;
//int choice, pin, k,withdraw;
//char name[20];
int main() {
char name[20];
printf("Enter your first and last name");
scanf("%s", name);
for (int i = 0; name[i] != '\0'; ++i) {
if (!(name[i] >= 'a' && name[i] <= 'z') || (name[i] >= 'A' && name[i] <= 'Z')) {
printf("The entered name is not all Alphabet char plz insert a valid name");
break;
}
}
}
You can't run a .c file like it's a script. You need to compile it first:
gcc -o main main.c
./main