Sunidhi Bansal has Published 1100 Articles

DEQUE CRBEGIN() in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 30-Jan-2020 07:42:23

112 Views

Given the task is to show the working of deque::crbegin() in C++.Deque is a double ended queue that gives insertion and deletion at each end i.e. front and back with high performance, in contrast to vector that gives high performance insertion at the end i.e. back only.Also, it provides random ... Read More

Find elements of an array which are divisible by N using STL in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 10:26:44

158 Views

Given with an array and the task is to find the number which are divisible by N using standard template library in C++.To solve this problem we are using the function count_if() present in C++ standard template library.What is a count_if() function?Syntaxcount_if(LowerBound, UpperBound, function)Description − This function returns the number ... Read More

Find elements of an Array which are Odd and Even using STL in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 10:18:07

196 Views

Given with an array and the task is to find the number of odd and even elements in an array using standard template library in C++.To solve this problem we are using the function count_if() present in C++ standard template library. What is a count_if() function?Syntaxcount_if(LowerBound, UpperBound, function)Description − This ... Read More

isprint() Working with C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 10:15:22

226 Views

Isprint() in C++ is inbuilt function in “cctype.h” header file which checks whether the character is printable or not.Isprint returns true for constant cases as Isprint aside from the house character (' '), that returns true.A locale-specific model version of this function (Isprint) exists in cctype header file.-Isprint() function can ... Read More

forward_list emplace_after() and emplace_front() in C++ STL

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 10:13:50

116 Views

Given is the task to show the working of forward_list::emplace_after() and forward_list::emplace_front() functions in c++.A forward_list only keeps linkage with the next element unlike normal list that keeps linkage with the next as well as the preceding elements, which helps iterations in both directions. But forward_list can only iterate in ... Read More

forward list::cend() in C++ STL

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 10:06:48

96 Views

Given is the task to show the working of forward_list::cend functions in C++.A forward_list only keeps linkage with the next element unlike normal list that keeps linkage with the next as well as the preceding elements, which helps iterations in both directions. But forward_list can only iterate in the forward ... Read More

forward_list::cbefore_begin() in C++ STL

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 10:06:22

60 Views

Given is the task to show the working of forward_list::cbefore_begin() function in C++.A forward_list only keeps linkage with the next element unlike normal list that keeps linkage with the next as well as the preceding elements, which helps iterations in both directions. But forward_list can only iterate in the forward ... Read More

forward_list cbegin() in C++ STL

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 10:02:37

69 Views

Given is the task to show the working of forward_list::cbegin() function in C++.A forward_list only keeps linkage with the next element unlike normal list that keeps linkage with the next as well as the preceding elements, which helps iterations in both directions. But forward_list can only iterate in the forward ... Read More

Elements present in first array and not in second using STL in C++

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 07:50:32

110 Views

We have two arrays, the task is to compare the two arrays and find the numbers present in first array but not in the second array, using Standard Template Library (STL) in C++.ExampleInput: array1[ ] = {1, 2, 3, 4, 5, 7} array2[ ] = {2, 3, 4, 5, 6, ... Read More

Forward list assign() function in C++ STL

Sunidhi Bansal

Sunidhi Bansal

Updated on 20-Jan-2020 07:48:14

200 Views

Given is the task to show the working of forward_list assign() function in C++.A forward_list only keeps linkage with the next element unlike normal list that keeps linkage with the next as well as the preceding elements, which helps iterations in forward as well as backward directions. But forward_list can ... Read More

Advertisements