Here you are passing the array address to delete_spaces(char a[]) in call delete_spaces(exp) so you dont need to take the return value and assign back as
exp=delete_spaces(exp);
instead change function defination to,
void delete_spaces(char a[]);
and function call to
delete_spaces(exp);
And also put the definition or prototype of function before main(). And remove the return statement from delete_spaces() definition.
and the code for delete_spaces() will be
void delete_spaces( char a[])
{
int l,k=0,i=0;
l=strlen(a);
while(i<l)
{
if(a[i]==' ')
i++;
else
a[k++]=a[i++];
}
a[k]='\0';
}