Bhanu Priya has Published 1449 Articles

What is a two-dimensional array in C language?

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 15:11:52

4K+ Views

An array is a group of related items that store with a common name.SyntaxThe syntax is as follows for declaring an array −datatype array_name [size];Types of arraysArrays are broadly classified into three types. They are as follows −One – dimensional arraysTwo – dimensional arraysMulti – dimensional arraysInitializationAn array can be ... Read More

What is a one-dimensional array in C language?

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 15:06:17

12K+ Views

An array is a group of related items that store with a common name.SyntaxThe syntax is as follows for declaring an array −datatype array_name [size];Types of arraysArrays are broadly classified into three types. They are as follows −One – dimensional arraysTwo – dimensional arraysMulti – dimensional arraysOne – dimensional arrayThe ... Read More

Write a C program to reverse array

Bhanu Priya

Bhanu Priya

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

3K+ Views

An array is a group of related items that store with a common name.SyntaxThe syntax is as follows for declaring an array −datatype array_name [size];InitializationAn array can also be initialized at the time of declaration −int a[5] = { 10, 20, 30, 40, 50};Reversing array in CWe can reverse array ... Read More

C program to find Highest Common Factor (HCF) and Least Common Multiple (LCM)

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 15:02:48

6K+ Views

First, let us learn how to find Highest Common Factor (HCF).Highest Common Factor (HCF)The greatest number divides each of the two or more numbers is called HCF or Highest Common Factor. It is also called as Greatest Common Measure(GCM) and Greatest Common Divisor(GCD).For example, What is the HCF of 12 ... Read More

What are the predefined functions in C language?

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 15:01:55

11K+ Views

Functions are broadly classified into two types, which are as follows −Predefined functionsUser defined functionsPredefined (or) library functionsThese functions are already defined in the system libraries.Programmer will reuse the already present code in the system libraries to write error free code.But to use the library functions, user must be aware ... Read More

Explain nested switch case in C language

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 14:59:55

998 Views

ProblemWrite a C program to check the entered password by the user is valid or not based on his/her ID using nested switch case.SolutionThe solution is explained below −In C language, we can write inner switch which is placed in an outer switch.The case values of the inner and outer ... Read More

Explain different types of expressions in C program

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 10:24:50

3K+ Views

An expression is a combination of operators and operands which reduces to a single value. An operation is performed on a data item which is called an operand. An operator indicates an operation to be performed on data.For example, z = 3+2*1z = 5Primary expressions − It is an operand ... Read More

What are executable statements in C language?

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 10:22:48

3K+ Views

A ‘C’ program contains executable statements. A compiler helps to translate the executable statements into machine language.When a user runs the program, he/she machines the language statements which are executed by the compiler.Types of executable statementsThe types of executable statements in C language are as follows −Input – output statementsAssignment ... Read More

C Program to reverse a given number using Recursive function

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 10:21:05

12K+ Views

"Recursive function" is something which calls itself again in the body of the function.For example, A function fact ( ), which computes the factorial of an integer ‘N’, which is the product of all whole numbers from 1 to N.fact ( ) with an argument of 1 (or) 0, the ... Read More

Explain variable declaration and rules of variables in C language

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 10:20:27

12K+ Views

Let us first understand, what is a variable.VariableIt is the name for memory location that may be used to store a data value.A variable may take different values at different times during execution.A variable name may be chosen by the programmer in a meaningful way, so as to reflect its ... Read More

Advertisements