0% found this document useful (0 votes)
11 views18 pages

C Programming Language Overview and IDEs

The document provides an overview of C programming, including its history, types of programming languages, and the role of programming in electronics and telecommunications. It discusses Integrated Development Environments (IDEs) for C programming, detailing popular IDEs and their features, as well as the setup requirements for C programming, including text editors and compilers. Additionally, it introduces algorithms and flowcharts as essential tools for programming and problem-solving.

Uploaded by

ltuyisingize58
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)
11 views18 pages

C Programming Language Overview and IDEs

The document provides an overview of C programming, including its history, types of programming languages, and the role of programming in electronics and telecommunications. It discusses Integrated Development Environments (IDEs) for C programming, detailing popular IDEs and their features, as well as the setup requirements for C programming, including text editors and compilers. Additionally, it introduces algorithms and flowcharts as essential tools for programming and problem-solving.

Uploaded by

ltuyisingize58
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

GENCP401: APPLY C PROGRAMMING

Learning outcome 1: Apply Computer programming Languages

I.C 1: Identification of programming Language

History of c programming language

What is a programming language?

A programming language is a set of grammatical rules (both syntactic and


semantic) that instruct a computer or a device to behave in a certain way.
Each programming language has a vocabulary—a unique set of keywords
that follows a special syntax to form and organise computer instructions.

A programming language is a formalized set of instructions that a computer


can understand and execute. It serves as a bridge between human
programmers and computer hardware, allowing programmers to write and
communicate complex algorithms and logic in a way that a computer can
process and follow.

Programming languages are used to create software applications, scripts,


and programs that can perform various tasks and solve specific problems

 Types of programming languages

Programming languages can mainly be classified as low-level and high-level


programming languages. Although simple compared to human languages,
high-level languages are more complex than low-level languages. At the
same time, a high-level language affords more readability in comparison to
its low-level counterpart, which needs specialist knowledge in computer
architecture to interpret.

 Low-level languages include assembly and machine languages.


 An assembly language contains a list of basic instructions and is
much harder to read than a high-level language. It is just one level
above machine code in terms of abstraction, using simple codes that
are easily converted to strings of 1s and 0s (binary representation). It
cannot be used to structure and manipulate complex information.

Definition: Assembly language is a low-level programming


language that serves as a human-readable representation of machine
code instructions for a specific computer architecture or processor. It
provides a more human-friendly way to interact with and program a
computer's central processing unit (CPU) than writing raw machine
code directly.

Mnemonics: Assembly language uses mnemonic codes, known as


opcodes, to represent individual machine instructions. These
mnemonics are easier for humans to understand than the binary
machine code instructions used by the CPU. For example, "MOV" might
be used as a mnemonic for "move" instructions.

e.g:

 Machine language is directly understood by the computer’s


processing unit. A programmer will first write his code in a high-level
language, then compile it into a machine-readable format where
instructions are represented in binary.
 High-level languages, on the other hand, are designed to be easy to
read and understood, allowing programmers to write source code using
logical, meaningful words and symbols. They encapsulate everything
from early algorithmic languages such as FORTRAN to more
widespread, object-oriented languages like C++, C#, and Java.
 Role of programming languages in electronics and
telecommunication
 Embedded systems Development:: Embedded systems are
referred to as small computer (or computing device other than the
normal computers you know of) that is designed to perform a specific
task. e.g. a calculator.
 Software design: Many software’s are needed to control devices or
to make simulations of real-world problems. For example, a software
like Everycircuit or Multisim that allows you to prototype circuits and
know the value of voltages across and currents through each
component in the circuit even before designing the circuit which is a
way to making predictions. Hence making things much faster, better,
and quite efficient.
 IoT or the internet of things: This is a trending technology and it is
growing rapidly because it utilizes microcontrollers to make smart
devices or systems.
 Control Systems: Languages like MATLAB, Python (with libraries like
control systems toolbox), and C/C++ are used for designing control
systems in telecommunications, such as feedback controllers for
satellite dish positioning or antenna alignment.
 Telecommunication Protocols and Networking: Programming
