0% found this document useful (0 votes)
29 views6 pages

Overview of C Programming Language

This document provides an overview of the C programming language. It discusses that C is a general-purpose, mid-level programming language that combines efficiency and readability. C was developed in the 1970s and is widely used for operating systems, databases, and embedded systems. The document then describes the history and applications of C, why it is important to learn C, and introduces the Turbo C integrated development environment for writing and running C programs.

Uploaded by

Kaizuke Yo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views6 pages

Overview of C Programming Language

This document provides an overview of the C programming language. It discusses that C is a general-purpose, mid-level programming language that combines efficiency and readability. C was developed in the 1970s and is widely used for operating systems, databases, and embedded systems. The document then describes the history and applications of C, why it is important to learn C, and introduces the Turbo C integrated development environment for writing and running C programs.

Uploaded by

Kaizuke Yo
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Chapter 4.

The C programming language


Objectives:
At the end of the lesson, the student will be able to:

 Know what C programming language.


 Learn the importance of C programming language.
 Identify the different applications of C programming language.
4.1 What is C Programming?
C is categorized as a general-purpose programming language. It is a mid-level
programming language that combines the efficiency of a low level programming language and
the readability of a high level programming language. It is very popular, simple, and portable.
This type of programming language is machine dependent and extensively used in different
applications. These applications can range from embedded systems to development of complex
system such as an Operating System.
There is a presumption that by learning and mastering C, it is easy to migrate to a
different programming language. Probably, the reason for this, is that most modern
programming languages have its roots from C.
4.2 History of C Programming Language
C was developed by Dennis Ritchie at Bell Laboratories. It was created coming from the
concepts of ALGOL, BCPL and B programming languages and share the same features of these
programming languages.
C is a very powerful programming language and was first strongly associated with the
UNIX operating system. As it became popular and started spreading around the world, many
compilers were developed to allow cross platform systems.
Today, C runs on almost any type of operating systems and hardware platforms. A new
problem arise because of the fast pace development of the hardware and software. Developers
were having a problem with older versions of C language running in new platforms. To mitigate
such problem, the American National Standard Institute (ANSI) defined a new standard for C
programming language in 1989 and was approved by the International Standards Organization
(ISO) in 1990. C programming language was renamed ANSI C and is being used henceforth.
Figure 1 below shows the popularity of C programming language in terms of mobile,
embedded and systems development base from the survey of the Institute of Electrical and
Electronics Engineering (IEEE).
Fig. 1 IEEE – the best 10 top programming language in 2018

4.3 Applications of C

If C is such a strong and popular programming language, then you might be wondering
where C is applied. Below is one of the many list of the flexibility of C when it comes to its
application.

1. Embedded systems development particularly in automotive control systems.


2. Desktop applications.
3. Applications by Adobe were developed using C.
4. Google Chromium and its extensions were developed using with C.
5. MYSQL, a popular database software was developed using C.
6. Operating systems like Microsoft Windows, Apple’s OS X and Symbian for
Apple’s mobile operating system were developed using C.
7. Widely used for Internet of Things (IoT) applications.

4.4 Why learn C?

There is a need to learn C programming language because of our profession as a


Computer Engineer. A Computer Engineer delves on both hardware and software development.
Most of the tools and software were written or developed in C. There are quite a lot of
industries that are using C in the development of their products. It is advantageous if we learn
how to program using C programming language.

Some of the reasons on why we need to learn C programming are the following:

1. C is a structured programming language divided into modules. Each of these


modules can be separately written making it for easy testing, debugging and
maintaining the program.
2. C contains different data types and powerful built in functions that helps
programming efficient.
3. C can extend itself through the development of libraries. We can add user
defined functions through the libraries and access it. This feature makes C
programming simple.
4. C is portable. It runs on almost any type of Operating System and computer
architecture.

4.5 C programming language

C is a free software. You can search the internet and download a copy of a C
programming language Integrated Development Environment (IDE). In this subject, the author
is using turbo C++ 3.2 IDE because of its simplicity in writing and running the program. The
compiler is also compatible with windows 10 and supports full screen mode. To get a copy of
this compiler, you can email me at [Link]@[Link] or type [Link] on your
search engine, follow the instructions and download a copy of it.

After installing and running the application, you will be diverted to the Turbo C IDE.
Compare your screen with the figure below. If your screen is the same as the figure displayed
below, then congratulations you have successfully installed a running Turbo C Compiler.

Figure 2. The Turbo C Compiler


4.6 The Turbo C Compiler

Before we start writing programs, it is very important that we know how to use our
compiler and navigate its environment. In this section we are going to learn the different menu
options with its corresponding function. The author will only give emphasis on the basic menu
options. As for the other menu options, it is your duty and obligation to read, understand,
explore and experiment.

4.6.1 The Main menu option

On top of the turbo C IDE is the Main menu option. There are ten different
options.

File The File menu option handles the different file operations, manipulates
the directories, quit option and switch to DOS Shell.
Edit An option to create and edit a source file.
Search Search a specific file.
Run An option that runs your executable file.
Compile Converts the source file into and object and executable file.
Debug Track and manages errors
Project Specify what files are in the program and manages the project
Options An option that allows you to select compiler options, link, diagnostics
and define macros. This also records the Include output, library file
directories and load options from the configuration file.
Window Manipulates the window of the IDE.
Help Invokes the help option of the TC IDE.

4.6.2 The File menu option

To activate the file menu option, click on the F or press ALT + F. Once the
menu option is activated, a pop menu option will appear. To navigate the pop up
menu option, use the up or down arrow.

New Create new source file


Open Open existing source file
Save Save options for saving a source file
4.6.3 Edit menu option

The edit menu option allows you to access the


different edit options when you are typing your
program.

4.6.4 Run menu option

The run menu option allows you run your executable


source file.

4.6.5 Compile menu option

The compile menu option coverts your source file into


an executable file. The general rule is, compile first
before running your program. Compiling does not only
converts your source file but informs you if there are
errors in your source file.

Now that we have learned the basic menu options required in writing and
running a program, we can now start to create, write and run a program in the TC
IDE.
References:

1. Turbo C users Guide


IBM Version
Retrieved from: [Link]
Date of retrieval: September 8, 2020.
2. [Link]
3. C Language Tutorial
Retrieved from: [Link].
Date of retrieval: September 7, 2020.
4. Learn C and C++ Programming language
[Link]
5. The C Programming Language, 2nd Edition
Kernighan B.
Ritchie D.

Common questions

Powered by AI

C's adaptability stems from its portability and efficiency, allowing it to be used across various hardware architectures and operating systems. This adaptability supports its use in diverse applications, from embedded systems to desktop applications and large-scale systems like operating systems. Its capability to extend through libraries and user-defined functions further enhances its flexibility, making it a practical choice for industries that require robust and efficient software solutions .

C remains relevant due to its foundational role in the development of many modern languages and its widespread use in critical areas such as operating systems, embedded systems, and IoT applications. Its efficiency, portability across different operating systems, and strong performance make it a go-to choice for system-level programming and applications that require direct hardware interaction . The structured and modular nature of C also allows efficient and effective code management, making it valuable even in complex software development .

C has maintained its influence due to its role as a foundational language from which many other modern programming languages have derived. Its efficiency, simplicity, and ability to manipulate memory directly make it indispensable in system-level programming. Moreover, the adaptability and portability of C allow it to remain relevant in the development of operating systems, embedded systems, and applications that demand high performance. Its ongoing community support and evolution through standards like ANSI/ISO ensure that it continues to fit into modern software development needs .

C is particularly suited for embedded systems due to its efficiency in hardware manipulation and performance at a level that is close to assembly language, yet with greater readability and structure. Its portability allows it to run across different systems, which is critical for embedded applications that may need to operate on various hardware platforms. Additionally, its ability to interact directly with memory and perform low-level operations makes it ideal for real-time and resource-constrained environments typically seen in embedded systems .

C is unique because it is a mid-level programming language that combines the efficiency typical of low-level programming languages with the readability of high-level languages. It is machine-dependent, which allows efficient hardware manipulation, making it ideal for system-level programming such as operating systems. Additionally, C’s structured programming paradigm is modular, which facilitates easier testing, debugging, and maintenance of code .

Learning C is advantageous for computer engineers as it bridges the gap between software and hardware, allowing them to understand low-level operations and efficient coding practices. C provides the tools to directly manipulate hardware through low-level operations while maintaining a modular structure. Such knowledge is critical for developing systems-level applications, embedded systems, and drivers. Furthermore, C’s influence on modern programming languages means that learning it can simplify the transition to other languages due to shared foundational concepts .

The standardization of C programming, through the ANSI in 1989 and later by ISO in 1990, was aimed at addressing compatibility issues that arose from the fast-paced evolution of hardware and software. By having a standardized version, namely ANSI C, developers could ensure that code written in C would behave consistently across various platforms and compilers, reducing issues related to code portability and legacy system support .

The modular structure of C allows the program to be divided into separate parts, or modules, which can be developed independently. This modularity aids in the testing, debugging, and maintenance of the code since individual modules can be tested separately for errors. It also enhances code reusability and organization, facilitating collaborative development efforts and simplifying the integration of complex features .

The history and evolution of C, being rooted in system programming and its pivotal role in developing the UNIX operating system, make it an essential part of computer engineering curriculums. Its foundational influence on many modern languages and its utility in both hardware and software development underscore its educational importance. Understanding C helps students grasp fundamental programming concepts and prepare for working with a broad spectrum of modern languages and technologies .

Turbo C Compiler is suitable for beginners due to its simplicity and user-friendly interface, which make it easier to write and execute programs. It provides basic menu options for file management, editing, compiling, and debugging, allowing users to focus on learning to program without being overwhelmed by more complex features. Additionally, its compatibility with environments like Windows 10 and support for full-screen mode make it accessible and practical for learners .

You might also like