- 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 568 Articles
Nishtha Thakur
12K+ Views
To check whether a floating point or double number is NaN (Not a Number) in C++, we can use the isnan() function. The isnan() function is present into the cmath library. This function is introduced in C++ version 11. So From C++11 next, we can use this function.Example#include #include ... Read More
Nishtha Thakur
16K+ Views
In C++ we can pass arguments into a function in different ways. These different ways are −Call by ValueCall by ReferenceCall by AddressSometimes the call by address is referred to as call by reference, but they are different in C++. In call by address, we use pointer variables to send ... Read More
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
578 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
119 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
265 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
373 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
214 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
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
81 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
To Continue Learning Please Login
Login with Google