History of C language or C Fundamentals
C Fundamentals
History of C Language
- C is a programming language developed by AT also T’s Bell Laboratories from the USA in 1972. That was designed and written by a man named Dennis Ritchie.
- Through the late seventies, C began to replace any further familiar languages from that time similar to PL/I, ALGOL, etc. NO one pushed C. That happened and made the official Bell Labe language. Therefore, externally either advertisement, C’s reputation spread including its pool of users grew. Ritchie seems to possess been rather surprised that then many programmers preferred C to older languages like FORTRAN or PL/I, either this newer one like Pascal also APL. But, that’s what happened. Ritchie had taken inspiration to form a language known as B, which was developed by Ken Thompson.
Image Source ~ Crafted With ©Ishwaranand – 2020 ~ Image by ©Ishwaranand |
Features Characteristics C Language
- C is a general-purpose structured programming language.
- C is a middle-level language.
- C is a portable language.
- C has compiled language.
- C is simple to learn and implement.
- C provides low-level support.
- C provides several built-in functions.
- Support for pointers, arrays, structures, functions etc.
- Support for dynamic memory allocation.
Application of C Language
Embedded Systems | Device drivers. |
Editors | System software. |
Antivirus | Network protocols |
Database software (DBMS) | Operating System |
Computer Games | Consumer Electronics Devices |
Robotics |
The C Character Set C language
Q) Explain the Character set of C language.
- C uses the ASCII character set. It Supports 256 characters. Each character in C occupies 1 (one) byte of memory.
- Each character denotes either alphabet, digit or special symbol applied to represent information.
Following obtaining some valid alphabets, numbers also special symbols allowed into C.
Alphabets:Â Â A,B,C,……,Y,Z.
           a,b,c,……,y,z.
Digits:Â Â Â Â Â 0,1,2,3,4,5,6,7,8,9.
Special symbols:Â Â Â Â Â ~ ” ! @ # $ % ^ & * ( ) _ – + = | { } [ ] : ; ” ‘ < > , . ? /
Keywords in C language
Q) What is a keyword? List a few of the C languages.
- Keywords remain these reserved words whose meaning must already be explained to each c compile:
- Some keywords are also called Reserved words’
- C supports 32 keywords. These are:
auto | double | int | struct |
---|---|---|---|
break | else | long | switch |
case | enum | register | typedef |
char | extern | return | union |
const | float | short | unsigned |
continue | for | signed | void |
default | goto | sizeof | volatile |
do | if | static | while |
Rules for using keywords C language:
- Some keywords cannot be utilised as variable names.
- The necessity of Every keyword is written in lowercase.
- Every keyword has a fixed meaning and it cannot be changed.
- There are only 32 keywords; we cannot add our new keyword.
Identifiers C language
- Identifiers are defined as user-defined entities. identifier refers to the variable names and function names created by the programmer.
- For e.g. int k, area;
- Here variable k& area is known as identifiers.
- The function names like main() getch(), print(), and scant() are the identifiers.
Data types C language
Image Source ~ Crafted With ©Ishwaranand – 2020 ~ Image by ©Ishwaranand |
Q) Explain different data types in C language.
- Data types define rage of allowed values and set of all possible operations on those values. Data types in C++ seat be classified supporting various categories as shown in fig.
Size and range of C language basic data types:
Q) write the size also a range from data types in C language.
Â
Data Type | Range | Size (Bytes) |
Format Specifiers |
---|---|---|---|
Char or singed Char | -128 to +127 | 1 | %c |
 unsigned char | 0 to 255 |
1 | %c |
int or signed int | -32768 to +32767 | 2 | %d |
unsigned int | 0 to 65535 | 2 | %u |
long int or signed long int | -2147483648 to +2147483647 | 4 | %Id |
unsigned long int | 0 to 4294967295 | 4 | %Iu |
float | 3.4E-38 TO 3.4E+38 | 4 | %f |
double | 1.7E-308 to 1.7e+308 | 8 | %If |
long double | 3.4E-4932 to 3.4E+4932 | 10 | %Lf |
Last updated on Sunday - May 21st, 2023