C programming, segmentation fault core dunmp :  I am trying to make a program which takes in a input of "Hello" and outputs "olleH" from reversing the order of the characters. However I keep getting a segmentation fault and I don't understand why

    #include <stdio.h>
    #include<string.h>
    
    int main()
    {	
    	int i;
    	int size;
    	char s[100],a[100];
    	
    	printf("Enter the word you want to get reversed: ");
    	scanf("%s",s);
    	
    	
    	while(s[i]!='\0')
     {
       a[i]=s[i];
    	 i++;
     }
    	
    size=sizeof(s);
    	
    	while(i<sizeof(s))
    	{
    		s[i]=a[size];
    		
    	}
    		
    	printf("The reversed string is : %s",s);
    	
    	
    }