Posts

Showing posts from March, 2023

Operator in C

Operator in C  In C Programming language, operator are symbols that represent Operation to be perform on one or more operands. An operators specified an operation to be performed that yields a value. Here are some commonly used operator  in C : 1. Arithmetic Operators Arithmetic operators are used for numeric calculations. These  Operators are used to perform for mathematical/arithmetic operations on operands. They are of two types- a. Unary Arithmetic operators unary operators require only one operand. for example:     +x          -y here '-' changes the sign of the operand y. b. Binary Arithmetic operators Binary operators require two operands. There are five arithmetic operators- Operator Purpose + addition - subtraction * multiplication % Gives the remainder in integer division NOTE : %(modulus operator) cannot be applied w...

Input- Output in C

Input-Output in C There are three main functions of any program : it takes data as input,processes this data and gives output. The input operation involves movement of data from an input device(generally keyboard) to computer memory, while in output operation the data from computer memory to the output device (generally screen). The input output is performed through a set of library function that supplied with every C compiler. These functions are formally not a part of the language but they are considered standard for all input-output operation of C. There are several header files that are provide necessary information in support of the various library function. These header file are entered in the program using #include directive at the beginning of the program . #include <stdio.h> for standard input output. similarly there are other header files like math.h, string.h, stdlib.h that should be included when certain library function are used. In this article we discuss abou...