languages like C and C++ are used for implementing network
protocols and socket programming, which are essential for building
communication systems and networking devices.
 Graphical User Interface (GUI) Development: Languages like
Python (with libraries like Tkinter or PyQt) and Java are used to create
user-friendly interfaces for configuring and monitoring
telecommunications equipment.
 Security and Cryptography: Programming languages like C and
Python are used to implement cryptographic algorithms and security
protocols, which are critical in ensuring the confidentiality and integrity
of data in telecommunications.
 Real-time Systems: Real-time programming languages like Ada and
C/C++ are used for building real-time systems in telecommunications,
where strict timing constraints must be met.

A real-time system is a type of computer system or software application


that is designed to respond to events or input within a specific time frame,
often referred to as a "real-time constraint." In real-time systems, the
correctness and timeliness of the system's response are critical. These
systems are used in various domains where timely and predictable
responses are essential, such as industrial control, robotics, aerospace,
telecommunications, medical devices, and automotive systems.

 Types of C programming IDE


A programming Integrated Development Environment (IDE) is a
software application that provides a comprehensive set of tools and
features to facilitate software development. It is a unified environment
where programmers can write, edit, test, and debug code efficiently.
IDEs are designed to streamline the software development process by
offering a range of integrated tools and capabilities.
Here are some key components and features commonly found in
programming IDEs:
1. Code Editor: IDEs typically include a code editor with features like
syntax highlighting, code completion, and code formatting. These
features help developers write clean and error-free code.
2. Compiler/Interpreter: Many IDEs come with built-in compilers or
interpreters for programming languages, allowing developers to check
their code for errors and run it within the IDE.
3. Debugger: IDEs include debugging tools that enable developers to set
breakpoints, inspect variables, step through code, and identify and fix
errors in their programs.
4. Build and Compilation Tools: IDEs often integrate build and
compilation tools to help developers create executable files or
packages from their source code.
5. Version Control Integration: Many modern IDEs integrate with
version control systems (e.g., Git, SVN) to enable code collaboration,
version tracking, and repository management directly within the IDE.

Popular programming IDEs include:

Visual Studio (Visual Studio IDE): Developed by Microsoft, it supports


various programming languages, including C#, C++, and Python.

Eclipse: An open-source IDE that is highly extensible and used for a wide
range of programming languages.

IntelliJ IDEA: Known for its support of Java development, it also provides
IDEs for Kotlin and other languages.

PyCharm: A popular IDE for Python development.

Xcode: Developed by Apple, it is used for iOS and macOS app development.

Android Studio: An IDE specifically designed for Android app development.

NetBeans: An open-source IDE supporting multiple languages, including


Java, PHP, and HTML5.

Programming IDEs are valuable tools for developers as they enhance


productivity, reduce errors, and provide a seamless environment for software
development from writing code to testing and deployment. The choice of IDE
often depends on the programming language and the specific requirements
of a project.

Types of C programming IDE

There are several Integrated Development Environments (IDEs) available for


C programming, each with its own set of features and capabilities. Here are
some popular types of C programming IDEs:

General-Purpose IDEs:

These IDEs support multiple programming languages, including C. They


provide a wide range of features for code editing, debugging, and project
management.

Visual Studio: Microsoft's Visual Studio is a powerful IDE that supports C


and C++ development. It offers a rich set of features, including an integrated
debugger, code analysis, and collaboration tools. Visual Studio is available in
multiple editions, including Visual Studio Community (free) and Visual Studio
Professional/Enterprise (commercial).

Eclipse: Eclipse is an open-source IDE that supports various programming


languages through plugins, including C and C++. It is highly extensible and
customizable, making it suitable for a wide range of development tasks.

NetBeans: NetBeans is another open-source IDE that supports C and C++


development. It offers features like code templates, project management,
and integration with version control systems.

C-Specific IDEs:
These IDEs are specifically designed for C development and often provide
features tailored to C programmers.

Code:: Blocks: Code::Blocks is an open-source IDE designed for C, C++, and


Fortran development. It is lightweight and offers a simple, user-friendly
interface. It supports multiple compilers.

Dev-C++: Dev-C++ is a free and open-source IDE for C and C++


