Skip to main content

History of C language

.

History of C Language


History of C language is interesting to know. Here we are going to discuss brief history of c language.

C is an imperative procedural language.C is a general-purpose language which has been closely associated with the UNIX operating system for which it was developed - since the system and most of the programs that run it are written in C.
C programming language was developed in 1972 by Dennis Ritchie at bell laboratories of AT&T (American Telephone & Telegraph), located in U.S.A.

C was developed at Bell Laboratories as a system programming language to implement a new operating system on a DEP PDP-11 minicomputer. The project began in 1972, and a language description was published six years later (Kernighan and Ritchie, 1978) [C is a compact terse programming language that includes data types, data separations, the ability to manipulate addresses, and uncomplicated but complete set of flow control constructions.
Dennis Ritchie is known as the founder of c language.

Many of its principles and ideas were taken from the earlier language B and B's earlier ancestors BCPL and CPL. CPL ( Combined Programming Language ) was developed with the purpose of creating a language that was capable of both high level, machine independent programming and would still allow the programmer to control the behavior of individual bits of information


How to Variables Declare


Variable Declaration



Usually Variables are declared before use either at the start of a block of code after the opening {and before any other statements or outside a function.

-------------------------------------------------------------------------------------------------------------------------------------------------
int a,b;/*global variables*/
main()
{
float a;/*local variables
}
--------------------------------------------------------------------------------------------------------------------------------------------------
Local variables can only accessed within that function only whereas Global variables can access in whole program.

Variable Types

There are many 'built-in' data types in C.

short int -128 to 127 (1 Byte)
unsigned short int 0 to 255 (1 Byte)
char 0 to 255 or -128 to 127 (1 Byte)
v Unsigned char 0 to 255 (1 Byte)
signed char-128 to 127 (1 Byte)
int -32,768 to +32,767 (2 Byte)
unsigned int 0 to +65,535 (2 Bytes)
long int -2,147,483,648 to +2,147,483,647 (4 bytes)
unsigned long int 0 to 4,294,967,295 (4 Byte)
double double precision floating point (8 Byte)
long double extended precision floating point(10 Bytes)

Variable Names

we can use any combination of letters and numbers for Variables and function names but it must start with a letter.
We can use Underscore (_) as a letter in variable name and can begin with an underscore But Identifiers beginning with an underscore are reserved, And identifiers beginning with an underscore followed by a lower case letter are reserved, for file scope identifiers Therefore using Underscore as starting letter is not desirable.


Piku and piku are different identifiers because upper and lower case letters are treated as different identifiers.

Comments

Popular posts from this blog

Classification of computer based on their cost size and confriguration.

TYPES OF COMPUTER Computer and it's Type Computers are classified by the type of data they are desinged to process. Data may be obtained either as a result of countig of through the use of same measuring instrument. Data that are obtained by counting are called discreate data are total numbers of students in a classroom. Data that must be obtained throgh measurement are called continous data. For example, continious data are the speeds an automobile measure by speedmotor or the tempreature of a patient as masured by a thermometer. Classification of computer based on their cost size and confriguration. In this category computers are classified as micro-computer. mainfraim compute...

Use of statement in python

Use of statement of Python: Use of if – else statement:-if – else is the variation of if statement. We attach condition with if statement if given condition is true then if block code will executed and if the given condition is false then else block code will executed. The syntax of if – else statement is given below:- if condition: Statement 1 Statement 2 else: Statement 3 Statement 4 Write a program in python to check the given number is even or odd. n=input(“Enter a number : ”) if n%2==0: print “The number ”,n,”is even” else: print “The number”,n,”is odd” Use of if-else ladder:- In Python language the switch statement is not worked. In Python we use if-else ladder in spite of using switch. The syntax of if-else ladder is given below:- if condition1: Statement 1 elif condition 2: Statement 2 elif condition 3: Statement 3 >br> else: Statement 4 Write a program in python to find greatest number in three numbers. a=input(“Enter firs...

computer and it's generation

Computer and It's GENERATION Let us first define the term computer. Computer is defined in the Oxford dictionary as "An automatic electronic apparatus for making calculations or controlling operations that are expressible in numerical or logical terms." The definition clearly categorise computer as electronic apparatus although the first computers were mechanical and electromechanical apparatus. The definition is also pointing towords the two major areas of computer application viz. data processing and computer assisted controls/operations. The another important confluence of the definition is the fact that the computer can perform only those operations/calculations which can be expressed in logical or numerical terms. Computer Generation From the early 1940's to the present, Computer scientists have been able to identify clear-cut stages in the development of computer technology. With each stage, radical change in electronics have taken place. As a resu...