Tag Archives: String

C program to find minimum occurring character in a string

Write a C program to find minimum occurring character in a string using loop. How to find lowest frequency character in a string using loop in C programming. Program to find minimum frequency character in a given string in C. Logic to find least occurring character in a given string.

Example

Input

Input string: I love learning programming at Codeforwin.

Output

Minimum occurring character is '.' = 1

Continue reading C program to find minimum occurring character in a string

C program to find maximum occurring character in a string

Write a C program to find maximum occurring character in a string using loop. How to find highest frequency character in a string using loop in C programming. Program to find the highest occurring character in a string in C. Logic to find maximum occurring character in a string in C programming.

Example

Input

Input string: I love Codeforwin.

Output

Maximum occurring character: 'o'

Continue reading C program to find maximum occurring character in a string

C program to toggle case of each character in a string

Write a C program to toggle case of each characters of a string using loop. How to change case of each characters of a string in C programming. Program to swap case of each characters in a string using loop in C. Logic to reverse the case of each character in a given string in C program.

Example

Input

Input string: Learn at Codeforwin.

Output

Toggled case string: lEARN AT cODEFORWIN.

Continue reading C program to toggle case of each character in a string

C program to count occurrences of a word in a string

Write a C program to count occurrences of a word in a given string using loop. How to count total occurrences of a given word in a string using loop in C programming. Logic to count occurrences of a word in given string.

Example

Input

Input string: I love programming. I love Codeforwin.
Input word to search: love

Output

Total occurrences of 'love': 2

Continue reading C program to count occurrences of a word in a string

C program to remove all occurrences of a word in string

Write a C program to remove all occurrences of a given word in string using loop. How to remove all occurrences of a word in given string using for loop in C programming. Deleting all occurrences of a word in given string in C program. Logic to remove all occurrences of a word in given string.

Example

Input

Input string: I love programming. I love Codeforwin.

Input word to remove: I

Output

String after removing 'I':
 love programming.  love Codeforwin.

Continue reading C program to remove all occurrences of a word in string

C program to remove last occurrence of a word in string

Write a C program to remove from last occurrence of a word in given string using loop. How to remove the last occurrence of any word in given string using loop in C programming. Logic to remove last occurrence of a word from given string.

Example

Input

Input string: I am a programmer. I learn at Codeforwin.
Input word to remove: I

Output

String after removing last occurrence of 'I': 
I am a programmer.  learn at Codeforwin

Continue reading C program to remove last occurrence of a word in string

C program to search all occurrences of a word in given string

Write a C program to search all occurrences of a word in given string using loop. How to find index of all occurrences of a word in given string using loop in C programming. Logic to search all occurrences of a word in given string.

Example

Input

Input string: I love programming. I love Codeforwin.
Input word to search: love

Output

'love' is found at index: 2
'love' is found at index: 22 

Continue reading C program to search all occurrences of a word in given string

C program to find last occurrence of a word in given string

Write a C program to find last occurrence of a word in given string using loop. How to find last occurrence of a word in given string using loop in C programming. Logic to search last index of a word in given string in C programming.

Example

Input

Input string: I love programming. I love Codeforwin.
Input word: love

Output

'love' is found at index: 22

Continue reading C program to find last occurrence of a word in given string

C program to search all occurrences of a character in a string

Write a C program to search all occurrences of a character in a string using loop. How to find all occurrences of a character in a given string using for loop in C programming. Program to print all index of a character in a given string. Logic to search all occurrences of a character in given string in C program.

Example

Input

Input string: I love programming. I love Codeforwin.
Input character to search: o

Output

'o' found at index: 3, 9, 23, 28, 32

Continue reading C program to search all occurrences of a character in a string

C program to count occurrences of a character in a string

Write a C program to count all occurrences of a character in a string using loop. How to find total occurrences of a given character in a string using for loop in C programming. Logic to count total occurrences of a character in a given string in C program.

Example

Input

Input string: I love programming. I love Codeforwin.
Input character to search: o

Output

Total occurrences of 'o': 5

Continue reading C program to count occurrences of a character in a string