I tried making a program to take a string, remove the first character, then move the rest back one index, but when i compile and run it it just returns the same string.
Here's the code
#include <stdio.h>
#include <string.h>
void remfirst(char arr[]) {
for(int i = 0;i <= strlen(arr); i++) {
arr[i] = arr[i+1];
}
}
int main() {
char string[32];
fgets(string, 32, stdin);
remfirst(&string[32]);
printf("%s", &string);
return 0;
}