Bhanu Priya has Published 1581 Articles

What are relational operators in C language?

Bhanu Priya

Bhanu Priya

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

770 Views

These are used for comparing the two expressions.OperatorDescriptionExamplea=10, b=20Output=200==equal toa==b10==200!=not equal toa!=b10!=201Relational expression output is either true (1) (or) false (0).AlgorithmFollow the algorithm given below −START Step 1: Declare integer variables. Step 2: Read all variables at runtime. Step 3: Perform relational operations.    i. a=b    v. a==b   ... Read More

Explain the concept of Arithmetic operators in C language

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 10:26:02

2K+ Views

It is used to perform the arithmetic operations like addition, subtraction etc.OperatorDescriptionExamplea=20, b=10Output+Additiona+b20+1030-subtractiona-b20-1010*multiplicationa*b20*10200/Divisiona/b20/102(quotient)%Modular Divisiona%b20%100 (remainder)AlgorithmFollow the algorithm mentioned below −START Step 1: Declare integer variables. Step 2: Read all variables at runtime. Step 3: Perform arithmetic operations.    i. a+b    ii. a-b    iii. a*b    iv. b/a   ... 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

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

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

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

Explain about link and definition section in C language

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 10:19:23

3K+ Views

The link and definition sections are called as preprocessor directives. It gives instructions to the compiler to link function from the system library.For example, the definition section defines all the symbolic constants.#includeFor example, #define PI 3.1415The preprocessor directives must start with # symbol.Without link definition the program will not execute ... Read More

C program to handle integer data files using file concepts

Bhanu Priya

Bhanu Priya

Updated on 15-Mar-2021 10:18:13

1K+ Views

In this program, we are trying to sort out the odd numbers and even numbers that are present in one file. Then, we try to write all odd numbers in ODD file and even numbers into EVEN file.Open a file DATA in write mode and write some numbers into the ... Read More

Explain the pre-processor directives in C language

Bhanu Priya

Bhanu Priya

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

5K+ Views

The pre-processor is a program which process the source code before it passes through compiler. It operates under the control of different command lines or directives.Pre-processor are placed in source program before the main line, it begins with symbol# in column one and do not require a semicolon at the ... Read More

What are different pointer operations and problems with pointers in C language?

Bhanu Priya

Bhanu Priya

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

2K+ Views

A pointer is a variable whose value is the address of an another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before using it to store any variable address.Consider the following statement −int qty = 179;The representation of the variable ... Read More

Advertisements