- 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
140 Views
In this tutorial, we will be discussing a program to understand Type interference in C++ (auto and decltype).In case of auto keyword, the type of the variable is defined from the type of its initializer. Further with decltype, it lets you extract the type of variable from the called element.auto ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
309 Views
In this tutorial, we will be discussing a program to understand trivial classes in C++.When a class/ struct contains explicitly defaulted value inside it, then it is known as Trivial classes. Further trivial classes have their own constructor, assignment operator and destructor.Example//using the default constructor struct Trivial { int ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
53 Views
In this tutorial, we will be discussing a program to understand the transform_inclusive_scan() function in C++.Example Live Demo#include #include using namespace std; namespace point_input_iterator { template OutputItrator transform_inclusive_scan(InputItrator first, InputItrator last, OutputItrator d_first, BinaryOperation binary_op, ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
109 Views
In this tutorial, we will be discussing a program to understand thread get_id() function in C++.Thread get_id() function verifies the current state of the process and then returns the id for the current thread in execution. This function doesn’t take any parameters.Example#include #include #include using namespace std; ... 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 containership in C++.The parameter if a certain class contains another class is called as containership. The inside class is called contained class, while the class in which it is present is called container class.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
473 Views
In this tutorial, we will be discussing a program to understand constructors in C++.Constructors are member functions of the classes which initiates the object instance creation. They have the same name as the parent class and don’t have any return type.Default constructorsExample Live Demo#include using namespace std; class construct { ... 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 thread functions in C/C++.Thread functions allow users to implement concurrent functions at the same time, which can either be dependent on each other for execution or independent.Example#include #include #include void* func(void* arg){ //detaching the current ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
405 Views
In this tutorial, we will be discussing a program to understand templates and static variables in C++.In case of function and class templates, each instance of the templates has its own local copy of the variables.Example Live Demo#include using namespace std; template void fun(const T& x){ static int ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
129 Views
In this tutorial, we will be discussing a program to understand Template specialization in C++.Standard functions like sort() can be used with any data types and they behave the same with each of them. But if you want to set a special behaviour of the function for a particular data ... Read More
![Ayush Gupta](https://www.tutorialspoint.com/assets/profiles/134135/profile/60_13095-1568350695.jpg)
Ayush Gupta
53 Views
In this tutorial, we will be discussing a program to understand swapping of subranges of different containers in C++.For this we will be provided with vectors and lists, and we need to swap some of their elements.Example Live Demo#include #include #include #include using namespace std; int main(){ ... Read More