I debugged your program and the problem i found is that your program is entering into a never ending loop.
for(i;;i++)
if(a[i]==' ' || a[i]=='\0')
break;
the above loop breaks at i=4 when a[i] was equal to ' '. Later after goto is executed,i is still 4 and when
if(a[i]==' ' || a[i]=='\0')
break;
is evaluated i remains 4 and therefore again breaks from the loop.Thus leading to a endless loop.