Bhanu Priya has Published 1581 Articles

Explain bit field in C language by using structure concept

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 09:43:46

383 Views

Bit field is used for specifying the size of variable in terms of bits. Generally, it is defined inside a structure.Bit field: 1 byte=8 bitsFor example, An example is explained below −Struct info{    int x:2; };Here, x is occupying 2bits.It is invalid to assign any value to a bit ... Read More

Explain monolithic and modular programming in C language

Bhanu Priya

Bhanu Priya

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

3K+ 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

834 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

1K+ 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

3K+ 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

586 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

1K+ 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

952 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

What are the limitations of array in C language?

Bhanu Priya

Bhanu Priya

Updated on 13-Mar-2021 11:49:17

9K+ Views

Arrays are a kind of data structure that can store a fixed-size sequential collection of elements of the same type.An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.LimitationsThe limitations ... Read More

What is a multidimensional array? Explain with program

Bhanu Priya

Bhanu Priya

Updated on 13-Mar-2021 11:48:04

174 Views

C language allows arrays of three (or) more dimensions. This is a multidimensional array. The exact limit is determined by compiler.SyntaxThe syntax is as follows −datatype arrayname [size1] [size2] ----- [sizen];For example, for three – dimensional array −int a[3] [3] [3];Number of elements = 3*3*3 = 27 elementsExampleFollowing is the ... Read More

Advertisements