Problem:- C program to delete vowels from a string or Remove vowels string using pointers in C or C Program to Delete Vowels from String or Remove Vowels from string using pointers in C or WAP to remove vowel string using Pointer and Function or C Program to delete vowels in a string or C Program To Remove Vowels From String or C program to delete vowels from a string or C program to delete all vowels from a sentence or
Explanation:- Removing vowel from a string, first we are taking an input from user and storing the string after that we use a "For loop" and Put a Condition or function If string is containing any vowels like a, e, i, o, u or A, E, I, O, U than return zero or if string does not contain any vowels than store the string into another string array and for each iteration increase the index of second string array. If we do not increase the index of a second string array then in the first index next all incoming non-vowels will be stored and replace thus our program will return the last non-vowel character as output.
See This:- C Program To Find Character Is Vowel Or Not
Extreme Recommended:- Like our Facebook Page or Join our Facebook Group and Google plus Community for up-to-date for a new post or if you have any Query you can ask there with lots of coders also suggest to your Friends to join and like our page, so we can help our community, and don't forget to Subscribe. Enter your Email and click to subscribe.
Solution:-
#include<stdio.h>
#include<string.h>
int isvowel(char);
void main()
{
/* Visit - www.programmingwithbasics.com*/
char str[100],new[100];
int i,j=0;
printf("Enter a String To Remove Vowels \n\n");
gets(str);
for(i = 0; str[i] != '\0'; i++)
{
if(isvowel(str[i]) == 1)
{
new[j] = str[i];
j++;
}
}
new[j] = '\0';
printf("\n\nString After Removing Vowels: \n\n%s", new);
getch();
}
int isvowel(char ch)
{
switch(ch)
{
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
case 'A':
case 'E':
case 'I':
case 'O':
case 'U':
return 0;
default:
return 1;
}
}
Output:-
You May Also See
1. C Program For Check String Is Palindrome Or Not Using For Loop
2. C Program For Convert All Input String Simultaneously Into Asterisk ( * )
3. C Program For Compare Two String Using strcmp Function
4. C Program For Check String Is Palindrome Or Not
4. C Program For Check String Is Palindrome Or Not
5. C Program For Convert Binary to Octal and Vice Versa Using Function
6. C Program to Display Prime Numbers Between Intervals Using Using Function
7. C Program to Check Prime or Armstrong Number Using Function
6. C Program to Display Prime Numbers Between Intervals Using Using Function
7. C Program to Check Prime or Armstrong Number Using Function
9. C Program To Store Student Information Like (Name, Roll & Marks) In C Using Structure
10. C Program To Store Students Information of Using Structure
10. C Program To Store Students Information of Using Structure
0 Comments: