Programming in C

Write a C program to delete blank spaces from a line of sentences input by the user:
#include<stdio.h>
#include<string.h>
#include<conio.h>
void main()
{
char sen[150],c;
int i=0;
clrscr();
printf("enter any sentence:");
gets(sen);
puts("the sentence without any blank space is" );
while((c=sen[i++])!='\0')
{
if (c!=32)
printf("%c",c);
}

}

4 comments:

Feel free to contact the admin for any suggestions and help.