Skip to content

Tag Archives: CPP-Library

In C++ we can store string by one of the two ways – C style strings string class (discussed in this post) In this post,… Read More
A bitset is an array of bool but each Boolean value is not stored separately instead bitset optimizes the space such that each bool takes… Read More
unordered_map is an associated container that stores elements formed by the combination of a key value and a mapped value. The key value is used… Read More
All the permutations of a word when arranged in a dictionary, the order of words so obtained is called lexicographical order. in Simple words, it… Read More
Splitting a string by some delimiter is a very common task. For example, we have a comma-separated list of items from a file and we… Read More
How would you solve below problems in C/C++? What is the smallest representable positive floating point number in C/C++? What is the largest representable negative… Read More
In C++, if we need to read a few sentences from a stream, the generally preferred way is to use the getline() function as it can… Read More
memmove() is used to copy a block of memory from a location to another. It is declared in string.h // Copies "numBytes" bytes from address… Read More
memcpy() is used to copy a block of memory from a location to another. It is declared in string.h // Copies "numBytes" bytes from address… Read More
“Setjump” and “Longjump” are defined in setjmp.h, a header file in C standard library. setjump(jmp_buf buf) : uses buf to remember current position and returns… Read More
These are two important header files used in C programming. While “<stdio.h>” is header file for Standard Input Output, “<stdlib.h>” is header file for Standard… Read More
fprintf is used to print content in file instead of stdout console. int fprintf(FILE *fptr, const char *str, ...); Example:  C // C Program for… Read More
Syntax:  int sprintf(char *str, const char *string,...); Return:  If successful, it returns the total number of characters written excluding null-character appended in the string, in… Read More
The memcpy function is used to copy a block of data from a source address to a destination address. Below is its prototype. void *… Read More
itoa function converts integer into null-terminated string. It can convert negative numbers too. The standard definition of itoa function is give below:-   C char* itoa(int… Read More

Start Your Coding Journey Now!