development on Windows. It comes with a built-in compiler (MinGW) and a
resource editor.

CLion: CLion is a commercial IDE developed by JetBrains that specializes in


C and C++ development. It offers advanced code analysis and navigation
features.

Cross-Platform IDEs:

These IDEs are designed to work on multiple operating systems, making


them suitable for cross-platform C development.

Qt Creator: Qt Creator is an open-source IDE designed for Qt application


development but is also used for general C and C++ development. It is
cross-platform and provides features for GUI development.

Embedded and IoT IDEs:

These IDEs are tailored for embedded systems and Internet of Things (IoT)
development, which often involves programming in C and C++.

PlatformIO: PlatformIO is an open-source ecosystem for embedded


development. It provides an IDE extension for popular code editors like
Visual Studio Code and Atom. It supports various development boards and
platforms.
Keil MDK: Keil MDK (Microcontroller Development Kit) is a commercial IDE
for embedded systems development, particularly for ARM-based
microcontrollers.

These are some of the types of C programming IDEs available. The choice of
IDE depends on factors like the specific C programming tasks, the platform
or operating system you are working on, and personal preferences for
features and ease of use. Many IDEs offer free or open-source versions,
making them accessible to a wide range of developers.

……………………………………………………………………………………………………..

 C - Environment Setup

If you want to set up your environment for C programming language, you


need the following two software tools available on your computer,

(a) Text Editor and (b) The C Compiler.

Text Editor

This will be used to type your program. Examples of few a editors include
Windows Notepad, Notepad++,sublime, Brief, Epsilon, EMACS, and vim or vi.

The name and version of text editors can vary on different operating
systems. For example, Notepad will be used on Windows, and vim or vi can
be used on windows as well as on Linux or UNIX.

The files you create with your editor are called the source files and they
contain the program source codes. The source files for C programs are
typically named with the extension ".c".

Before starting your programming, make sure you have one text editor in
place and you have enough experience to write a computer program, save it
in a file, compile it and finally execute it.

The C Compiler
the term "compile" refers to the process of translating human-readable source code written in the C
programming language into machine-readable code, often in the form of binary files or object files
The source code written in source file is the human readable source for your
program. It needs to be "compiled", into machine language so that your CPU
can actually execute the program as per the instructions given.

The compiler compiles the source codes into final executable programs. The
most frequently used and free available compiler is the GNU C/C++
compiler, otherwise you can have compilers either from HP or Solaris if you
have the respective operating systems.

………………………………………………………………………………………………………

For writing and execute C program we require two things, these are editor
and compiler. The text editor is where you write your programs and compiler
translate your text code into a binary stream( 1s and 0s) which computer
understands.

There are four steps attached with C program these are coding, compiling,
running and debugging (It require when bugs occur). There are many IDE
(Integrated Development Environment ) available but here I will describe the
Dev-C++ because personally, I feel that Dev-C++ is very userfriendly and
anybody can install and use it.

Steps to installing Dev-C++ in Windows:

Download the setup:

If you don’t have the setup of Dev-C++, then before installing it, you should
download the setup of Dev-C++. The good thing is that it is totally free and
you don’t need to pay anything (Dev-C++ is Free Software distributed under
the GNU General Public License). You can download it from below given link.

Click to Download

Install the setup:


After downloading the setup double click on it, it extracts the package from
the setup and asks to select the language. So select the language as per
your choice and press the ok button.

Accept the license agreement.


In the next prompt window, it will ask you to select the package you want to
install. Here you don’t need to anything just press the Next button.
Select the destination folder (keep it to default) and press the install button.
It will take a few minutes.
After completing the installation, Dev-C++ will prompt a window with a finish
button. Just press the finish button.
After pressing the finish button it asks for language and fonts. If you want to
change the language and fonts, then you can change.
I.C 2: Development of an algorithm

 Algorithm - An algorithm is a step-by-step series of instructions to perform a


certain task or specified actions.
 Flowchart - Flowchart as the name suggests is the logical representation that
describes a process or workflow.

An algorithm is a step-by-step procedure or set of rules designed to solve a


specific problem or perform a particular task.

You might also like