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

int main()
{

    int i,x;
    char c[100];

    printf("Enter input :");
    fgets(c,100,stdin);

    for( i = 0 ; i <= (x = (strlen(c))) ; i++)
    {

        if( c[i] = '\t')
        {
            c[i] = (' ');
                        printf("   ");
        }
        printf("%c",c[i]);
    }
}
the aim of this program is that it will replace tabs entered in the input with 4 spaces.

need help with this program .

this programe is giving compile error:-

SEGMENTATION FAULT