- 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
Nishtha Thakur has Published 564 Articles
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
2K+ Views
It’s just a syntax, nothing more than that for saying that “the function is pure virtual”.A pure virtual function is a virtual function in C++ for which we need not to write any function definition and only we have to declare it. It is declared by assigning 0 in declaration.Here ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
587 Views
Virtual functions in C++ used to create a list of base class pointers and call methods of any of the derived classes without even knowing kind of derived class object. Virtual functions are resolved late, at runtime.Here is an implementation of virtual function in C++ program −Example#include using namespace ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
124 Views
In C++ methods are non-virtual by default. They can be made virtual function by using a virtual keyword.Example Code#include using namespace std; class B { public: void s() //non virtual by default. Use virtual before the function to print “In Derived” { cout
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
281 Views
Let us first create a table. Following is the query −mysql> create table insertOneToAnotherTable -> ( -> Value int -> ); Query OK, 0 rows affected (0.60 sec)Following is the query to insert some records in the table using insert command −mysql> insert into insertOneToAnotherTable values(100); Query ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
383 Views
Freivalds' algorithm determines whether the matrices are equal for a chosen k value with a probability of failure less than 2^-k in O(kn^2).It is used to verify matrix multiplication.AlgorithmBegin Take matrix1(n*n), matrix2(n*n), matrix3(n*n) as input. // According to the algorithm we have to verify: // matrix1 × ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
223 Views
When we write programs to do computation at compile time using a template, that is called Template Metaprogramming.Example Code#include using namespace std; templatestruct power { enum { value = 4*power::value }; }; templatestruct power { enum { value = 1 }; }; int main() { cout
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
2K+ Views
The (int)x is C style typecasting where static_cast(x) is used in C++. This static_cast() gives compile time checking facility, but the C style casting does not support that. This static_cast() can be spotted anywhere inside a C++ code. And using this C++ cast the intensions are conveyed much better.In C ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
83 Views
Here is a C++ program to find the area of polygon using slicker algorithm that avoids Triangulation to find area of a polygon.It assumes the usual mathematical convention that positive y points upwards. In computer systems where positive y is downward, the easiest thing to do is to list the ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
416 Views
This is a C++ program to represent Linear Equations in matrix form.AlgorithmBegin 1) Take the no of variables n and the coefficients of each variable as input. 2) Declare a matrix[n][n] and constant[n][1]. 3) Make for loops i = 0 to n-1 and j = 0 to ... Read More
![Nishtha Thakur](https://www.tutorialspoint.com/assets/profiles/13598/profile/60_104893-1512719058.jpg)
Nishtha Thakur
206 Views
We shall consider a C++ Program to check if a point d lies inside or outside a circle defined by points a, b, c in a plane by using equations = (x-xt)^2 + (y-yt)^2 – r*rWhere, For any point t (xt, yt) on the plane, its position with respect to ... Read More