Bhanu Priya has Published 1581 Articles

Explain important functions in math.h library functions using C language

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:30:48

462 Views

All mathematical related functions are stored in math.h header file in C programming language. The functions are explained below in detail.sin()This function is used to find the sin value of its argument.The syntax of sin() function is as follows −double sin(double a);For example, double a=sin(3.14/2);The output is as follows −a=1 ... Read More

C program to find in which quadrant the coordinates lie.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:25:34

982 Views

ProblemWrite a program to find the quadrant in which the given coordinates lie.User has to enter a coordinate at runtime and we need to find the quadrant in which these coordinates lie.SolutionIf both numbers are positive then, it displays the first quadrant.Example: Input =2, 3 Output = 1st quadrantIf the ... Read More

Explain the concept of one and two dimensional array processing using C language

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:25:25

465 Views

Let us first understand the one dimensional array processing in C programming language.1D Array ProcessingStoring values in 1 D Array(reading) is done as follows −int num[5] int i; for(i=0;i

C program to remove the brackets from a given input.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:18:28

663 Views

ProblemLet’s create a simplified expression by removing brackets from the expressions.SolutionExample 1Input: A string expression with bracket is as follows: (x+y)+(z+q) The output is as follows: x+y+z+qExample 2The input is as follows: (x-y+z)-p+q The output is as follows: x-y+z-p+qAlgorithmRefer an algorithm to remove the brackets from a given input.Step 1: ... Read More

C program to sort an array by using merge sort

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:16:54

2K+ Views

An array is a group of related data items which share’s a common name. A particular value in an array is identified with the help of its "index number".Declaring arrayThe syntax for declaring an array is as follows −datatype array_name [size];For example, float marks [50]It declares ‘marks’ to be an ... Read More

C program to search an array element using Pointers.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:14:58

13K+ Views

ProblemWrite a C program to search an element from an array at runtime by the user and the result to be displayed on the screen after search. If the searching element is not in an array then, we need to search element is not found.SolutionAn array is used to hold ... Read More

C program to delete an array element using Pointers

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:12:36

4K+ Views

ProblemWrite a C program to delete an element from an array at runtime by the user and the result to be displayed on the screen after deletion. If the deleted element is not in an array, then we need to display Invalid Input.SolutionAn array is used to hold the group ... Read More

C Program to insert an array element using pointers.

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:10:20

5K+ Views

ProblemWrite a C program to insert the elements into an array at runtime by the user and the result to be displayed on the screen after insertion. If the inserted element is greater than the size of an array, then, we need to display Invalid Input.SolutionAn array is used to ... Read More

C program to sort an array in descending order

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:08:57

13K+ Views

ProblemSort the given array in descending or ascending order based on the code that has been written.SolutionAn array is a group of related data items which share’s a common name. A particular value in an array is identified with the help of its "index number".Declaring arrayThe syntax for declaring an ... Read More

C program to find the solution of linear equation

Bhanu Priya

Bhanu Priya

Updated on 26-Mar-2021 07:04:38

4K+ Views

We can apply the software development method to solve the linear equation of one variable in C programming language.RequirementThe equation should be in the form of ax+b=0a and b are inputs, we need to find the value of xAnalysisHere, An input is the a, b values.An output is the x ... Read More

Advertisements