C String – strupr() function

strupr() function in C String converts all the characters present in a given string to Uppercase. The strupr() function is defined in the header file string.h. It takes a single argument that is the name of the string and is written as follows. strupr(string_name); C Program for strupr() function Output: Original String: SimplE2code.Com Uppercase Characters: … Read more

C String – strlwr() function

strlwr() function in C String converts all the characters present in a given string to Lowercase. The strlwr() function is defined in the header file string.h. It takes a single argument that is the name of the string and is written as follows. strlwr(string_name); C Program for strlwr() function Output: Don’t be alarmed if it … Read more

C String – strrev() function

Reversing a string in C can be done by strrev() function in a single line. This function simply reverses the given string in a program. The strrev() function is defined in the header file string.h. It takes a single argument that is the name of the string and is written as follows. strrev(string_name); C Program … Read more

C String – strcmp() function

strcmp() function is used to compare two string to each other and returns an integer value. The strcmp() function is defined in the header file string.h. It takes two arguments, the name of the first string and the second string. These two strings are compared with each other and the returned integer value depends on … Read more

C String – strcat() function

strcat() function is used to combine two string together to form a single string in a program. It concatenates two strings and the final result is returned to the first string. The strcat() function is defined in the header file string.h. It takes two arguments, the name of the first string and the second string. … Read more

C String – strcpy() function

strcpy() function in C is used to copy the contents from one string (source) to another string (destination). The strcpy() function is defined in the header file string.h. It takes two arguments, destination and source. The source is from where the string is taken and the destination is to where the string is copied and … Read more

C String – strlen() function

strlen() function in C is used to calculate the length of the given string. It counts the number of characters present in a String excluding the null character ‘\0‘. The strlen() function is defined in the header file string.h. It takes one argument that is the string name and written as follows: strlen(string_name); C Program … Read more

C Program to Reverse a String

In this article, we will learn how to Reverse a String in C. Before that you may go through the following topic in C. We will look into two different Programs. 1. First one with the help of a Library function2. Second, without the function. Question:How to write a program in C to Reverse a … Read more