I made a program which removes spaces and makes a string upper case by preprocessor directives .its not changing to uppercase
#include <stdio.h>
#include <conio.h>
# define TOUPPER(x) (x-32)
void main(void)
{
int i,j;
char str[100],*p;
clrscr();
printf("Enter the string:\n");
gets(str);
for(i=0; ;i++)
{
if(str[i]=='\0')
break;
if(str[i]==' ')
{
for(j=i; ;j++)
{
str[j]=str[j+1];
if(str[j]=='\0')
break;
}
}
if(str[i]<='a'||str[i]>='z')
{
*p=str[i];
TOUPPER('p');
}
}
puts(str);
getch();
}