- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Ayush Gupta has Published 541 Articles
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
199 Views
In this tutorial, we will be discussing a program to count smaller elements on right side using set in C++ STL.For this we will be provided with an array. Our task is to construct a new array and add the number of smaller elements on the right side of the ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
184 Views
In this tutorial, we will be discussing a program to count smaller elements in sorted array in C++.In this we will be given a number and our task is to count all the elements present in the sorted array which are smaller than the given number.Example Live Demo#include using namespace ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
4K+ Views
In this tutorial, we will be discussing a program to understand core dump (segmentation fault) in C/C++.It happens due to reasons like when code tries to write on read only memory or tries to access corrupt memory location.ExampleModifying a string literalint main(){ char *str; str = "GfG"; ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
185 Views
In this tutorial, we will be discussing a program to understand how to convert strings into numbers in C/C++.C/C++ provides two ways to convert strings into numbers.Example Live DemoUsing sscanf()#include int main(){ const char *str = "12345"; int x; sscanf(str, "%d", &x); printf("The value of x : ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
3K+ Views
In this tutorial, we will be discussing a program to understand how to convert a string into integer array in C/C++.For this we will create a new array. Traverse through the given string, if the character is a comma “, ”, we move on to the next character else add ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
4K+ Views
In this tutorial, we will be discussing a program to understand conversion of whole string to uppercase or lowercase using STL in C++.To perform this transformation, C++ STL provides toupper() and tolower() functions to convert to uppercase and lowercase respectively.Example Live Demo#include using namespace std; int main(){ string su = ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
2K+ Views
In this tutorial, we will be discussing a program to understand virtual functions in C++.Virtual function is the member function defined in the base class and can further be defined in the child class as well. While calling the derived class, the overwritten function will be called.Example Live Demo#include using ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
141 Views
In this tutorial, we will be discussing a program to understand virtual destruction using shared_ptr in C++.To delete the instances of a class, we define the destructor of the base class to be virtual. So it deletes the various object instances inherited in the reverse order in which they were ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
13K+ Views
In this tutorial, we will be discussing a program to understand virtual base class in C++.Virtual classes are primarily used during multiple inheritance. To avoid, multiple instances of the same class being taken to the same class which later causes ambiguity, virtual classes are used.Example Live Demo#include using namespace std; ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
138 Views
In this tutorial, we will be discussing a program to understand how to use class to implement vector quantities in C++.Vector quantities are the ones which have both magnitude and direction. Here we will be implementing them using classes and then performing basic operations on them.Example Live Demo#include #include ... Read More