Bhanu Priya has Published 1449 Articles

C program to sort an array of ten elements in an ascending order

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:53:00

17K+ Views

An array is a group of related data items that are stored with single name.For example, int student[30];Here, student is an array name which holds 30 collection of data items, with a single variable name.OperationsThe operations of an array are explained below −Searching − It is used to find whether ... Read More

C program to find if the given number is perfect number or not

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:50:23

6K+ Views

Perfect number is the number; whose sum of factors is equal to 2*number.AlgorithmAn algorithm is explained below −START Step 1: declare int variables and initialized result=0. Step 2: read number at runtime. Step 3: for loop i=1;i

Explain the characteristics and operations of arrays in C language

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:45:42

10K+ Views

An array is a homogeneous sequential collection of data items over a single variable name.For example, int student[30];Here, student is an array name holds 30 collection of data item, with a single variable name.CharacteristicsThe characteristics of arrays are as follows −An array is always stored in consecutive memory location.It can ... Read More

Explain monolithic and modular programming in C language

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:41:44

4K+ Views

The difference between monolithic programming and modular programming along with the advantages and disadvantage are explained below in detail.Monolithic programmingIf, we write an entire program in a single function that is in main function then, you call it as a monolithic type of programming. But, it is not a good ... Read More

Write a C Program to delete the duplicate numbers in an array

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:41:04

1K+ Views

Let the user enter the numbers in an array, which contains duplicate elements.Now, let’s write a code to delete the repeated numbers or elements in an array and make an array with unique elements without duplicatesFor example, An example is explained below −User input is 12, 30, 12, 45, 67, ... Read More

C program to convert upper case to lower and vice versa by using string concepts

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:39:55

2K+ Views

Converting upper to lower and lower to upper is generally termed as toggle.Toggle each character means, in a given string, the lower letter is print in upper form and upper case is print in lower letter respectively.ProgramThe C program to convert upper case to lower and lower case to upper ... Read More

How to swap two numbers without using the third or a temporary variable using C Programming?

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:38:38

4K+ Views

With the help of addition and subtraction operations, we can swap two numbers from one memory location to another memory location.AlgorithmThe algorithm is explained below −STARTStep 1: Declare 2 variables x and y. Step 2: Read two numbers from keyboard. Step 3: Swap numbers. //Apply addition and subtraction operations to ... Read More

C program to verify if the numbers are abundant(friendly) or not?

Bhanu Priya

Bhanu Priya

Updated on 13-Mar-2021 11:56:06

824 Views

In this program, we are trying to check whether the two given numbers by the user through console, are friendly pair or not?ExampleIf sum of all divisors of number1 is equal to number1 and sum of all divisors of number2 is equal to number2, then we can say, those two ... Read More

Explain Squeeze Function C language

Bhanu Priya

Bhanu Priya

Updated on 13-Mar-2021 11:54:47

2K+ Views

Squeeze(s1, s2) or squeeze(char[], char[]) is a user defined function which is used to delete the common characters or equal characters in two strings.ProblemHow to delete the common characters in two strings using squeeze function in C programming language?SolutionIn this program, the user enters two strings in the console and ... Read More

Write a C program to display all datatypes ranges in tabular form

Bhanu Priya

Bhanu Priya

Updated on 13-Mar-2021 11:53:34

1K+ Views

The different data types that we use in C programming are integer, short int, Signed and un signed char etc.Data TypesData type specifies the set of values and the type of data that can be stored in a variable. They allow the programmer to select the type appropriate to the ... Read More

Advertisements