1.

Write a c program to delete the all consonants from given string

Answer»
#include #include /* * * cplusplusp1 * indian (AIUB) * */ int MAIN(){ char str[20]; int i,J; printf("ENTER any string: "); scanf("%s",str); printf("\NTHE string is: %s",str); for( i = 0;i < strlen(str); i++){ if(str[i] != 'a' && str[i] != 'e' && str[i] != 'i' && str[i] != 'o' && str[i] != 'u'){ for(j = i; j < strlen(str); j++){ str[j] = str[j+1]; } i--; } } printf("\n\n Rest Of The string is: %s",str); return 0; }


Discussion

No Comment Found