Search
 
SCRIPT & CODE EXAMPLE
 

C

c program that replace vowels in a string with char

#include <stdio.h>

int main()
{
	int i,k;
	char arr[50];
	
	printf("Enter char: ");
	gets(arr);
	k=strlen(arr);
	for(i=0;i<k;++i){
		if(arr[i]=='a'||arr[i]=='e'||arr[i]=='i'||arr[i]=='o'||arr[i]=='u'||arr[i]=='A'||arr[i]=='E'||arr[i]=='I'||arr[i]=='O'||arr[i]=='U'){
			printf("_");
		}
		else{
			printf("%c",arr[i]);
		}
	}
} 
 
Comment

PREVIOUS NEXT
Code Example
C :: c loop 
C :: fgets c 
C :: how to take blank space in c scanf 
C :: how to call function after some time in vue.js 
C :: fibonacci series in c 
C :: concatenate two strings without standard library in C 
C :: link list c 
C :: lichess puzzles 
C :: string array in c 
C :: sh: tailwindcss: command not found 
C :: c print 2d array 
C :: apt-mark remove hold 
C :: signed and unsigned in c 
C :: increment and decrement operator 
C :: access 2d array with pointer c 
C :: check if string contains a character in c 
C :: enum case statement in c 
C :: C special character display 
C :: declaration of string in c 
C :: files in c programming 
C :: two way communication between child and parent processes in C using pipes 
C :: sOY wapo ya lo c 
C :: run a command in cmd with c 
C :: findtotalcurtain 
C :: epita 
C :: table de hachage en c 
C :: man write c 
C :: syntax of for loop in c stack over flow 
C :: BEE/URI problem no 1181 solution in C 
C :: ::template 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =