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)… Read More »
In 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… Read More »
Base 64 is an encoding scheme that converts binary data into text format so that encoded textual data can be easily transported over network un-corrupted… Read More »
Strings are defined as an array of characters. The difference between a character array and a string is the string is terminated with a special… Read More »
strcpy() is a standard library function in C/C++ and is used to copy one string to another. In C it is present in string.h header… Read More »
strcmp() is a built-in library function and is declared in <string.h> header file. This function takes two strings as arguments and compare these two strings… Read More »
Below is syntax of Scanf. It requires two arguments: scanf(“Format Specifier”, Variable Address); Format Specifier: Type of value to expect while input Variable Address: &variable… Read More »
Output of following C program? Assume that all necessary header files are included (A) GeeksQuiz (B) Geeks (C) Geeks Quiz (D) Quiz Answer: (A) Explanation:… Read More »
Write a function mysubstr() in C that doesn’t use any string function, doesn’t use any loop and prints substring of a string.
Write a C function print(n) that takes a long int number n as argument, and prints it on console.
Predict the output of following program, assume that a character takes 1 byte and pointer takes 4 bytes. (A) sizeof(str1) = 10, sizeof(str2) = 10… Read More »