Skip to content

Commit b926d73

Browse files
committed
delete vowels from string c-basics
1 parent 0d89e76 commit b926d73

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

stringdeletevowel.c

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include<stdio.h>
2+
#include<string.h>
3+
void main()
4+
{
5+
int n,i,z,temp=0,j=0;
6+
char a[50],l[50];
7+
printf("Enter the string");
8+
gets(a);
9+
z=strlen(a);
10+
for(i=0;i<z;i++)
11+
{
12+
if(a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u'||a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U')
13+
{
14+
15+
//temp++;
16+
}
17+
else
18+
{
19+
l[j]=a[i];
20+
j++;
21+
}
22+
}
23+
24+
for(i=0;i<j;i++)
25+
{
26+
printf("%c",l[i]);
27+
}
28+
}

0 commit comments

Comments
 (0)