Sudhir sharma has Published 1149 Articles

A matrix probability question in C?

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 07:02:49

186 Views

The matrix probability question Calculates the probability that whether an element will be inside the given matrix after taking N steps and any direction. This means we need to find what is the probability of an element not going out of the scope of the matrix even after moving N ... Read More

_Generic keyword in C ? 1: 20

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:59:01

834 Views

_Generic keyword in C is used to define MACRO for different data types. This new keyword was added to the C programming language in C11 standard release. the _Generic keyword is used to help the programmer use the MACRO in a more efficient way.this keyword translate the MACRO based on ... Read More

New ways to Assign values to Variables in C++ 17 ?

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:56:08

473 Views

In C++ 17, there are introduced two new ways by which a programmer can assign values to a variable or declared them. In this update, elser then the classical way of assigning values to a variable the following two ways to initialise values.Classical methodInitially the assignment operator ‘=’ is used ... Read More

Adapter Pattern in C++?

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:51:58

300 Views

An adapter pattern is used to convert the interface of a class into an interface that is expected by the client. An adapter helps the programmer to make its classes work together and make sure the user requirement is fulfilled by making incompatible interfaces completable.let's understand a bit more about ... Read More

Angular Sweep Algorithm in C++

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:48:06

568 Views

The algorithm to find the maximum number of points that can be enclosed in a circle of a given radius. This means that for a circle of radius r and a given set of 2-D points, we need to find the maximum number of points that are enclosed (lying inside ... Read More

The basic_string c_str function in C++ STL?

sudhir sharma

sudhir sharma

Updated on 04-Oct-2019 06:39:11

140 Views

The basic_string c_str function that returns a pointer to an array of characters that is terminated using null character. It is an inbuilt method that has the value of a string that has null character termination.Syntax to define a c_str function in C++ −const Char ptr* c_str() constAbout the functionIt ... Read More

Area of squares formed by joining midpoints repeatedly in C?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:24:05

125 Views

Area of a square is equal to the product of sides of the square.We are considering a figure in which the midpoints of sides of each square make another square. And so on until a specific number of squares.This figure shows a square made by joining the midpoints of a ... Read More

Area of the biggest possible rhombus that can be inscribed in a rectangle in C?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:13:52

261 Views

A rhombus inscribed in a rectangle touches the sides of the rectangle so by this we can infer that the diagonals of the largest inscribed rhombus are equal to the length and breadth of the rectangle.If we have the length(l) and breadth(b) of the rectangle, the length of the diagonal ... Read More

Area of a circle inscribed in a rectangle which is inscribed in a semicircle in C?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:10:41

2K+ Views

A circle inscribed in a rectangle touches the larger side of the rectangle with its ends i.e. the length is tangent to the circle.A rectangle inscribed in a semicircle touches its arc at two points. The breadth of the rectangle is equal to the diameter of the circle.If R is ... Read More

Anti Clockwise spiral traversal of a binary tree in C++?

sudhir sharma

sudhir sharma

Updated on 03-Oct-2019 13:02:36

171 Views

Anti-Clockwise spiral traversal of a binary tree is traversing the elements of a tree in such a way that if traversed they make a spiral but in reverse order. The following figure shows how a anti-clockwise spiral traversal of binary tree.The Algorithm defined for spiral traversal of a binary tree ... Read More

Advertisements