History of c programming-:History of C -: “C” seems a strange name for a programming language.But this strange name sounding language is one of the most popular computer languages today because it is a structured,high level, machine independent language. it allows software developer to develop programs without worrying about the hardware platform where they will be implemented. The root of all modern language is ALGOL introduced in the early 19160 ALGOL was the first computer language to use a block structure although it never become popular in USA it was widely used in Europe ALGOL gave the concept of structured programming to the computer science community computer scientist like Corrado Bohan does a popularized this concept during 1960.
Importance of c language -: When we write a program in C Its efficient and fast this is due to its variety of data types and powerful operators it is many time faster than BASIC for example a program to increase a variable from 0 to 15000 takes about 1 second in C. while it takes more than 50 seconds in an interpreter BASIC.
Tokens in c language -: Tokens in c programming language-: C language provide many types tokens. In this passage passage of text individual words and punctuation marks are called tokens. Similarly in a C program are the program the smallest individual units are known as C tokens. In the C language has 6 types of tokens. C programs are written using these tokens Anderson test of the language. Types of C tokens are below:
1. Keywords
2. Identifiers
3. Constants
4. Strings
5. Special symbols
6. Operators
Character set in c language-:The characters that can be used to form words numbers and expressions depend upon that computer on which the program is run. However, is subset of characters is available that can be used on most personal Micro Mini and mainframe computers. The characters in C are grouped into the following categories:
1. Letters
2. Digits
3. Special characters
4. White spaces
Constant in c language -: Constants in C refer to fixed value that do not change during the execution of a program. There are two two types of constants:
1. Numeric constants
(A) Integer constants
(B) Real constants
2. Character constants
(A) Single character constants
(B) String constants
variable in c language -:A variable data name that may be used to store a data value only constant that remain unchanged during the execution of a program a variable may take different values at different times during execution we used several variable.variable store the value of money at the end of each year A variable name can be chosen by the programmer in a meaningful way so as to replace function or nature in the program some example of some names are here height, Total, weight, amount etc.
Data type in c language-:Data types in “C”language is rich in its data type. storage representation and machine instruction to handle constant differ from machine to machine. the variety of data types available allow the programmer to select the type approach appropriate to the needs of the application as well as the machine.
ANSI supports 3 classes of data types :
Operator and its type -:C support a rich set of built in operator we have already used several of them such as equal to add(+)Minus(-) multiplication(*) and division(/) operator is a symbol that tells the computer to perform certain mathematics or logical manipulation. operators are used in program to manipulate data and variables. they usually form a part of mathematical or logical expression.
- Arithmetic operator
- Relation operator
- Logical Operator
- Assignment operator
- increment and decrements operator
- Conditional operator
- Bitwise operator
Decision making system -: The C program is a set of statements which are normally executed sequentially in the order in which they appear.this happens when no option or no repetition for certain calculation are necessary . how were in practice we have a number of situation where we may have to change the order of execution of statement based on certain condition or repeat a group of statement and till certain specified condition.
Looping in c language-:In looping a sequence of statement are executed until some conditional for termination of the loop are satisfied. A program loop there for consists of two segments. The control statement tests certain condition and then direct the repeated execution of the statements contained in the body of loop.
Array in c language-: In many application we need to handle a large volume of data in terms of reading,processing and printing. to process such large amount of data we need a powerful data type that would facilitate efficient sorting accessing and manipulation of data items. C support a derived data type known as array.
An array is a fixed size size sequenced collection of elements of the same data. In others words we can say “a collection of same data type in large value called array ”
Data Structure in c language -: C support a rich set of derived and user define data type
- fundamental data types
- Derived data types
- user defined data types
String in c language-:A string is a sequence of characters that is treated as a single data item. Any group of character (except double quote sign) defined between double quotation marks is a string constant as like ” Joseph is always right ”.