- 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
Found 7347 Articles for C++
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
419 Views
In this tutorial, we are going to learn how to delete all prime nodes from a singly linked list.Let's see the steps to solve the problem.Write struct with data and next pointer.Write a function to insert the node into the singly linked list.Initialize the singly linked list with dummy data.Iterate over the singly linked list. Find whether the current node data is prime or not.If the current data is prime, then delete the node.Write a function to delete the node. Consider the following three cases while deleting the node.If the node is head node, then move the head to next ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
146 Views
In this tutorial, we are going to learn how to delete all prime nodes from a doubly linked list.Let's see the steps to solve the problem.Write struct with data, prev and next pointers.Write a function to insert the node into the doubly linked list.Initialize the doubly linked list with dummy data.Iterate over the doubly linked list. Find whether the current node data is prime or not.If the current data is prime, then delete the node.Write a function to delete the node. Consider the following three cases while deleting the node.If the node is head node, then move the head to ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
110 Views
In this tutorial, we are going to learn how to delete all prime nodes from a singly linked list.Let's see the steps to solve the problem.Write struct with data and next pointer.Write a function to insert the node into the singly linked list.Initialize the singly linked list with dummy data.Iterate over the singly linked list. Find whether the current node data is prime or not.If the current data is not prime, then delete the node.Write a function to delete the node. Consider the following three cases while deleting the node.If the node is head node, then move the head to ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
6K+ Views
In this tutorial, we are going to learn how to delete a node in doubly linked list.Let's see the steps to solve the problem.Write struct with data, prev and next pointers.Write a function to insert the node into the doubly linked list.Initialize the doubly linked list with dummy data.Take a node to delete.Write a function to delete the node. Consider the following three cases while deleting the node.If the node is head node, then move the head to next node.If the node is middle node, then link the next node to the previous nodeIf the node is end node, then ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
1K+ Views
In this tutorial, we are going to learn how to delete a node without head pointer in a singly linked list.Let's see the steps to solve the problem.Write struct with data, and next pointer.Write a function to insert the node into the singly linked list.Initialize the singly linked list with dummy data.Take a node from the linked list using the next pointer.Move the delete node to the next node.ExampleLet's see the code. Live Demo#include using namespace std; struct Node { int data; struct Node* next; }; void deleteNodeWithoutHead(struct Node* deletingNode) { if (deletingNode == NULL) { ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
4K+ Views
In this tutorial, we are going to learn how to delete a node in singly linked list with the given position.Let's see the steps to solve the problem.Write struct with data, and next pointer.Write a function to insert the node into the singly linked list.Initialize the singly linked list with dummy data.Initialize the position to delete the node.Iterate over the linked list and find the node with the given position to delete the node.Write a function to delete the node. Consider the following three cases while deleting the node.If the node is head node, then move the head to next ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
1K+ Views
In this tutorial, we are going to learn how to delete a node in doubly linked list with the given position.Let's see the steps to solve the problem.Write struct with data, prev and next pointers.Write a function to insert the node into the doubly linked list.Initialize the doubly linked list with dummy data.Initialize the position to delete the node.Iterate over the linked list and find the node with the given position to delete the node.Write a function to delete the node. Consider the following three cases while deleting the node.If the node is head node, then move the head to ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
199 Views
In this tutorial, we are going to find the deepest left leaf node in the binary tree. Let's see the binary tree. A B C D E F GLet's see the steps to solve the problem.Write a Node struct with char, left, and right pointers.Initialize the binary tree with dummy data.Write a recursive function to find the deepest left node in the binary function. It takes three argument root node, isLeftNode, and result pointer to store the deepest node.If the ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
900 Views
In this tutorial, we are going to learn about the fixed partitioning in the operating system.Fixed partitioning is one to manage the memory in operating system. It's an old technique. It divides the memory into equal blocks. The size of each block is predefined and can not be changed.The memory is used for the contiguous processes.ExampleLet's see the sample program that allocates memory based on the process size. Live Demo#include using namespace std; int main() { int blockNumber = 5, processesNumber = 3; int blockSize[5] = {4, 4, 4, 4, 4}, processSize[3] = {1, 2, 3}; int flags[5], ... Read More
![Hafeezul Kareem](https://www.tutorialspoint.com/assets/profiles/120468/profile/60_159160-1581501828.jpg)
482 Views
In this tutorial, we are going to learn how find the first uppercase letter in the given string. Let's see an example.Input −TutorialspointOutput −TLet's see the steps to solve the problem using iterative method.Initialize the string.Iterate over the string.Check whether the current character is uppercase or not using isupper method.If the character is uppercase than return the current character.ExampleLet's see the code. Live Demo#include using namespace std; char firstUpperCaseChar(string str) { for (int i = 0; i < str.length(); i++) if (isupper(str[i])) { return str[i]; } ... Read More