- 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 7346 Articles for C++
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
561 Views
The C/C++ library function double log(double x) returns the natural logarithm (basee logarithm) of x. Following is the declaration for log() function.double log(double x)The parameter is a floating point value. And this function returns natural logarithm of x.Example Live Demo#include #include using namespace std; int main () { double x, ret; x = 2.7; /* finding log(2.7) */ ret = log(x); cout
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
127 Views
A binary tree which has at most two children, specified as left child and right child. This is a C++ Program to Find Deepest Left Leaf in a Binary TreeAlgorithmBegin. function deepestLLeafutil() find the deepest left leaf in a given binary tree: lvel is level of current node. maxlvel is pointer to the deepest left leaf node found so far isLeft Indicates that this node is left child of its parent resPtr is Pointer to the result If root is equal to Null ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
598 Views
The C / C++ library function double exp(double x) returns the value of e raised to the xth power. Following is the declaration for exp() function.double exp(double x)The parameter is a floating point value. And this function returns the exponential value of x.Example Live Demo#include #include using namespace std; int main () { double x = 0; cout
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
2K+ 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
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
166 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
![Ankith Reddy](https://www.tutorialspoint.com/assets/profiles/22328/profile/60_142162-1519038074.jpg)
464 Views
The C++ standard library does not provide a proper date type. C++ inherits the structs and functions for date and time manipulation from C. To access date and time related functions and structures, you would need to include header file in your 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.The structure type tm holds the date and time in the form of a C structure having the following elements -struct tm { int tm_sec; ... Read More
![karthikeya Boyini](https://www.tutorialspoint.com/assets/profiles/13518/profile/60_31598-1537784993.jpg)
225 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
![George John](https://www.tutorialspoint.com/assets/profiles/13511/profile/60_58410-1512537824.png)
13K+ Views
In this section we will see what is early binding and what is late binding in C++. The binding means the process of converting identifiers into addresses. For each variables and functions this binding is done. For functions it is matching the call with the right function definition by the compiler. The binding is done either at compile time or at runtime.Early BindingThis is compile time polymorphism. Here it directly associates an address to the function call. For function overloading it is an example of early binding.Example Live Demo#include using namespace std; class Base { public: void display() { ... Read More
![Samual Sam](https://www.tutorialspoint.com/assets/profiles/13514/profile/60_83486-1512649303.jpg)
753 Views
Binary Search Tree is a binary tree data structure in which we have 3 properties −The 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 of a subtree each must also be a binary search tree.AlgorithmBegin function BSTUtill() If node is equals to NULL then Return 1. If data of node is less than minimum or greater ... Read More
![Chandu yadav](https://www.tutorialspoint.com/assets/profiles/22330/profile/60_142811-1519038104.jpg)
489 Views
The C or C++ library function double fabs(double x) returns the absolute value of x. x − This is the floating point value. This function returns the absolute value of x. Following is the declaration for fabs() function.double fabs(double x)The following example shows the usage of fabs() function.Example Live Demo#include #include using namespace std; int main () { int a, b; a = 1234; b = -344; cout