C Articles - Page 63 of 134

C Program to calculate the Round Trip Time (RTT)

Sunidhi Bansal
Updated on 20-Nov-2019 10:59:01

1K+ Views

Given an Url address of any website; the task is to calculate the round trip time of a website.Round Trip Time(RTT) is the total time or the length of a time which is taken to send a signal plus the time taken to receive the acknowledgement of that signal to be received. This time also consist of the propagation times between two points of a signal.An end user can determine his/her round trip time from an IP address by pinging that address.The Round Trip time’ result depends upon the following reasons −The Transmission medium.The presence of Interface in the circuit.Number ... Read More

C Program to Change RGB color model to HSV color model

Sunidhi Bansal
Updated on 20-Nov-2019 10:52:39

3K+ Views

Given RGB color range in form of integers; the task is to find its appropriate HSV color by converting the RGB color rangeWhat is RGB color modelRGB color model comprised of three colors Red, Green and Blue. RGB model is a color model which is widely used in the display technologies; it is an additive model in which we add these three colors of with different intensities to produce millions of different colors on a display device.What is HSV color model?HSV color model comprises Hue, Saturation, Value also known as HSB (Hue, Saturation, Brightness).HSV is alternative representation of RGB color ... Read More

C Program to convert a given number to words

Sunidhi Bansal
Updated on 20-Nov-2019 10:45:22

12K+ Views

Given a string consisting of numerical values, the task is to covert those given numbers in words.Like we have an input “361”; then the output should be in words i.e, ” Three hundred sixty one”. For the solution of the following problem we have to keep in mind the numbers and places it is in on like ones, tens, thousands etc.The code only support upto 4 digits numbers i.e., 0 to 9999. So the input should be from 0 to 9999.Let us consider 1, 111 so the places will be like −ExampleInput: “1234” Output: one thousand two hundred thirty four ... Read More

Printing all subsets of {1,2,3,…n} without using array or loop in C program

Sunidhi Bansal
Updated on 20-Nov-2019 10:27:55

1K+ Views

Given a positive integer n we have to print all the subsets of a set of {1, 2, 3, 4, … n} without using any array or loops.Like we have given any number say 3 s we have to print all the subset in the set {1, 2, 3} which would be {1 2 3}, {1 2}, {2 3}, {1 3}, {1}, {2}, {3} { }.But we have to do this without using any loop or an array. So, only the recursion is the possible way to solve this type of problem without using any array or a loop.ExampleInput: 3 ... Read More

Program to Convert Hexadecimal to Octal in C program

Sunidhi Bansal
Updated on 20-Nov-2019 10:05:51

2K+ Views

We are given a Hexadecimal number as string; the task is to convert it to the Octal. To convert a hexadecimal number to octal, we have to −Find the binary equivalent to the hexadecimal number.Convert the binary number to Octal.What are hexadecimal numbersHexadecimal numbers are the numbers which are of base of 16 the numbers vary from 0-9 and from 10 onwards the numbers are represented as A which represents 10, B for 11, C for 12, D for 13, E for 14, and F for 15.To convert hexadecimal number into binary number every number is converted into its binary ... Read More

Bash program to check if the Number is a Prime or not

sudhir sharma
Updated on 13-Nov-2019 11:53:01

19K+ Views

Bash also known as GNU bash is a command language and unix shell script is a command line interpreter for operating system. It was designed by Brian Fox and was a free software which replaced Bourne shell. It first released in 1989 and some became go to for login shell for linux based operating systems like macOS, Linux based softwares, etc.Prime number is a number that has only two factors i.e. the number itself and 1. For example, 2 , 3 , 5, 7 , 11 , 13 , 17 , 19 , 23 , 29….Here we are given a ... Read More

bar() function in C graphics

sudhir sharma
Updated on 13-Nov-2019 11:47:23

2K+ Views

bar() function is a C graphics function that is used to draw graphics in the C programming language. The graphics.h header contains functions that work for drawing graphics. The bar() function is also defined in the header file.Syntaxvoid bar(int left, int top, int right, int bottom );The bar() function is used to draw a bar ( of bar graph) which is a 2-dimensional figure. It is filled rectangular figure. The function takes four arguments that are the coordinates of (X, Y) coordinates of the top-left corner of the bar {left and top } and (X, Y) coordinates of the bottom-right ... Read More

Bands in Radio frequency Spectrum in C program

sudhir sharma
Updated on 13-Nov-2019 11:43:05

633 Views

Radio frequency (RF) is the oscillation of an A.C. current or an A.C. voltage or any other oscillating body in the frequency range of 20KHz to 300 GHz.Radio frequency spectrum of a device is the frequency range that the device can capture, process or repercate. Generally the frequency range is 20Hz to 20KHz.A band is a frequency range that is divided from very low frequency to extremely high frequency. These bands are small ranges of frequency that are used to provide small parts of the spectrum.Bands In Radio Frequency SpectrumFrequency Range is range of continuous that has an upper limit ... Read More

Introduction to Backtracking

sudhir sharma
Updated on 02-Nov-2023 00:22:40

27K+ Views

Backtracking is a technique based on algorithm to solve problem. It uses recursive calling to find the solution by building a solution step by step increasing values with time. It removes the solutions that doesn't give rise to the solution of the problem based on the constraints given to solve the problem.Backtracking algorithm is applied to some specific types of problems, Decision problem used to find a feasible solution of the problem.Optimisation problem used to find the best solution that can be applied.Enumeration problem used to find the set of all feasible solutions of the problem.In backtracking problem, the algorithm ... Read More

Array Representation Of Binary Heap

sudhir sharma
Updated on 13-Nov-2019 10:20:04

4K+ Views

The complete binary tree that follows the properties of heap ordering is called binary heap.Based on the ordering of binary heap, it can be of two types −min Heap is the heap in which the value of node is greater than or equal to the value of its parent node. The root node of min heap is smallest.max Heap is the heap in which the value of node is smaller than or equal to the value of its parent node. The root node of max heap is greatest.The values of binary heap is typically represented as an array. The array ... Read More

Advertisements