Nishtha Thakur has Published 568 Articles

C++ Program to Represent Linear Equations in Matrix Form

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

395 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

C++ Program to Check if a Point d lies inside or outside a circle defined by Points a, b, c in a Plane

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

200 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

C++ Program to Find Basis and Dimension of a Matrix

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

148 Views

This is a C++ program to find Basis and Dimension of a Matrix.AlgorithmBegin    Function determinant() :    It calculates determinant of the matrix.    /*       Arguments:       n = number of elements.       matrix[10][10] = input matrix.    */    declare the ... Read More

Which one is better in between pass by value or pass by reference in C++?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

353 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++. Incall by address, we use pointer variables to send the ... Read More

Difference between std::vector and std::array in C++

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

21K+ Views

The following are the differences between vector and array −Vector is a sequential container to store elements and not index based.Array stores a fixed-size sequential collection of elements of the same type and it is index based.Vector is dynamic in nature so, size increases with insertion of elements.As array is ... Read More

How to use random () in Android sqlite?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

331 Views

Before getting into example, we should know what sqlite data base in android is. SQLite is an open source SQL database that stores data to a text file on a device. Android comes in with built in SQLite database implementation. SQLite supports all the relational database features. In order to ... Read More

How to use length () in Android textview?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

699 Views

This example demonstrate about How to use length () in Android textview.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         ... Read More

MongoDB query with an 'or' condition?

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

383 Views

To understand the query with an or condition, let us create a collection with the document. The query to create a collection with a document is as follows −> db.orConditionDemo.insertOne({"CustomerName":"Larry", "ShippingDate":new ISODate("2018-01-29")}); {    "acknowledged" : true,    "insertedId" : ObjectId("5c8ec5262f684a30fbdfd56a") } > db.orConditionDemo.insertOne({"CustomerName":"Mike", "ShippingDate":new ISODate("2019-04-13")}); {    "acknowledged" : ... Read More

C++ Program to Construct an Expression Tree for a given Prefix Expression

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

4K+ Views

An expression tree is basically a binary tree which is used to represent expressions. In an expression tree, internal nodes correspond to operators and each leaf nodes correspond to operands. Here is a C++ program to construct an expression tree for a prefix Expression in inorder, preorder and postorder traversals.AlgorithmBegin ... Read More

C++ Program to Implement Modular Exponentiation Algorithm

Nishtha Thakur

Nishtha Thakur

Updated on 30-Jul-2019 22:30:25

2K+ Views

This is a C++ program to implement Modular Exponentiation Algorithm.AlgorithmBegin    function modular():    // Arguments: base, exp, mod.    // Body of the function:       initialize res = 1       while (exp > 0)          if (exp mod 2 == 1)   ... Read More

Advertisements