Skip to content

Tag Archives: C-String

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 then… 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 : 127.0.0.1 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… 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. This function takes two values… 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
In C/C++, strncat() is a predefined function used for string handling. string.h is the header file required for string functions.This function appends not more than… Read More
strrchr() function In C++, strrchr() is a predefined function used for string handling. cstring is the header file required for string functions.This function Returns a pointer… Read More