Posts

operators in c

Operators For doing any arithmetic or logical operation we need operators. We can broadly categorised operators in three categories 1. Unary operators 2. Binary operators 3. Ternary operators Binary operators:- Binary operators need two operands to perform. Binary operators are different types - 1. Arithmetic operators There are 5 arithmetic operators + , -, *, /, % Except % (modulus division) all other arithmetic operators can apply on integer number or float number All arithmetic operators can apply on signed number or unsigned number. In modulus division the sign of the result is always the sign of 1st operand Example :- 10%3=1 -10%3=-1 -10%-3=-1 10%-3=1 Relational operator:- Relational operator are used to compare two quantities or two number Relational operator can apply on signed number and unsigned number These operator will give the result in the form of 0 and 1 Some relational operator are compliment to each othe

C language program even or odd

Here is complete program to check number is even or odd in c #include<stdio.h> void main() { int n; clrscr() ; printf("enter the value of n \n") ; scanf(%d", & n) ; if(n%2==0) { printf("even") ; } else printf("odd") ; getch() ; } If any doubt please ask in comment

Hello program in c language

Hello program is first program in c Here is full programme #include<stdio.h> #include<conio.h> void main { clrscr() ; printf("hello") ; getch() ; }  Program is complete now you can run this in turbo c Thanks

ALGORITHM

                      ALGORITHM Hello friends algorithm is basic thing for programming so we will start learning algorithm first Characteristics of algorithm:- 1. Input 2.Process 3.Outpot 4.Finiteness 5.Effeciveness Input: .    by using inputs step we will give input to our algorithm, there may be zero or more than zero inputs Example:- enter the value of a and b Process:-  By using Process step ,the algorithm will do some arithmetic calculation or logical operation Example:- c=a+b Output:-     There must be at least one output and it is unique Example:-  print the value of c Finiteness:-  The algorithm must end after completion of certain steps. Effectiveness:- Every steps of algorithm must accurate If any doubt ask in comment. Visit next part for further information