Bhanu Priya has Published 1581 Articles

Explain the evaluation of expressions of stacks in C language

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 22:17:25

18K+ Views

Stack is a linear data structure, where data is inserted and removed only at one end.AlgorithmsGiven below is an algorithm for Push ( ) −Check for stack overflow.if (top = = n-1) printf("stack over flow");Otherwise, insert an element into the stack.top ++ a[top] = itemGiven below is an algorithm for ... Read More

Explain insertion of elements in linked list using C language

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 22:12:24

3K+ Views

Linked lists use dynamic memory allocation i.e. they grow and shrink accordingly. They are defined as a collection of nodes. Here, nodes have two parts, which are data and link. The representation of data, link and linked lists is given below −Operations on linked listsThere are three types of operations ... Read More

What do you mean by odd loops in C language?

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 22:03:02

2K+ Views

In C programming language, the Control statements are used to repeat a set of statements.They are as follows −for loopwhile loopdo-while loopIn for loop and while loop, the condition specifies the number of times, in which a loop can be executed.Example for the for loopfor (k = 1; k

Explain Lifetime of a variable in C language.

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 21:57:34

5K+ Views

Storage classes specify the scope, lifetime and binding of variables.To fully define a variable, one needs to mention not only its ‘type’ but also its storage class.A variable name identifies some physical location within computer memory, where a collection of bits are allocated for storing values of variable.Storage class tells ... Read More

Explain Binding of a variable in C language.

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 21:52:52

988 Views

Storage classes specify the scope, lifetime and binding of variables.To fully define a variable, one needs to mention not only its ‘type’ but also its storage class.A variable name identifies some physical location within computer memory, where a collection of bits are allocated for storing values of variable.Storage class tells ... Read More

Explain the pointers for inter-function communication in C language.

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 21:50:26

2K+ Views

We know that functions can be called by value and called by reference.If the actual parameter should not change in called function, pass the parameter-by value.If the value of actual parameter should get changed in called function, then use pass-by reference.If the function has to return more than one value, ... Read More

What are the inserting elements in queue in C language?

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 21:43:55

3K+ Views

Data structure is collection of data organized in a structured way. It is divided into two types as explained below − Linear data structure − Data is organized in a linear fashion. For example, arrays, structures, stacks, queues, linked lists. ... Read More

Explain deleting an element in a queue by using C language

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 21:39:11

5K+ Views

Data structure is collection of data organized in a structured way. It is divided into two types as explained below −Linear data structure − Data is organized in a linear fashion. For example, arrays, structures, stacks, queues, linked lists.Nonlinear data structure − Data is organized in a hierarchical way. For ... Read More

Find 2'c complements for given binary number using C language

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 21:30:15

144 Views

Problem Statement Given a binary number, you have to write a C program to find 2'c complements for given binary number. Consider an example given below −ExampleThe input is as follows:Enter a binary number:10010001The output is as follows:1's complement of 10010001 is 011011102's complement of 10010001 is 01101111AlgorithmRefer an algorithm ... Read More

What are reading and writing characters in C language?

Bhanu Priya

Bhanu Priya

Updated on 20-Jun-2024 21:24:47

4K+ Views

In C programming language the reading and writing characters are as follows −The simplest of the console I/O functions are getche (), which reads a character from the keyboard, and putchar(), which prints a character to the screen.The getche () function works on until a key is pressed and then, ... Read More

Advertisements