Understand All about Windows 7 Tips and Tricks, Fashion,Technology, Sports, Games,Windows 8 ,Computer Science ,Essay ,Application and more useful content here, Simply to Read and Enjoy it.
Feed Headline Animator
Composition of R.B.C
Composition of R.B.C:-
Each red blood cell contains
1. Water-----65%
2. Solid-----35%
A) Solid Portion 35% contains:-
The solid portion contains,
i. Hemoglobin -----33%
ii 2% of phospholipids, cholesterol, cholesterol aster, amino acid and proteins.
iii. But very small amount of Urea, Uric acid Phosphate are also present
B) Total lipids of R.B.C:-
Total lipids,
i. Phospholipids -----60%
ii. Free Cholesterol -----30%
iii. Fat and cholesterol aster -----10%
of the salts in the corpuscles potassium phosphate is the chief slat.
Posted by: Wasim Javed
Labels:
Composition of R.B.C
Formed Elements of blood
There are three types of cellular elements in the blood which constitute about 45% of the blood i.e
i. red blood corpuscles (R.B.C) or erythrocytes.
ii. White blood corpuscles (W.B.C) or leukocytes
iii. Platelets or thrombocytes
These are collectively known as formed aliments of the blood.
Red blood Corpuscles (R.B.C):-
(R.B.C's are also known as erythrocytes). They canto no nucleic acid or mitochondria and can reproduce R.B.C' have a little aerobic metabolic and have no protein, fat or carbohydrate synthetics activity. These substances and function are lost where normoble and reticuloblast are converted into mature re blood cells.
Shape:-
The mature human or mammalian red blood cells camel are circular , biconvex in shape and lack nucleus. In came they are oval in shape.
In mammalian vertebrates red cells are oval, biconvex and nucleated. In foctus. They are nucleated but in later part the nucleated cells disappear from the circa the edges are rounded and thicker then the center and looks like dumb-bell from the side.
Size:-
Red blood cells are 7.5 um in diameter 7.2u
1.1 um in thickness
1 um in the contve
7.2 u means diameter.
Posted by: Wasim Javed
Labels:
Formed Elements of blood
C Language Coversions
Decimal to binary
Divide by 2 and start bottom to top.
Decimal to octal
Divide by 8 and start bottom to top.
Decimal to hexadecimal
Divide by 16 and start bottom to top.
Binary to decimal
Multiply by 2 and power start on 2.
Octal to decimal
Multiply by 8 and power start on 8.
Hexadecimal to decimal
Multiply by 16 and power start on 16.
Binary to octal
Make table start 3 marks right to left and 3 mark look in the table and write below 3 marks and write them.
Octal to binary
Make table mark 3 below the octal numbers and write them.
Binary to hexadecimal
Make table 4 mark below the binary numbers and write them.
Hexadecimal to binary
Make table 4 mark below the hexadecimal numbers and write them.
Octal to hexadecimal
Step one: convert octal into binary.
Step second: convert binary of octal into hexadecimal.
Hexadecimal to octal
Step one: convert hexadecimal into binary.
Step second: convert binary of hexadecimal into octal.
Decimal to binary in points
Before point same as decimal to binary conversion after point all the numbers multiply by 2 the result again multiply by 2 when same result begin then stop and write start top to bottom and count before the same result.
Posted by: Wasim Javed
Divide by 2 and start bottom to top.
Decimal to octal
Divide by 8 and start bottom to top.
Decimal to hexadecimal
Divide by 16 and start bottom to top.
Binary to decimal
Multiply by 2 and power start on 2.
Octal to decimal
Multiply by 8 and power start on 8.
Hexadecimal to decimal
Multiply by 16 and power start on 16.
Binary to octal
Make table start 3 marks right to left and 3 mark look in the table and write below 3 marks and write them.
Octal to binary
Make table mark 3 below the octal numbers and write them.
Binary to hexadecimal
Make table 4 mark below the binary numbers and write them.
Hexadecimal to binary
Make table 4 mark below the hexadecimal numbers and write them.
Octal to hexadecimal
Step one: convert octal into binary.
Step second: convert binary of octal into hexadecimal.
Hexadecimal to octal
Step one: convert hexadecimal into binary.
Step second: convert binary of hexadecimal into octal.
Decimal to binary in points
Before point same as decimal to binary conversion after point all the numbers multiply by 2 the result again multiply by 2 when same result begin then stop and write start top to bottom and count before the same result.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Write note on the following topics
(1) Local variable: -
These variables which are used with in only that function, in which these are declared are called local variable. These variables cannot be used in the main ( ) program or in another program.
(2) Global variable: -
Those variables which are declared before main ( ) function and can be used any ware in the program.
(3) Return statement: -
This statement is use to bring a value from any function main ( ) program.
(4) Calling function: -
The written function of the main ( ) function is called calling function.
(5) Called function: -
A function which is written in main ( ) program is called function.
(6) Source program: -
A computer program written in a high level language is called source program. It is also called the source code.
(7) Object program: -
A computer program in a machine language is called the object program. It is also called the object code.
Posted by: Wasim Javed
These variables which are used with in only that function, in which these are declared are called local variable. These variables cannot be used in the main ( ) program or in another program.
(2) Global variable: -
Those variables which are declared before main ( ) function and can be used any ware in the program.
(3) Return statement: -
This statement is use to bring a value from any function main ( ) program.
(4) Calling function: -
The written function of the main ( ) function is called calling function.
(5) Called function: -
A function which is written in main ( ) program is called function.
(6) Source program: -
A computer program written in a high level language is called source program. It is also called the source code.
(7) Object program: -
A computer program in a machine language is called the object program. It is also called the object code.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What are unions in C language, explain
Unions: -
A union is a memory location just like a structure which has number of variables of different data type. The syntax of a union in C language is just like the structure syntax, such that:
Union name of union
{
Type member variables;
}
Union name of union using new name;
In this topic we also use a dot (.) operator with its new reference name.
For example
Union mem
{
Int a;
Char b;
};
Union name value;
So we can use its reference name value with its member variables as:
Value . a;
Value . b;
Posted by: Wasim Javed
A union is a memory location just like a structure which has number of variables of different data type. The syntax of a union in C language is just like the structure syntax, such that:
Union name of union
{
Type member variables;
}
Union name of union using new name;
In this topic we also use a dot (.) operator with its new reference name.
For example
Union mem
{
Int a;
Char b;
};
Union name value;
So we can use its reference name value with its member variables as:
Value . a;
Value . b;
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is structure, explain
Structure: -
As we know that an array is the collection of same data type but structure is the collection of different data types or different variables or different field.
A structure is written as:
Struct name of structure
{
Type member’s variables;
};
Where the word struct is used for structure and it is a reserved word, which tells the compiler that we are introducing the structure and fields.
For example
Struct student record
{
Char name [15];
Char exam [10];
Int phy, che, math’s;
};
So the student name is the name of structure and name, exam are the fields of character type and phy, che, math’s are the fields of integer type.
Posted by: Wasim Javed
As we know that an array is the collection of same data type but structure is the collection of different data types or different variables or different field.
A structure is written as:
Struct name of structure
{
Type member’s variables;
};
Where the word struct is used for structure and it is a reserved word, which tells the compiler that we are introducing the structure and fields.
For example
Struct student record
{
Char name [15];
Char exam [10];
Int phy, che, math’s;
};
So the student name is the name of structure and name, exam are the fields of character type and phy, che, math’s are the fields of integer type.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is pointer and pointer operators, explain
Pointer: -
A pointer is a variable, which is used to store the address of another variable.
For example
If we have a variable ‘T’ whose address is 1000 and its value is 5 let ‘B’ another variable which has the address number 1000 of ‘t’ and it has address 1003 then it will be as:
Variable Address Values
T 1000 5
B 1003 1000
So we can say ‘B’ is keeping the address of variable ‘T’ so it will be a pointer.
Pointer operators: -
The operators ‘&’ and ‘*’ are called the pointer operators. These operators are used to point the address of a variable as well as the content (value) of a variable.
So the operator ‘&’ is used to store the address of operator and the operator ‘*’ is used to store the content of that variable.
The pointer variable is declared as:
Data type
Data type * variable name;
For example
Int *a;
So a will be a pointer variable if this variable a has value 5 and it is started on address 1000 then
Printf (“%d”, a); --------------- (i)
Printf (“%d”, &a); ------------- (ii)
Printf (“%d”, *a); -------------- (iii)
So the result of (i) will be 5 and the result of (ii) will be 1000 and the result of (iii) will be 5.
Posted by: Wasim Javed
A pointer is a variable, which is used to store the address of another variable.
For example
If we have a variable ‘T’ whose address is 1000 and its value is 5 let ‘B’ another variable which has the address number 1000 of ‘t’ and it has address 1003 then it will be as:
Variable Address Values
T 1000 5
B 1003 1000
So we can say ‘B’ is keeping the address of variable ‘T’ so it will be a pointer.
Pointer operators: -
The operators ‘&’ and ‘*’ are called the pointer operators. These operators are used to point the address of a variable as well as the content (value) of a variable.
So the operator ‘&’ is used to store the address of operator and the operator ‘*’ is used to store the content of that variable.
The pointer variable is declared as:
Data type
Data type * variable name;
For example
Int *a;
So a will be a pointer variable if this variable a has value 5 and it is started on address 1000 then
Printf (“%d”, a); --------------- (i)
Printf (“%d”, &a); ------------- (ii)
Printf (“%d”, *a); -------------- (iii)
So the result of (i) will be 5 and the result of (ii) will be 1000 and the result of (iii) will be 5.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is function, discus its types in C language
Function: -
A function is the collections of statements, which are used for any specific task.
Types of function: - There are two types of function in C language.
(1) Built in function
(2) User define function
(1) Built in function: -
Those functions which are already the parts of C language. The compiler already has known these functions. These functions are called built in functions. A built in function is also called a library function, a system defined functions.
For example
Scanf ( ), printf ( ), gets ( ), puts ( ), sin ( ), cos ( ) etc.
(2) User define function: -
These functions which a user create by it self and are not the part of the library file, are called user defined functions. These functions can only be use with in that program in which these are created and cannot in other program.
For example
Factorial of a number etc.
Posted by: Wasim Javed
A function is the collections of statements, which are used for any specific task.
Types of function: - There are two types of function in C language.
(1) Built in function
(2) User define function
(1) Built in function: -
Those functions which are already the parts of C language. The compiler already has known these functions. These functions are called built in functions. A built in function is also called a library function, a system defined functions.
For example
Scanf ( ), printf ( ), gets ( ), puts ( ), sin ( ), cos ( ) etc.
(2) User define function: -
These functions which a user create by it self and are not the part of the library file, are called user defined functions. These functions can only be use with in that program in which these are created and cannot in other program.
For example
Factorial of a number etc.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is a string discuss its input and output functions
String: -
The collection of characters is called a string.
For example
“Pakistan” is a string
A string is always enclosed in double quotes.
String input function: -
To input a string we use get ( ) function and its format is:
Get (variable);
String output function: -
To display a string on screen we use puts ( ) function. The syntax of a string output function will be as:
Puts (variable);
Posted by: Wasim Javed
The collection of characters is called a string.
For example
“Pakistan” is a string
A string is always enclosed in double quotes.
String input function: -
To input a string we use get ( ) function and its format is:
Get (variable);
String output function: -
To display a string on screen we use puts ( ) function. The syntax of a string output function will be as:
Puts (variable);
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is ARRAY, explain its types
ARRAY: -
It is the combination of same data type or if same data is needed more then none time then we use array.
Types Normally there are two types of array.
(1) One dimensional array
(2) Two dimensional array
(1) One dimensional array: -
This array is in form a list (vertical\Horizontal) the data input output or process in one dimensional array with the help of loop.
The syntax of one dimensional array will be as:
Array name [strength]
For example
A [5];
The structure of above syntax will be as:
A (0)
A (1)
A (2)
A (3)
A (4)
(2) Two dimensional array: -
Two dimensional array is also called a table because it consist of rows and columns. The syntax of two dimensional arrays will be as:
Data type array name [rows] [columns]
For example
Int [3] [2];
The structure of above syntax will be as:
A [0] [0] A [0] [1]
A [1] [0] A [1] [1]
A [2] [0] A [2] [1]
The data input output are process in this array with the help of nested loop.
Posted by: Wasim Javed
It is the combination of same data type or if same data is needed more then none time then we use array.
Types Normally there are two types of array.
(1) One dimensional array
(2) Two dimensional array
(1) One dimensional array: -
This array is in form a list (vertical\Horizontal) the data input output or process in one dimensional array with the help of loop.
The syntax of one dimensional array will be as:
Array name [strength]
For example
A [5];
The structure of above syntax will be as:
A (0)
A (1)
A (2)
A (3)
A (4)
(2) Two dimensional array: -
Two dimensional array is also called a table because it consist of rows and columns. The syntax of two dimensional arrays will be as:
Data type array name [rows] [columns]
For example
Int [3] [2];
The structure of above syntax will be as:
A [0] [0] A [0] [1]
A [1] [0] A [1] [1]
A [2] [0] A [2] [1]
The data input output are process in this array with the help of nested loop.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Explain Continue & Break statement
Continue statement: -
The “continue” statement shifts the control break to the beginning of the loop. It is used inside the body of a loop. When this statement is executed inside the body of loop, the control shift to the first statement of the body of the loop and the statement within the body of loop following the continue statement are not executed. Its syntax will be as:
Continue;
Break statement: -
The “break” statement is used to terminate execution of a loop when it is used inside the body of the loop.
Different between continue and break statement:
The “break” statement terminates the loop during execution. The other statements of the body of the loop that come under the “break” statement are not executed.
The “continue” statement does not terminate the loop but it shifts the control at the beginning of the body of the loop. The statements of the body of the loop that come under the “continue” statement are not executed.
Posted by: Wasim Javed
The “continue” statement shifts the control break to the beginning of the loop. It is used inside the body of a loop. When this statement is executed inside the body of loop, the control shift to the first statement of the body of the loop and the statement within the body of loop following the continue statement are not executed. Its syntax will be as:
Continue;
Break statement: -
The “break” statement is used to terminate execution of a loop when it is used inside the body of the loop.
Different between continue and break statement:
The “break” statement terminates the loop during execution. The other statements of the body of the loop that come under the “break” statement are not executed.
The “continue” statement does not terminate the loop but it shifts the control at the beginning of the body of the loop. The statements of the body of the loop that come under the “continue” statement are not executed.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is the difference between simple if and compound if statement
Simple if statement: -
It is a conditional statement. Ifs syntax will be as:
If (condition)
Statement;
So first of all condition is checked if it will become true then statement will be executed otherwise not.
For example
If (a>b)
Great = a;
Compound if statement: -
Its syntax will be as:
If (condition)
{
Statement 1;
Statement 2;
------------
}
Posted by: Wasim Javed
It is a conditional statement. Ifs syntax will be as:
If (condition)
Statement;
So first of all condition is checked if it will become true then statement will be executed otherwise not.
For example
If (a>b)
Great = a;
Compound if statement: -
Its syntax will be as:
If (condition)
{
Statement 1;
Statement 2;
------------
}
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is nested loop
Nested loop: -
When one loop is enclosed with in other loop, then this kind of loop is called nested loop.
It may be a nested loop for loop.
It may be a nested while loop.
It may be nested do while loop.
If it is nested for loop then its syntax will be as:
For (variable 2 = initial value; condition; increment \ decrement)
{
For (variable 2 = initial value; condition; increment \ decrement)
{
} body of loop
}
}
The start loop is called outer loop and the end loop is called inner or internal loop. For each number of outer, the inner loop completes its whole cycle.
Posted by: Wasim Javed
When one loop is enclosed with in other loop, then this kind of loop is called nested loop.
It may be a nested loop for loop.
It may be a nested while loop.
It may be nested do while loop.
If it is nested for loop then its syntax will be as:
For (variable 2 = initial value; condition; increment \ decrement)
{
For (variable 2 = initial value; condition; increment \ decrement)
{
} body of loop
}
}
The start loop is called outer loop and the end loop is called inner or internal loop. For each number of outer, the inner loop completes its whole cycle.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What are loop and its types
Loop: -
A cycle process to called loop. Or if some kind of task is required more then one times then we use loop.
Types of loop: -
In C language there are three types of loop.
(1) For loop (2) While loop (3) Do-while loop
(1) For loop: -
If the number of cycles or repetition is already known then we use for loop.
Its syntax is:
For (variable = initial value; condition; increment or decrement ;)
{
Body of loop
}
So in the above structure first of all the value is initialized in the given variable, then in the second part that value is checked in the given condition, it is prove that body will process and if it is will become false then body of loop will not process in the tired part the value in variable is increment or decrement and then it is again checked in the condition part.
(2) While loop: -
The numbers of cycles or repetitions or iterations are already not known then we use while loop.
The syntax is:
While (condition)
{
Body of loop
}
So in this loop, first of all condition is checked, if it remains true the body of loop will process otherwise it will be stopped.
(3) Do-while loop: -
It is also a conditional loop like while loop, but in this loop condition is checked in the end, where as in the whole loop condition is checked first.
Its syntax will be as:
Do
{
Body of loop
}
While (condition);
So in this loop the body of loop will be processed one time at any case, whether the condition is true or false.
Posted by: Wasim Javed
A cycle process to called loop. Or if some kind of task is required more then one times then we use loop.
Types of loop: -
In C language there are three types of loop.
(1) For loop (2) While loop (3) Do-while loop
(1) For loop: -
If the number of cycles or repetition is already known then we use for loop.
Its syntax is:
For (variable = initial value; condition; increment or decrement ;)
{
Body of loop
}
So in the above structure first of all the value is initialized in the given variable, then in the second part that value is checked in the given condition, it is prove that body will process and if it is will become false then body of loop will not process in the tired part the value in variable is increment or decrement and then it is again checked in the condition part.
(2) While loop: -
The numbers of cycles or repetitions or iterations are already not known then we use while loop.
The syntax is:
While (condition)
{
Body of loop
}
So in this loop, first of all condition is checked, if it remains true the body of loop will process otherwise it will be stopped.
(3) Do-while loop: -
It is also a conditional loop like while loop, but in this loop condition is checked in the end, where as in the whole loop condition is checked first.
Its syntax will be as:
Do
{
Body of loop
}
While (condition);
So in this loop the body of loop will be processed one time at any case, whether the condition is true or false.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
what is switch statement, explain
Switch statement: -
The switch statement is also called the conditional statement like else – if statement. But by this statement we can take multi values with our condition.
Its syntax is:
Switch (condition)
{
Case value 1:
Statement 1;
Break;
Case value 2:
Statement 2;
Break;
Case value 3 :
Statement 3;
Break;
Default:
Statement 4;
}
In this structure first of all value of condition is checked, if it methods with case value 1 then statement is executed. If it method with case value 2, then statement 2 is executed. If the method with case value 3, then statement 3 is executed otherwise in false situation, default statement is executed.
Posted by: Wasim Javed
The switch statement is also called the conditional statement like else – if statement. But by this statement we can take multi values with our condition.
Its syntax is:
Switch (condition)
{
Case value 1:
Statement 1;
Break;
Case value 2:
Statement 2;
Break;
Case value 3 :
Statement 3;
Break;
Default:
Statement 4;
}
In this structure first of all value of condition is checked, if it methods with case value 1 then statement is executed. If it method with case value 2, then statement 2 is executed. If the method with case value 3, then statement 3 is executed otherwise in false situation, default statement is executed.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Explain “else – if” statement
The else – if statement: -
This is also a conditional statement like a “if – else” statement, but in this statement there is also a part of else – if statement.
Its syntax will be as:
If (condition)
Statement 1;
Else – if (condition)
Statement 2;
Else
Statement 3;
So in this structure first of all condition 1 is checked if it becomes true the statement 1 is executed. But if it become false then condition 2 with else if in checked and if it become true then statement 2 is executed otherwise statement 3 is executed.
Posted by: Wasim Javed
This is also a conditional statement like a “if – else” statement, but in this statement there is also a part of else – if statement.
Its syntax will be as:
If (condition)
Statement 1;
Else – if (condition)
Statement 2;
Else
Statement 3;
So in this structure first of all condition 1 is checked if it becomes true the statement 1 is executed. But if it become false then condition 2 with else if in checked and if it become true then statement 2 is executed otherwise statement 3 is executed.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Explain the “if – else” statement
The “if – else” statement: -
This statement is also called a conditional statement structure like simple if statement. But there is some extra statement ELSE is used with false case.
The syntax will be as:
If (condition)
Statement 1;
Else
Statement 2;
So in the above structure first of all condition is checked if it become true then statement 1 will be executed and if it become false then statement 2 will be executed.
If this kind of statement will compound then its syntax will be as:
If (condition)
{
Statement 1;
Statement 2;
}
Else
{
Statement 3;
Statement 4;
}
Posted by: Wasim Javed
This statement is also called a conditional statement structure like simple if statement. But there is some extra statement ELSE is used with false case.
The syntax will be as:
If (condition)
Statement 1;
Else
Statement 2;
So in the above structure first of all condition is checked if it become true then statement 1 will be executed and if it become false then statement 2 will be executed.
If this kind of statement will compound then its syntax will be as:
If (condition)
{
Statement 1;
Statement 2;
}
Else
{
Statement 3;
Statement 4;
}
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Explain the “if” statement
The “if” statement: -
The “if statement” is used to execute a set of statements after testing a condition. The “if statement” evaluates the condition. If the given condition is true, the statement (or a block of statements) following the “if statement” is executed. If the condition is false, the statement (or block of statements) following the “if statement” is ignored and the control transfers to the statement immediately after the if structure.
The syntax of the “if statement” is:
If (condition)
Statement - 1;
Statement - 2;
In the above syntax, statement -1 will be executed if the given condition is true. If the given condition is false, statement - 1 is ignored and statement - 2 will be executed.
The execute a block of statements following the “if statement” the block of statements is enclosed in curly, i.e. within {}.
The syntax of “if statement” for executing a block of statements is:
If (condition)
{
Statement - 1;
Statement - 2;
Statement - 3;
}
Posted by: Wasim Javed
The “if statement” is used to execute a set of statements after testing a condition. The “if statement” evaluates the condition. If the given condition is true, the statement (or a block of statements) following the “if statement” is executed. If the condition is false, the statement (or block of statements) following the “if statement” is ignored and the control transfers to the statement immediately after the if structure.
The syntax of the “if statement” is:
If (condition)
Statement - 1;
Statement - 2;
In the above syntax, statement -1 will be executed if the given condition is true. If the given condition is false, statement - 1 is ignored and statement - 2 will be executed.
The execute a block of statements following the “if statement” the block of statements is enclosed in curly, i.e. within {}.
The syntax of “if statement” for executing a block of statements is:
If (condition)
{
Statement - 1;
Statement - 2;
Statement - 3;
}
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Explain Goto and label statement
Goto and label statement: -
A goto statement can cause the program control to the end up almost any where in the program. The general syntax of goto statement is:
Goto label name;
…...
Label name:
Statement 1:
Statement 2:
…….
Where label name is a label name that tell goto statement where to jump. You have to place label name in two places. One is at that place following the goto statement and the other is the place where the goto statement is going jump.
Also the program place for the goto statement to jump can be appeared either before or after the statement.
Posted by: Wasim Javed
A goto statement can cause the program control to the end up almost any where in the program. The general syntax of goto statement is:
Goto label name;
…...
Label name:
Statement 1:
Statement 2:
…….
Where label name is a label name that tell goto statement where to jump. You have to place label name in two places. One is at that place following the goto statement and the other is the place where the goto statement is going jump.
Also the program place for the goto statement to jump can be appeared either before or after the statement.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What are header files or library files, explain
Header files (library files):-
Header file are part of C compiler. These files contain definitions of standard library functions. There are several header files. Each header file contains definitions of one type of function only.
For example, the math.h header file contains definitions of mathematical functions available in C language. Each header file has an execution .h. The preprocessor directive “include” is used to add a header file into the program. The name of the file is written in angle brackets (< >) after “#include” directive. The syntax to include a header file is:
#include
Given the name of the header file in angle rackets specifies that the header file is located in the include directory of the compiler program.
Posted by: Wasim Javed
Header file are part of C compiler. These files contain definitions of standard library functions. There are several header files. Each header file contains definitions of one type of function only.
For example, the math.h header file contains definitions of mathematical functions available in C language. Each header file has an execution .h. The preprocessor directive “include” is used to add a header file into the program. The name of the file is written in angle brackets (< >) after “#include” directive. The syntax to include a header file is:
#include
Given the name of the header file in angle rackets specifies that the header file is located in the include directory of the compiler program.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is the main ( ) function in C program
The main( ) function:-
The main( ) function indicates the beginning of a C program. This function must be included in every C program. When a C program executed, the control goes to main ( ) function. It is the entry point of all C programs.
The statements within this function are the main body of the C program. If main ( ) function is not included, the program is not compiled and an error massage is generated.
The syntax of the main ( ) function is:
Void main (void)
{
Program statements……
}
The main ( ) function may take one or more values. Similarly, it may also output one value.
Posted by: Wasim Javed
The main( ) function indicates the beginning of a C program. This function must be included in every C program. When a C program executed, the control goes to main ( ) function. It is the entry point of all C programs.
The statements within this function are the main body of the C program. If main ( ) function is not included, the program is not compiled and an error massage is generated.
The syntax of the main ( ) function is:
Void main (void)
{
Program statements……
}
The main ( ) function may take one or more values. Similarly, it may also output one value.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is pre-processor directive and its types
Pre-processor directive: -
The instructions that are given to the compiler before the beginning of the actual program are called preprocessor directives. These arte also called compiler directives. These are written at the beginning of the source program. These preprocessor directives start with a number sign (#) and the key word “include” or “define”.
These are the instructions or directives that tell the compiler to take the actions before compiling the source program. The program that handles the preprocessor directives is called the preprocessor because it does some processing before the compilation process actually starts.
There are two types of pre-processor in C language.
The # include directive: -
The # include is a pre-processor directive. It is used to include or import a source text into source program. It is usually used to import header files into a program.
The syntax to use the # include directive is:
# include
Giving the name of the header file in angle brackets specifies that the file is located in the include directory of the compiler program.
The name of the file to be imported can also be written in double quotes. When the name of the file is written in double quotes, it specifies that the file is to be loaded from the directory which contains the source program file.
The syntax to include a header file is:
# include “name of the header file”
The # define directive: -
The # define is a pre-processor directive. It is used to assign a constant quantity to an identifier. This directive can be used any where in the program. Its syntax is:
# define identifier constant
Where
Identifier specifies the identifier name to which the constant value is to be assigned.
Constant specifies the constant value that is to be assigned to the identifier.
The identifier specified in the define directive is not a variable. It does not have any data type. The pre-processor simply replaces all occurrences of the identifier with its value in the program statements that follow the directive.
Posted by: Wasim Javed
The instructions that are given to the compiler before the beginning of the actual program are called preprocessor directives. These arte also called compiler directives. These are written at the beginning of the source program. These preprocessor directives start with a number sign (#) and the key word “include” or “define”.
These are the instructions or directives that tell the compiler to take the actions before compiling the source program. The program that handles the preprocessor directives is called the preprocessor because it does some processing before the compilation process actually starts.
There are two types of pre-processor in C language.
The # include directive: -
The # include is a pre-processor directive. It is used to include or import a source text into source program. It is usually used to import header files into a program.
The syntax to use the # include directive is:
# include
Giving the name of the header file in angle brackets specifies that the file is located in the include directory of the compiler program.
The name of the file to be imported can also be written in double quotes. When the name of the file is written in double quotes, it specifies that the file is to be loaded from the directory which contains the source program file.
The syntax to include a header file is:
# include “name of the header file”
The # define directive: -
The # define is a pre-processor directive. It is used to assign a constant quantity to an identifier. This directive can be used any where in the program. Its syntax is:
# define identifier constant
Where
Identifier specifies the identifier name to which the constant value is to be assigned.
Constant specifies the constant value that is to be assigned to the identifier.
The identifier specified in the define directive is not a variable. It does not have any data type. The pre-processor simply replaces all occurrences of the identifier with its value in the program statements that follow the directive.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Write naming rules or rules to identify the variable
Rules:-
The rules for identification of variables in the programming are
1. The first character of a variable must be alphabetic one.
2. The maximum length of a variable in turbo C version is up to 31 characters.
3. There should no blank space in between two characters of a variable like AR EA (invalid variable).
4. There should no special character in the variable name, instead of standard core line like spe-d.
5. The variable must be meaningful it may be the first character of that thing or full name like area or a.
6. Reserved C word cannot be used as variable name.
Posted by: Wasim Javed
The rules for identification of variables in the programming are
1. The first character of a variable must be alphabetic one.
2. The maximum length of a variable in turbo C version is up to 31 characters.
3. There should no blank space in between two characters of a variable like AR EA (invalid variable).
4. There should no special character in the variable name, instead of standard core line like spe-d.
5. The variable must be meaningful it may be the first character of that thing or full name like area or a.
6. Reserved C word cannot be used as variable name.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is an Expression
Expression: -
An expression is used for calculating the value of a formula. It is formed by combining different operands and operator. Its evaluation gives a single value. The operands may be constant values, different variable names and functions. Parenthesis may also be used in an expression.
For example, to calculate the value of box with sides A, B, C the expression is written as:
A **B **C
Where A, B, C are variable names and are called operands. The multiplication sign ‘**’ is called operator. The combination of operands and operators makes an expression.
Posted by; Wasim Javed
An expression is used for calculating the value of a formula. It is formed by combining different operands and operator. Its evaluation gives a single value. The operands may be constant values, different variable names and functions. Parenthesis may also be used in an expression.
For example, to calculate the value of box with sides A, B, C the expression is written as:
A **B **C
Where A, B, C are variable names and are called operands. The multiplication sign ‘**’ is called operator. The combination of operands and operators makes an expression.
Posted by; Wasim Javed
Labels:
C LANGUAGE Notes
Define size of operator
Size of operator:-
The size of operator is used to know the size of a data type being used.
The general form of the size of operator is:
Sizeof (expression)
There expression is the data type or variable, whose size is measured by the size of operator.
Posted by: Wasim Javed
The size of operator is used to know the size of a data type being used.
The general form of the size of operator is:
Sizeof (expression)
There expression is the data type or variable, whose size is measured by the size of operator.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Explain the address of operator
Address of operator: -
In C language the ampersand operator i.e. & is called addresses of operator. It is used proceeding with the variable name. It would seem more reasonable to use the name of the variable enough with out the ampersand as we did in printf ( ) statement. However the C language compiler requires the arguments to scanf ( ) to be the addresses of variables, rather then the variables themselves.
In other words we can say every variable name occupies a certain location in the memory and the first character (byte) it occupies is the address of that variable. There fore C language compiler provides ampersand to be places as a prefix with the variable name to over come this problem.
Posted by: Wasim Javed
In C language the ampersand operator i.e. & is called addresses of operator. It is used proceeding with the variable name. It would seem more reasonable to use the name of the variable enough with out the ampersand as we did in printf ( ) statement. However the C language compiler requires the arguments to scanf ( ) to be the addresses of variables, rather then the variables themselves.
In other words we can say every variable name occupies a certain location in the memory and the first character (byte) it occupies is the address of that variable. There fore C language compiler provides ampersand to be places as a prefix with the variable name to over come this problem.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
How many operators in C language explain
Operator: -
These are the symbols which are used in mathematical calculations or the solution of mathematical problems. There are several types of operators in C language. The following types are commonly used in C language.
(1) Arithmetic operator: -
These operators which are used in arithmetic calculations are called arithmetic operator. These operator are
1. + ( Adding operator ) 2+3 or a+b
2. – ( Subtraction operator ) 2-3 or a-b
3. * ( Multiplication operator ) 2*3 or a*b
4. / ( Division operator ) 2/3 or a/b
5. % ( Mod operator ) 2%3 or a%b
(2) Relational operator: -
Those operators which are used show the relationship between two constant or variable are called relational operator. These are
< (Less then) 5<7 or a> (Grater then) 7>5 or x>y
<= (Less then or equal) 2<=3 or a<=b
>= (Grater then or equal) 3>=2 or a>=b
== (Equal) 5==5 or a==b
!= (Not equal) 5!=7 or k!=m
(3) Logical operator: -
Those operators which are used to join the relational operators. These are
&& (AND operator)
|| (OR operator)
! (NOT operator)
(4) Assignment operator: -
The assignment operator is (==).
(5) Compound assignment operator: -
The compound assignment operators are (+ = > - =, * = > /=, %).
(6) Increment operator: -
The increment operator adds one to the value of the variable. If n is variable having value 10 then following code adds one two the value of n, so that after the statement is executed, n has a value of 11.
Int n =10;
n++;
(7) Decrement operator: -
The decrement operator subtracts one from the value of the variable. The expression --n;
Decrement the value of n one time.
(8) Unary operator: -
These operators are used with single operator or single variable. These are ++ or-- variable operators.
(i) Prefix unary operators: -
These are used before the variables are operators. For example ++! (Prefix) Prefix decrement).
(ii) Post fix unary operator:-
Those unary operators which are used after the unary variable or operators called post fix unary operators. For example! ++ (Postfix).
Posted by: Wasim Javed
These are the symbols which are used in mathematical calculations or the solution of mathematical problems. There are several types of operators in C language. The following types are commonly used in C language.
(1) Arithmetic operator: -
These operators which are used in arithmetic calculations are called arithmetic operator. These operator are
1. + ( Adding operator ) 2+3 or a+b
2. – ( Subtraction operator ) 2-3 or a-b
3. * ( Multiplication operator ) 2*3 or a*b
4. / ( Division operator ) 2/3 or a/b
5. % ( Mod operator ) 2%3 or a%b
(2) Relational operator: -
Those operators which are used show the relationship between two constant or variable are called relational operator. These are
< (Less then) 5<7 or a> (Grater then) 7>5 or x>y
<= (Less then or equal) 2<=3 or a<=b
>= (Grater then or equal) 3>=2 or a>=b
== (Equal) 5==5 or a==b
!= (Not equal) 5!=7 or k!=m
(3) Logical operator: -
Those operators which are used to join the relational operators. These are
&& (AND operator)
|| (OR operator)
! (NOT operator)
(4) Assignment operator: -
The assignment operator is (==).
(5) Compound assignment operator: -
The compound assignment operators are (+ = > - =, * = > /=, %).
(6) Increment operator: -
The increment operator adds one to the value of the variable. If n is variable having value 10 then following code adds one two the value of n, so that after the statement is executed, n has a value of 11.
Int n =10;
n++;
(7) Decrement operator: -
The decrement operator subtracts one from the value of the variable. The expression --n;
Decrement the value of n one time.
(8) Unary operator: -
These operators are used with single operator or single variable. These are ++ or-- variable operators.
(i) Prefix unary operators: -
These are used before the variables are operators. For example ++! (Prefix) Prefix decrement).
(ii) Post fix unary operator:-
Those unary operators which are used after the unary variable or operators called post fix unary operators. For example! ++ (Postfix).
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is variable and what are its types
Variable: -
It is a space or a location where we keep some constant value. There are four types of variable in C language. (1) Integer variable (2) Float variable (3) Character variable (4) String variable
(1) Integer variable: -
A variable or a place we keep or put only integer constant is called integer variable. It is declared a deserved word ‘int’. For example a=5, then a will be integer variable.
(2) Float variable: -
A location or variable where we put some float or real data is called float variable. It is declared a deserved word ‘float’. For example a=5.55 then a will be a float variable.
(3) Character variable: -
A variable which keep only the character constant is called character variable. It is declared a deserved word ‘char’. For example a=’1’, now a will be a character variable.
(4) String variable: -
A variable which can store a string constant is called a string variable. For example a[8]= “ pakistan ” ; then a[8] will be string variable.
Posted by: Wasim Javed
It is a space or a location where we keep some constant value. There are four types of variable in C language. (1) Integer variable (2) Float variable (3) Character variable (4) String variable
(1) Integer variable: -
A variable or a place we keep or put only integer constant is called integer variable. It is declared a deserved word ‘int’. For example a=5, then a will be integer variable.
(2) Float variable: -
A location or variable where we put some float or real data is called float variable. It is declared a deserved word ‘float’. For example a=5.55 then a will be a float variable.
(3) Character variable: -
A variable which keep only the character constant is called character variable. It is declared a deserved word ‘char’. For example a=’1’, now a will be a character variable.
(4) String variable: -
A variable which can store a string constant is called a string variable. For example a[8]= “ pakistan ” ; then a[8] will be string variable.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is constant and explain its types
Constant: -
A fix or unchangeable value in the program is called a constant value. There are four types of constant in C language. (1)Integer constant (2) Real or Float constant (3) Character constant (d) String constant
(1) Integer constant: -
A numerical value without a decimal is called integer constant. Or A non-frictional (+,-) fix value is called integer constant. For example +225, -555, 500 etc.
(2) Real or Floating constant: -
A frictional (+,-) fix value is called real or floating constant or Numeric values that an integer as well as a decimal part are called real or floating constant. For example +25.32, -58.679, 28.321 etc.
(3) Character constant: -
A single character when it is enclosed in single quotes is called character constant. For example ‘a’, ‘1’, ‘M’ etc.
(4) String constant: -
The combinations of characters when those are enclosed in double quotes are called string constant. For example “Pakistan”, “Phone-0966” etc.
Posted by: Wasim Javed
A fix or unchangeable value in the program is called a constant value. There are four types of constant in C language. (1)Integer constant (2) Real or Float constant (3) Character constant (d) String constant
(1) Integer constant: -
A numerical value without a decimal is called integer constant. Or A non-frictional (+,-) fix value is called integer constant. For example +225, -555, 500 etc.
(2) Real or Floating constant: -
A frictional (+,-) fix value is called real or floating constant or Numeric values that an integer as well as a decimal part are called real or floating constant. For example +25.32, -58.679, 28.321 etc.
(3) Character constant: -
A single character when it is enclosed in single quotes is called character constant. For example ‘a’, ‘1’, ‘M’ etc.
(4) String constant: -
The combinations of characters when those are enclosed in double quotes are called string constant. For example “Pakistan”, “Phone-0966” etc.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What are identifier and its types
Identifier: -
An identifier is the name that presents a variable, constant, data types, function, or label in a program. In the C language, an identifier consists of a combination of alphanumeric characters, such that:
• The first is always a letter of the alphabet or an (_) underscore.
• The remaining can be any letter, numeric digit, or the underscore.
There are two types of identifier in C language.
(1) Standard identifier (2) User-define identifier
(1) Standard identifier: -
The names of defined operations in C language are called identifier. For example, scanf and printf represent input and output functions. These are the standard identifiers.
(2) User- defined identifier: -
These are the names that a programmer assigns to function, data type, variable, etc. in a program.
Posted by: Wasim Javed
An identifier is the name that presents a variable, constant, data types, function, or label in a program. In the C language, an identifier consists of a combination of alphanumeric characters, such that:
• The first is always a letter of the alphabet or an (_) underscore.
• The remaining can be any letter, numeric digit, or the underscore.
There are two types of identifier in C language.
(1) Standard identifier (2) User-define identifier
(1) Standard identifier: -
The names of defined operations in C language are called identifier. For example, scanf and printf represent input and output functions. These are the standard identifiers.
(2) User- defined identifier: -
These are the names that a programmer assigns to function, data type, variable, etc. in a program.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Write the structure of data type and its memory size in C language
S.No Data type Format specifier Data range Memory occupied
1 Int % d -32768----- +32767 2 bytes
2 Long % ld -2147483648------ +2147483647 4 bytes
3 Float % f 3.4*10-38------- 304*10+38 4 bytes
4 Double % lf 107*10-108------ 1.7*10+108 8 bytes
5 Char % C -128------ +127 1 bytes
Posted by: Wasim Javed
1 Int % d -32768----- +32767 2 bytes
2 Long % ld -2147483648------ +2147483647 4 bytes
3 Float % f 3.4*10-38------- 304*10+38 4 bytes
4 Double % lf 107*10-108------ 1.7*10+108 8 bytes
5 Char % C -128------ +127 1 bytes
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Write advantages of C language
Advantages:-
1. As the syntax of C language is very easy and short so it is easier to understand at the begging stage.
2. As its syntax is like by machine language so it is also called middle level language.
3. It is modular programming.
4. It is portable language, portable means that one program witch be written in one computer can easily be run or checked on another computer.
5. It is graphical language that is why its modern version likes C++ and visual C etc. They are use in graphical programming.
Posted by: Wasim Javed
1. As the syntax of C language is very easy and short so it is easier to understand at the begging stage.
2. As its syntax is like by machine language so it is also called middle level language.
3. It is modular programming.
4. It is portable language, portable means that one program witch be written in one computer can easily be run or checked on another computer.
5. It is graphical language that is why its modern version likes C++ and visual C etc. They are use in graphical programming.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is ampersand sign
Ampersand sign:-
When we input data with scanf ( ) function, then variable is joined with a special character and which is called ampersand sign and it is used for the address of that data and without this character we can not input any data in to variable.
Posted by: Wasim Javed
When we input data with scanf ( ) function, then variable is joined with a special character and which is called ampersand sign and it is used for the address of that data and without this character we can not input any data in to variable.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
What is an input and output statement in C language
The input statement: -
Input is that statement which is used to give data to the variable in the program. For C language the main input statement is scanf ( ). It is used in the program will be as:
Scanf (“format specifier”, ampersand sign variable);
For example:
Scanf (“%d or %f or %c or %s”, &a);
%d format specifier is used for integer type data.
%f format specifier is used for real type data.
%c format specifier is used for character type data.
%s format specifier is used for string type data.
The symbol & (ampersand sign) is used with scanf ( ) function and it is used to show the address of data.
The output statement: -
The output statement is that statement is used to display the result on screen. For this purpose the function printf ( ) is used. We can use it
Printf (“Message”);
Printf (“format specifier”, variable);
Printf (“%d or %f or %w”, sum);
Posted by: Wasim Javed
Input is that statement which is used to give data to the variable in the program. For C language the main input statement is scanf ( ). It is used in the program will be as:
Scanf (“format specifier”, ampersand sign variable);
For example:
Scanf (“%d or %f or %c or %s”, &a);
%d format specifier is used for integer type data.
%f format specifier is used for real type data.
%c format specifier is used for character type data.
%s format specifier is used for string type data.
The symbol & (ampersand sign) is used with scanf ( ) function and it is used to show the address of data.
The output statement: -
The output statement is that statement is used to display the result on screen. For this purpose the function printf ( ) is used. We can use it
Printf (“Message”);
Printf (“format specifier”, variable);
Printf (“%d or %f or %w”, sum);
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Explain introduction and history of C language
Introduction: -
C is a programming language developed by Dennis Ritchie in 1972. Programs are structured by defining and calling functions. Program flow is controlled using loops, if statements and function calls. Input and output can be directed to the terminal or to files. Related data can be stored together in arrays structures. C allows the most precise control of input and output.
History of C language: -
C is a general purpose programming language. It was developed at AT&T Bell Laboratories, USA in 1972. It was designed and developed by Dennis Ritchie. It was based on an earlier computer language called B. The B language was developed by Ken Thompson in 1969-70. For this reason, earlier version of the C language was called K&R C (Kernighan and Ritchie C).
The C language is a simple, easy to learn and powerful language. As more and more people started using C language, need to standardize its rules was felt. To meet this need, the American National Standards Institute (ANSI) developed a standard for the C language in late 80s. This version of the C language is known as ANSI C.
Posted by: Wasim Javed
C is a programming language developed by Dennis Ritchie in 1972. Programs are structured by defining and calling functions. Program flow is controlled using loops, if statements and function calls. Input and output can be directed to the terminal or to files. Related data can be stored together in arrays structures. C allows the most precise control of input and output.
History of C language: -
C is a general purpose programming language. It was developed at AT&T Bell Laboratories, USA in 1972. It was designed and developed by Dennis Ritchie. It was based on an earlier computer language called B. The B language was developed by Ken Thompson in 1969-70. For this reason, earlier version of the C language was called K&R C (Kernighan and Ritchie C).
The C language is a simple, easy to learn and powerful language. As more and more people started using C language, need to standardize its rules was felt. To meet this need, the American National Standards Institute (ANSI) developed a standard for the C language in late 80s. This version of the C language is known as ANSI C.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Difference between low and high level languages
Low level language: -
It is actually initial computer language. It is categorized into two types
(1) Machine language (2) Assembly
(1) Machine language: -
It is the directly computer understood language. That computer language with does not need convert into any other interface or language for the understanding of computer. This language consists of binary digit these are (0, 1).
(2) Assembly language: -
It is low level language but one step higher then machine language. This language is always needed to first convert in to machine language and then computer can understood it. For this purpose a converter program “Assembler”.
High level language: - The programming languages that are close to human language are called high level language. The instructions in those languages are more like human language. Unlike low level language, these languages are sassier to learn. These languages are BASIC, FORTRAN, COBEL, PASCAL, C, C ++, etc. These languages are used for writing application programs. Every high level language has its own set of rules for writing program.
These rules are called the syntax of the language. A program written in a high level language is called source program or source code. Source code cannot be run directly on the computer. It is first translated or converted into the machine language. The application that is used to convert a source program into machine program is called compiler.
Posted by: Wasim Javed
It is actually initial computer language. It is categorized into two types
(1) Machine language (2) Assembly
(1) Machine language: -
It is the directly computer understood language. That computer language with does not need convert into any other interface or language for the understanding of computer. This language consists of binary digit these are (0, 1).
(2) Assembly language: -
It is low level language but one step higher then machine language. This language is always needed to first convert in to machine language and then computer can understood it. For this purpose a converter program “Assembler”.
High level language: - The programming languages that are close to human language are called high level language. The instructions in those languages are more like human language. Unlike low level language, these languages are sassier to learn. These languages are BASIC, FORTRAN, COBEL, PASCAL, C, C ++, etc. These languages are used for writing application programs. Every high level language has its own set of rules for writing program.
These rules are called the syntax of the language. A program written in a high level language is called source program or source code. Source code cannot be run directly on the computer. It is first translated or converted into the machine language. The application that is used to convert a source program into machine program is called compiler.
Posted by: Wasim Javed
Labels:
C LANGUAGE Notes
Subscribe to:
Posts (Atom)