Second Equation of motion in C language

The second equation of motion is used to calculate the displacement of an object under constant acceleration. Algorithm Without wasting any of your precious time let’s try to understand how second equation of motion is implemented The second equation of motion is s = u*t + 1/2 * a * t * t s: total displacement u: initial velocity t: time taken by the journey a: constant acceleration We are considering u=0 if you want you can set initialVelocity variable value as per your choice, or you can ask it from user....

February 12, 2020 · 2 min · Rahul Rajput

Third Equation of motion using C language

The third equation of motion is used to deduce the relation between initial velocity, final velocity, displacement, and acceleration without time. Algorithm Without wasting any of your precious time let’s try to understand how this algorithm is implemented. Third equation of motion is v * v = u * u + 2 * a * s s: total displacement u: initial velocity v: final velocity a: constant acceleration In function CalculateDisplacement, we are calculating the value of displacement....

February 11, 2020 · 2 min · Rahul Rajput

First Equation of motion implementation in C

The first equation of motion is used to calculate the final velocity of an object under constant acceleration. Algorithm Without wasting any of your precious time let’s try to understand how the algorithm is implemented. The first equation of motion is v = u + a * t u: initial velocity t: time taken by the journey a: constant acceleration as you can see in our program we are considering u=0 if you want you can set initialVelocity variable value as per your choice or you can ask it from user too, accel=5 and timeOfJourney=7....

February 2, 2020 · 2 min · Rahul Rajput

Selection Sort using C language (with every step)

What is selection sorting The selection algorithm sorts an array by repeatedly finding the smallest element (considering increasing or ascending order) from the unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given group. Subarray that is already sorted. Remaining subarray that is unsorted. At each iteration of selection, the minimum value (with regard to rising order) is sorted from the unsorted subarray and moved to the sorted subframe....

April 27, 2019 · 2 min · Rahul Rajput

Bubble Sort code in C

Bubble sort is the simplest Sorting algorithm available. It works by repeatedly swapping the adjacent or neighbor element if they are in the wrong order. Working Actually in first pass bubble sort sets the largest element to its position, in the second pass algorithm sets the second largest element this continues till the list or array is not finally sorted. Here is the example image. To work with the algorithm you first have to understand what is swapping and how it is done....

January 25, 2019 · 2 min · Rahul Rajput

Keywords, Comments & Variable, Introduction to C

About this Series Welcome everybody, you must be interested in learning about the programming. Guess what, you’re at the correct place. In this series we will learn about how to in and out of C language from very basics of programming to a pretty intermediate level. This post mainly contains the keywords, comments and variables in C. If you wanted to take a look at history of C then checkout my previous post in this series....

January 2, 2019 · 3 min · Rahul Rajput

Introduction to C language

About this Series Welcome everybody, you must be interested in learning about the programming. Guess what, you’re at the correct place. In this series we will learn about how to in and out of C language from very basics of programming to a pretty intermediate level. This post mainly contains the history of C language with introduction to its creator. So lets pack your bag and come with me on a learning trip....

January 2, 2019 · 3 min · Rahul Rajput