ProAnswers.org

Write a C program to delete all occurrences of vowels in a given text. Assume that the text length will be of one line?

#include<stdio.h>

#include<conio.h>

void main()

{

char line[20], line2[80];

int i,j=0;

clrscr();

printf(“enter text below.\n”);

gets(line);

for(i=0;i<80;i++)

{

If(line[i]= =‟a‟ || line[i]= =‟e‟ ||line[i]= =‟i‟ ||line[i]= =‟0‟||line[i]= =‟u‟)

continue;

else

{

line2[j]=line[i];

j++;

}

}

Printf(“\n Text with Vowels: %s”, line);

Printf(“\n Text without vowels:%s”, line2);

getch();

}

Output:

Enter text below.

anandamurugan

Text with vowels: anandamurugan

Text without vowels: nndmrgn