Strings

Strings

C Program to Remove all Characters in a String Except Alphabet

This program takes a strings from user and removes all characters in that string except alphabets. This program takes a string from user and for loop executed until all characters of string is checked. If any character inside a string is not a alphabet, all characters after it including null character is shifted by 1 position backwards. C Program to...

C Program to Find the Frequency of Characters in a String

This program asks user to enter a string and a character and this program checks how many times that character is repeated in the string entered by user. C Program to Find the Frequency of Characters in a String : #include <stdio.h> int main(){ char c,ch; int i,count=0; printf("Enter a string: "); gets(c); ...

C Program to print strings in alphabetical order

C Program to print strings in alphabetical order or Lexicographical order : As we all know there are several ways to sort strings alphabetically but using arrays is the easiest.  Ordering Strings into alphabetical form is also referred as Lexicographical ordering of strings. Today we will learn how to sort or print strings in alphabetical order using C programming. ...

C Program to Concatenate two Strings using Arrays

C Program to Concatenate two Strings using Arrays : There are lot of ways of concatenating strings in C programming, also there is standard function in C "strcat" to concatenate the strings. But how to concatenate strings without using standard String function. Today we will learn how to concatenate two strings using arrays. Actually concept is quite easy, we...