Anvi Jain has Published 629 Articles

How to get the IP Address of local computer using C/C++?

Anvi Jain

Anvi Jain

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

7K+ Views

In this section we will see how to see the Host name and IP address of the local system in an easier way. We will write a C program to find the host name and IP.Some of the following functions are used. These functions have different task. Let us see ... Read More

C++ Program to Implement Gauss Jordan Elimination

Anvi Jain

Anvi Jain

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

5K+ Views

This is a C++ Program to Implement Gauss Jordan Elimination. It is used to analyze linear system of simultaneous equations. It is mainly focused on reducing the system of equations to a diagonal matrix form by row operations such that the solution is obtained directly.AlgorithmBegin    n = size of ... Read More

Why is it considered a bad practice to omit curly braces in C/C++?

Anvi Jain

Anvi Jain

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

726 Views

In C++ we can omit the curly braces after if-else statements, or after any loop. If we do not use curly braces then only one statement after the if-else or loop will be considered under that block. For example −if(condition) {    Line 1    Line 2 } if(condition) ... Read More

C++ Program to Apply Above-Below-on Test to Find the Position of a Point with respect to a Line

Anvi Jain

Anvi Jain

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

373 Views

This is a C++ program to apply Above-Below-on Test to find the position of a point with respect to a Line. For any point t (xt, yt) on the plane, its position with respect to the line L connecting m and n is found by calculating the scalar s −Y ... Read More

How to remove data from treemap to arraylist for listview in Android?

Anvi Jain

Anvi Jain

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

75 Views

This example demonstrate about How to remove data from treemap to arraylist for listview in AndroidStep 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

C++ Program to use above below primitive to test whether two lines intersect

Anvi Jain

Anvi Jain

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

168 Views

Here is a C++ program to use above below primitive to test whether two lines intersect. It can be used to test whether a line intersects a line segment. It does if and only if one endpoint of the segment is to the left of the line and the other ... Read More

C++ Program to Optimize Wire Length in Electrical Circuit

Anvi Jain

Anvi Jain

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

249 Views

This is a C++ Program to optimize Wire Length in Electrical Circuit.AlgorithmBegin    Function optimizeLength() :    1) Declare a array dist[N].    2) sptSet[i] will be true if component i is included in shortest    path tree or shortest distance from src to i is finalized.    3) Initialize ... Read More

C++ Program to implement Gift Wrapping Algorithm in Two Dimensions

Anvi Jain

Anvi Jain

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

398 Views

We shall develop a C++ program to implement Gift Wrapping Algorithm in two dimensions. The Gift Wrapping Algorithm is an algorithm for computing the convex hull of a given set of points.AlgorithmBegin    function convexHull() to find convex hull of a set of n points:    There must be at ... Read More

C++ Program to Find Minimum Value of any Algebraic Expression

Anvi Jain

Anvi Jain

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

213 Views

This is a C++ Program to Find Minimum Value of any Algebraic Expression.An algebraic expression of the form (x1 + x2 + x3 + . . . + xa) * (y1 + y2 + . . . + yb) and (a + b) integers is given.consider all possible combinations of ... Read More

Find out the current working directory in C/C++

Anvi Jain

Anvi Jain

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

6K+ Views

In this section, we will see how to get the current working directory using C or C++. We have defined some flags for the current operating system.Example Code Live Demo#ifdef WINDOWS #include #define GetCurrentDir _getcwd #else #include #define GetCurrentDir getcwd #endif #include using namespace std; std::string get_current_dir() ... Read More

Advertisements