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 – String Functions

Often, we need t to manipulate the String according to the need of the program. However, we can do that manually in a program but that is complex to comprehend and the program becomes very large. So to make it easy, C provides us with some library functions. And these functions are defined under string.h … Read more

C gets() and puts() functions in String

In this tutorial, you will learn about the two functions that are used in String, gets() and puts() function in C. Learn more on String. How o read and write a line of text in C gets() and puts() function are used for reading and writing a line of text or String in C. These … Read more

Strings in C

This tutorial contains about the String in C programming. You will learn about the declaration, initialization of String, and the use of string with examples. What is String? A string is defined as a series of characters or an array of characters(terminated by a null character ‘\0’). Each character present in the array occupies one … Read more

C – Pointer to Pointer (with Example)

As we know by now that a pointer stores the address of the pointed variable. But it is not the only use, pointer also stores the address of another pointer forming a chain like structure. When we defined the pointer to a pointer, it means the first pointer contains the address of the second pointer … Read more