use:
for (int myHeight =1;myHeight <width; myHeight++)
{
for (int myBase=1;myBase<length;myBase++)
{
if(myBase==1 || myBase==length-1 )
printf(c);
else if(myHeight==1 || myHeight==width-1)
printf(c);
else
printf(" ");
}
printf("\n");
}