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

history of computer.

History of Computer The ENIAC was invented by J. Presper Eckert and John Mauchly at the University of Pennsylvania and began construction in 1943 and was not completed until 1946. It occupied about 1,800 square feet and used about 18,000 vacuum tubes, weighing almost 50 tons. When was the first computer invented? There is no easy answer to this question due to the many different classifications of computers. The first mechanical computer, created by Charles Babbage in 1822, doesn't really resemble what most would consider a computer today. Therefore, this document has been created with a listing of each of the computer firsts, starting with the Difference Engine and leading up to the computers we use today. NOTE: Early inventions which helped lead up to the computer, such as the abacus, calculator, and tablet machines, are not accounted for in this document. First mechanical computer or automatic computing engine concept In 1822, Charles Babbage conceptualized and b

What is Python ?

What is python What is Python: - Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Python was developed by Guido Van Rossum in the late eighties and early nineties at the National Research Institute for Mathematics and Computer Science in the Netherlands. Features of Python:-  Less line of codes than other languages (fast execution)  Platform independent  Open Source  Object Oriented  It supports functional and structured programming methods  It can be used as a scripting language or can be compiled to byte-code for building large applications  It provides very high-level dynamic data types and supports dynamic type checking  It supports automatic garbage collection  It can be easily integrated with C, C++, COM, ActiveX, CORBA, and Java How to start the Python? First of all install the Python 2.7.12 on your system. After installation it will create a directory in C: drive named Python27. In Python27

Classification of computer based on their cost size and confriguration.

<B><U> TYPES OF COMPUTER</B><U> 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