The best revenge is massive SUCCESS
--Your friends at LectureNotes

Note for C Language - C By Vandana Verma

  • C Language - C
  • Note
  • Master of Computer Applications
  • 4 Topics
  • 181 Offline Downloads
  • Uploaded 1 year ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-2

This language was introduced in market on the name of a great mathematician named Blaise Pascal by Nicolus Wirth in 1971, At Fadral institute of technology in Zuric, Switzerland. ALGOL: ALGOL was another language which was designed for scientific purpose by a team of mathematician 1958 named ALGOL-58 and in 1960 it was again implemented as ALGOL-60. This period was introduced as a golden period for the development of C. In this queue some different language was also introduced by different programmers. They are: CPL (Combined/common programming language): It was introduced by Thomas Kurtz in 1966. The main purpose for the development of CPL was its need in general purpose concept, but the key concept of this language was very high, which make it complex and clumsy and not handled by end users. BCPL: To overcome the problem of CPL a language was introduced by Martin Richards in 1979 named BCPL. But the main purpose was not achieved by BCPL also. B (Beginners): On the concept of BCPL a language was developed by Ken Thompson in 1970. This language was developed with the enhance feature of BCPL. We can say B was the successor of BCPL and CPL both. C: This era of development was continued with the development of C language which developed by Dennis Ritchie in 1972 at AT &T Bell Laboratory. It worked as a complete general purpose language successfully used in commercial and scientific both fields. The invention of C was followed by an alphabetical sequence where next language was developed after ‘B’, so it introduced as C to continue the sequence of this order. K&R C: We can say C was introduced with enhancing feature of ALGOL, BCPL and B. And in 1978 it was extended by Dennis Ritchie and Brian Kernighan and introduced as K&R C. ANSI C: It was again implemented by ANSI in 1983 where some different keywords such as- volatile console were added into it and launched as ANSI-C which again modified with some extra features. C90/C99/C11: In 1990 ISO (International standard organization) also updated the features of C and launched it in 1990 as c-90. In 1999 ISO again updated it as C-99 and in 2011 it defined as C-11.

Text from page-3

Name of language Year Name of developers ALGOL 1960 ISO BCPL 1963 Martin Richard B 1970 Ken Thompson C 1972 Dennis Ritchie ANSI-C 1989 ANSI C-90 1990 ISO C-99 1999 C-11 2011 ISO John Kamny DATA TYPE: It is a way/mechanism to define the category of data. Data type precedes a variable or identifier and instructs the compiler with 2 things, they are: a) Size of memory allocated in the term of bytes through an identifier. b) Type of data or information, i.e valid for that particular variable or memory locations. Note :We all know that compiler behave like a programmer, which has a list of information that determine how many bytes of memory, it will allocate for which data type. In C language different data types are precede with compiler, which worked as a fundamental data type. It means these data type having a fixed length of size. But according to behavior, data type of C language described in 3 categories, including fundamental data type. They are:a) Primary/primitive/fundamental b) Derived/Secondary c) User define data type

Text from page-4

Data Type Primary Data Type Secondary Data Type User Define enum pointer typedef Array Integer struct union Real Character void Short (%sh) Int(%d) Long(%ld) float(%f) Double (%lf) Char(%c) char (%s)

Text from page-5

Primitive data type:Primitive data type Size in byte 1 Capecity(Ranged lowed) Min -128 to 0 to 255 int 2 -32768 long 4 -2147483648 to +2147483647 0 to 42949672 Signed integer value unsigned integer value float 4 -3.4E-38 to allowed in fractional double 8 -1.7E-308 to 1.7E308 char 1 0 to 255 Short to 0 to 65535 3.4E38 Allowed value max +127 +32767 Signed integer value unsigned integer value Signed integer value unsigned integer value allowed in fractional Unsigned character value Integer data type: Short: It consists 1 byte of space which has 0 to 255 capacity and indicate the value in following manner. -128:128 64 32 16 8 4 2 1 0 1 0 0 0 0 0 0 0 0 +127:128 64 32 16 8 4 2 1 0 0 1 1 1 1 1 1 1 1 int: It consists 2 byte of space which has 0 to 65535 capacity and indicate the value in following manner. -32768:32768 16384 8192 4096 2048 1024 512 128 64 32 16 8 4 2 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +32767:32768 16384 8192 4096 2048 1024 512 128 64 32 16 8 4 2 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 long: It consists 4 byte of space which has 0 to 65535 capacity and indicate the value in following manner.

Lecture Notes