Theory
Write a C program to count occurrences of a word in a given string.
/**
* C program to count total number of vowel or consonant in a string using switch case
*/
#include
#include
#define MAX_SIZE 100 // Maximum string size
int main()
{
char str[MAX_SIZE];
int i, len, vowel, consonant;
/* Input strings from user */
printf("Enter any string: ");
gets(str);
vowel = 0;
consonant = 0;
len = strlen(str);
for(i=0; i='a' && str[i]='A' && str[i]= 'a' && *s = 'A' && *s .... Show MoreFrom Strings in C programming · C programming
Write a C program to count occurrences of a word in a given string.
Write a C program to compare two strings
Write a program in C to find the largest and smallest word in a string.
Write a C program to find maximum occurring character in a string.
Write a C program to search all occurrences of a character in a string.
Write a C program to find length of a string.
Write a C program to copy one string to another string.
Write a C program to concatenate two strings.