In C programming we need lots of format specifier to work with various data types. Format specifiers defines the type of data to be printed on standard output. Whether to print formatted output or to take formatted input we need format specifiers. Format specifiers are also called as format string.
C programming
C program to convert string to lowercase
Write a C program to convert uppercase string to lowercase using for loop. How to convert uppercase string to lowercase without using inbuilt library function strlwr(). How to convert string to lowercase using strlwr() string function.
Example
Input
Input string: I love CODEFORWIN.
Output
Lowercase string: i love codeforwin.
C program to convert lowercase string to uppercase
Write a C program to convert string from lowercase to uppercase string using loop. How to convert string from lowercase to uppercase using for loop in C programming. C program to convert lowercase to uppercase string using strupr() string function.
Example
Input
Input string: I love Codeforwin.
Output
I LOVE CODEFORWIN.
C program to check whether a string is palindrome or not
Write a C program to check whether a string is palindrome or not without using loop. How to check whether a string is palindromic string or not in C programming. Logic to check palindrome string in C program.
Example
Input
Input string: madam
Output
Palindrome string
C program to find reverse of a string
Write a C program to find reverse of a given string using loop. How to find reverse of any given string using loop in C programming. Logic to find reverse of a string without using strrev() function in C. C program to reverse a string using strrev() string function.
Example
Input
Output
Reverse string: olleH
C program to count total number of vowels and consonants in a string
Write a C program to find total number of vowels and consonants in a string using loop and if else. How to find total number of vowels and consonants in a string using switch case in C programming. Logic to count number of vowels and consonants in a string.
Example
Input
Input string: I love Codeforwin.
Output
Total Vowels = 7 Total Consonants = 8
C program to find length of a string
Write a C program to find length of a string using loop. How to find length of a string without using in-built library function strlen() in C programming. Effective way to find length of a string without using strlen() function. How to find length of a string using strlen() string function.
Example
Input
Input string: I love programming. I love Codeforwin.
Output
Length of string: 38
C program to count number of words in a string
Write a C program to count total number of words in a string using loop. How to find total number of words in a given string using loops in C programming. Logic to count total number of words in a string.
Example
Input
Input string: I love Codeforwin.
Output
Total number of words: 4
C program to count frequency of each character in a string
Write a C program to count frequency of each character in a string using loop. How to find frequency of each characters in a string in C programming. Logic to count frequency of each character in a given string in C program.
Example
Input
Input string: Codeforwin
Output
Frequency of all characters in the given string: 'c' = 1 'd' = 1 'e' = 1 'f' = 1 'i' = 1 'n' = 1 'o' = 2 'r' = 1 'w' = 1