#include <stdio.h>
#include <string.h>

int main() {
    char a[20];
    scanf("%[^\n]",a);//note if(scanf("%d",a)==1) will not work for array
    
    int len = strlen(a);
    for(int i;i<len-1;i++){
        if(a[i]==' '){// if only i then only 1 shifts and others remain constant
            for(int j=i;j<len;j++)//so we add it to make each iteration to shift
            a[j]=a[j+1];
        }
    }
    printf("%s",a);
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: