C Language: Basics & Fundamentals
SERIES OF ARTICLES ON C LANGUAGE BASICS

C Language: Basics & Fundamentals

Through this series of articles, I hope to provide helpful information about the fundamentals of the C programming language. I initially collected this information from various blogs, documents, resources, and videos available on the internet for understanding the basics of C language. But now, I'm sharing this information to help others save time learning the basics and fundamentals of C language.

List of articles from the series:

  • Introduction to C language

CH 1) Programming environment

CH 2) Syntax and Semantics

CH 3) Libraries & Header files

CH 4) Preprocessor & Object

CH 5) Commands & Tokens

CH 6) Declaration & Statements

CH 7) Flow control & Functions

CH 8) Errors & Habits


What is C Language?


  • C is a general-purpose and procedural programming language that is extremely popular, simple, and flexible to use.
  • It is a structured programming language in which program is divided into various modules. Each module can be written separately and together it forms a single ‘C’ program. This structure makes it easy for testing, maintaining and debugging processes.
  • C is the combination of both low-level and high-level programming languages; Using C language we can do system programming (for writing O.S.) as well as we can use it for application programming. Thus, C language can fill the gap between high level and low level programming languages so we can call it a Middle-level language.
  • C is what is also called a compiled language. Because once you write your C program, you must run it through a C compiler to turn your program into an executable file which the computer can run (execute). The C program is in the human-readable form, while the executable that comes out of the compiler is in the machine-readable and executable form.

Features of C language:

  • It is a robust language.
  • It is a middle level programming language close to machine language.
  • It is widely used in the software development field.
  • It is a procedure and structure oriented language.
  • It has the full support of various operating systems and hardware platforms.
  • It is highly portable.
  • Many compilers are available for executing programs written in ‘C’. A compiler compiles the source file and generates an object file. A linker links all the object files together and creates one executable file.


Who and why created C Language?


Dennis Ritchie invented C language between 1972 and 1973 at AT&T (then called Bell Laboratory).

C Language was implemented in the UNIX system on DEC PDP 11 (Digital Equipment Corporation Programmed Data Processor).

C was designed as a minimalist language to be used in writing operating systems for minicomputers, such as the DEC PDP 7, which had very limited memories compared with the mainframe computers of the period. The language was devised during 1969–73, alongside the early development of the UNIX operating system.

It was also the successor of the B programming language invented by Ken Thompson.

C was designed to overcome the problems encountered by BASIC, B, and BPCL programming languages. By 1980, C became the most popular language for mainframes, microcomputers, and minicomputers.


What are versions and decendants of C Language?


Many other languages have borrowed syntax/features directly or indirectly from the C language. Like syntax of Java, PHP, JavaScript, and many other languages are mainly based on the C language. C++ is nearly a superset of C language (Few programs may compile in C, but not in C++).

Versions (or Standards) of C Language:

1) Traditional C (1972)

2) K&R C / C78 (1978)

3) ANCI C / Standard C / C89 (1989)

4) ANCI or ISO C / C90 ~ C89 (1990)

5) C99 (1999)

6) C11 (2011)

7) C17 / C18 (2018)

8) C2X (202X)

Decendants (Family members) of C Language:

1) BCPL (1966)

2) B (1969)

3) C (1969 - 73) (Bell Labs)

4) Ratfor (1974) (Bell Labs)

5) C++ (1979) (Bell Labs)

6) Objective C (1986) (NeXT)

7) Alef, Limbo (1995) (Bell Labs)

8) C-- (1997)

9) C# (1999) (Microsoft)

10) D (2001) (Digital Mars)

11) Go (2007) (Google)

12) OpenCL C (2009) (Apple)

13) TypeScript (2012) (Microsoft)

14) Dart (2013) (Google)

15) Swift (2014) (Apple)

and many other languages…..


Where we can implement C Language?


  • It is used in developing operating systems.
  • ‘C’ language is widely used in embedded systems.
  • It is used for compiler production.
  • It is used for developing system applications.
  • It is widely used for developing desktop applications.
  • It is used for developing browsers and their extensions.
  • It is used for developing mobile phone’s operating systems.
  • It is widely used in IOT applications.
  • It is used to develop databases.

Popular Projects that uses C Language:

  • Most of the applications by Adobe are developed using ‘C’ programming language.
  • Google’s Chromium is built using ‘C’ programming language.
  • The world's most popular databases, including Oracle, MySQL, PostgreSQL, SQL Server are coded in C and C++.
  • Operating systems such as Apple’s OS X, Microsoft’s Windows OS, Linux OS and Symbian OS are developed using ‘C’ language.
  • PUBG game is developed using special game engine platform known as Unreal Engine 4 by Epic Games. The specialty of this platform is that it is coded in C++ and uses huge portability and tools to offer realistic graphics to the audience.
  • C++ is the main development language used by many of Google's open-source projects.

Facts Related to C Language:

  1. Why it is named as C? It was developed to cover all the inabilities of B language (simplified version of BCPL). So, it was just named C as it is next to B in the English alphabets.
  2. C is the only programming language that exists for such a long period and still it is widely used.
  3. C is the basis of many other programming languages like C++, Java, JavaScript, Go, C#, PHP, Python, Perl, C-shell and many more.
  4. Previously, C was considered as the high level language but today many programmers consider it as a low level language as it supports only scalar operations.
  5. C23 is the latest version of C programming Language published in April 2023.

Programming Facts related to C Language:

  1. “? : ” is the only ternary operator in C language.
  2. “sizeof” is the only operator which is also a keyword.
  3. In printf() and scanf(), f stands for formatted not function.
  4. Compiler doesn’t know header file, preprocessor processes these and expands source code.
  5. Header file name can be included in 2 ways, (a) Using angular brackets (b) Using double inverted comma.
  6. Compiler generates assembly code not machine code and then assembler generates the machine code.
  7. sizeof operator cannot tell us the size of functions because this operator works on compile time and functions loads in memory at run time.

Useful IDEs for C language:

  • Turbo C (Borland)
  • Code::Blocks (Code::Blocks Team)
  • Dev C++ (Bloodshed Software)
  • Visual Studio Code (Microsoft)
  • NetBeans (Oracle corp.)
  • Eclipse (IBM)
  • KDevelop (KDE Umbrella)
  • CodeLite (Eran Ifrah)

Useful Links for C Language Material and resources:

C Language Online Compilers: Programiz , OnlineGDB , Rextester , ideone .

Online Course, Quiz & Tests : StudySection Test , Coursera Course , LearnVern Course

Download Free E-Books for C : FreeBookCentre , Bbooks.info , Edu informer , PDF Drive


References: Wikipedia, CMan(Bell Labs), GeeksforGeeks, guru99 and various other blogs, videos and sites on available internet.

If you find any errors or disinformation in this article, then please inform me.

Darin Hecht

Sr. IT Consultant at Arc Technologies Group

7 个月

Thank you for taking the time to provide such a concise collection of articles on this programming language. I look forward to referencing them.

要查看或添加评论,请登录

社区洞察

其他会员也浏览了