Skip to content

Tag Archives: C-String

The strlen() function calculates the length of a given string.The strlen() function is defined in string.h header file. It doesn’t count null character ‘\0’. Syntax:… Read More
The strupr( ) function is used to converts a given string to uppercase. Syntax: char *strupr(char *str); Parameter: str: This represents the given string which… Read More
The strnset() function is a builtin function in C and it sets the first n characters of a string to a given character. If n… Read More
strcpy() function The strcpy() function is used to copy the source string to destination string. If the buffer size of dest string is more than… Read More
Given a string of length n having parentheses in it, your task is to find whether given string has balanced parentheses or not. Please note… Read More
Prerequisites : strncmp, strcmp The basic difference between these two are : strcmp compares both the strings till null-character of either string comes whereas strncmp… Read More
Given an IP Address and task is to change the IP address equivalent the hexadecimal value. Examples: Input : Output : 0x7f000001 Input :… Read More
The isblank()function returns non-zero if ch is a character for which isspace() returns true and is used to separate words. Thus for English, the blank… Read More
If you are dealing with the wide characters then printf() and scanf() function cannot be used. There are different functions for input and output C… Read More
Write a program to find the length of a string using pointers. Examples: Input : given_string = “geeksforgeeks”Output : length of the string = 13… Read More
We can use inbuilt strcpy() function to copy one string to other but here, this program copies the content of one string to another manually… Read More
In C++, std::substr() is a predefined function used for string handling. string.h is the header file required for string functions. The substring function is used for… Read More
strcoll() is a built-in library function and is declared in <string.h> header file. This function compares the string pointed to by str1 with the one… Read More
The strspn() function returns the length of the initial substring of the string pointed to by str1 that is made up of only those character… Read More
strcat() The strcat() function will append a copy of the source string to the end of destination string. The strcat() function takes two arguments: 1) dest 2)… Read More

Start Your Coding Journey Now!