Monday, 7 January 2013

ARITHMETIC OPERATORS IN C


ARITHMETIC OPERATORS IN C WITH EXAMPLE


Operatorfunction
*Multiplication
/Division
%Remainder
+Addition
-Subtraction

* operator is used give product of 2 numbers.

/ Operator gives Quotient after dividing Divisor and Dividend. Divisor should be nonzero number.

% operator gives remainder after division of 2 numbers. % operator can be used only for integer data type.

+ operator gives sum of 2 numbers.

- operator used to subtract one number from another number.

Note:-

# If both number are positive than answer will be in positive number.
# If either or both number are negative than answer will be either in positive or in negative, it is machine dependent.

Example:-

Program to find sum of 2 number.



Program to find product of 2 number.


Program to find subtract 2 number.


Program to find division 2 number.



Program to find remainder.



Previous Code:- 
Keyword used in c

List Code:- 
C Codes

Next Code:-
Logical operators

C Programs
List of c Programs

LIST OF KEYWORD USED IN C


LIST OF KEYWORD USED IN C

All keywords have fixed meaning and meaning can`t be changed. keyword are basic building blocks for program.


list of keyword used in c
autodoubleintstruct
breackelselongswitch
caseenumregistertypedef
charexternreturnunion
constfloatshortunsigned
continueforsignedvoid
defaultgotosizeofvolatile
doifstaticwhile


Note:-

# Keyword can`t be used as variable name or class name.

Previous Code:- 


List Code:- 
C Codes

Next Code:-
Arithmetic operators

C Programs
List of c Programs

C CODES


C CODES

Keyword used in c

Arithmetic operators

Logical operators

Bitwise Operators

if decision making statement

if-else statement

Nesting of if statement

else if statement

Condition Operators

Increment operator

Decrement operator

for loop

while loop

do-while loop

Nested loop

Switch case in c with examples

Break Statement