Posts

Showing posts from February, 2021

Useful programs in c programming language

C Programming Language/ programs C program to shutdown a computer #include  <dos.h> main() { system("c:\\windows\\system32\\shutdown /s /t 3600");  // means that it will go off after 3600 seconds } C Program To Calculate Mean and Standard Deviation #include<math.h> #include<stdio.h> #define MAX 10 void main() { int i, n; float num[MAX], deviation, sum, sumsqr, mean, variance, stddev; sum = 0;

C PROGRAMMING LANGUAGE

PART 1: OPERATORS IN C LANGUAGE OPERATORS IN C LANGUAGE An operator is a symbol that operates on a value or a variable. For example: + is an operator to perform addition. C has a wide range of operators to perform various operations. Relational Operators Logical Operators Assignment Operator Decrement and increment Comma Operator sizeof Operator C Arithmetic Operators An arithmetic operator performs mathematical operations such as addition, subtraction, multiplication, division etc on numerical values (constants and variables). Operator Meaning of Operator + addition or unary plus - subtraction or unary minus * Multiplication / Division % remainder after division (modulo division) C Increment and Decrement Operators C programming has two operators increment ++ and decrement -- to change the value of an operand (constant or variable) by 1. Increment ++ increases the value by 1 whereas decrement -- decreases the value by 1. These two operators are unary operators, meaning the