
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Server Side Programming Articles - Page 2307 of 2651

3K+ Views
An expression tree is basically a binary tree which is used to represent expressions. In expression tree, nodes correspond to the operator and each leaf node corresponds to the operand. This is a C++ program to construct an expression tree for a postfix Expression in inorder, preorder and postorder traversals.AlgorithmBegin Function r() has a character variable as parameter. If the characters are + or - or * or / then Return will be -1 If the characters are from A to Z then Return will ... Read More

252 Views
A binary tree is a tree data structure in which each node has at most two children, which are defined as left child and right child.AlgorithmBegin function identical(): Take two nodes r1 and r2 as parameter. If r1 and r2 is NULL then Return true. If r1 or r2 is NULL then Return false. Return (r1->d is equal to r2->d and Call function Identical(r1->l, r2->l) and Call functions Identical(r1->r, r2->r) ); ... Read More

708 Views
In C++, the standard library does not provide any proper built-in date type. Instead of that we use structures and functions to inherit from the C language for the manipulation. To access this date and time related functions and structures, we need to include header file to the C++ program. There are four time-related types: clock_t, time_t, size_t, and tm. The types: clock_t, size_t and time_t are capable of representing the system time and date as some sort of integer. time_t: It is used to store calendar time (like the number of seconds since ... Read More

358 Views
Binary Search Tree is a binary tree data structure in which we have 3 propertiesThe left subtree of a binary search tree of a node contains only nodes with keys lesser than the node’s key.The right subtree of a binary search tree node contains only nodes with keys greater than the node’s key.The left and right trees of a subtree each must also be a binary search tree.AlgorithmBegin function BSTUtill() If node is equals to NULL then Returns 1. If data of node is less than minimum or greater ... Read More

16K+ Views
In C++, binding is the process of connecting names such as variables and functions to their actual memory locations. When you intend to call a function, the program must identify the proper function definition for the execution. So, binding is the process of making this connection. This happens either at compile time (early binding) or at runtime (late binding). Early Binding This is compile time polymorphism and decides which function to call before it runs, making execution faster and direct. Example In this example, we demonstrate the early binding, where the base class function runs instead of the derived class ... Read More

609 Views
In C++, fabs is used to calculate the absolute value of a floating-point number. It is a function and defined to a header file. The fab() FunctionThis fabs() function accepts one argument, which is a floating-point number (double, float, or long double), and returns its absolute value as a floating-point number of the same type. Syntax Following is the syntax to fabs() function: double fabs(double x); The fabs() function is mostly used when we need to find the non-negative magnitude of a number. Using fabs() with positive and negative values Here, we will demonstrate how fabs() handles ... Read More

8K+ Views
Every program runs as a process in Linux operating system. When a process ends or gets disconnected from its parent, special types of processes can be created. These processes are known as zombie and orphan processes. Details about the zombie and orphan processes are given as follows: Zombie Processes A zombie process is a process whose execution is completed but it still has an entry in the process table. Zombie processes usually occur for child processes, as the parent process still needs to read its child's exit status. Once this is done using the wait system call, the zombie process ... Read More

366 Views
The Copy and Swap Idiom in C++ is a technique used in assignment operations. This consists of two steps: Discarding an object's old state and building a new state for it. The destructor is used for the first step and a copy constructor does the second step. Implementing both of these is straightforward. But when overloading the assignment operator, it can become quite difficult to implement. The copy and swap idiom is a solution for the same. This idiom uses the copy-constructor to build a local copy of the data. It then swaps the old data with the new data ... Read More

418 Views
Type inference (or, type deduction) refers to the automatic detection of the data type of an expression in a programming language. In C++, the auto keyword is used for automatic type deduction.For example, you want to create an iterator to iterate over a vector, you can simply use auto for that purpose.It is helpful, when dealing with complicated STL containers, iterators, and lambda functions where it may be hard to write the full type. This can be achieved using auto, decltype, and decltype(auto) keywords. These approaches help in letting the compiler understand the correct data types without explicitly declaring them. ... Read More

397 Views
In C++, the strand sort is a recursive sorting algorithm. It is used to extract increasing subsequences repeatedly (called strands) from the input list and merge them into a sorted list. There are multiple libraries that can be used for different purposes. This sorting is one of them. This sorting technique is particularly good for sorting linked lists, but can be used with arrays too. The following is a list of approaches for strand sorting in C++: These approaches is to extract sorted strands (in increasing/descending order) from the unsorted list and merge them one by one into a final ... Read More