#include <stdio.h>
#include <string.h>
#include <assert.h>
void removeFirstN(char* str, size_t N) {
assert(N != 0 && str != 0);
size_t len = strlen(str);
if (N > len)
return;
memmove(str, str + N, len - N + 1);
}
int main(void) {
char str[] = "c programming";
int N = 4;
removeFirstN(str, N);
puts(str);
return 0;
}
/*
run:
ogramming
*/