0% found this document useful (0 votes)
26 views

Lecture18

Uploaded by

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

Lecture18

Uploaded by

astroprogram111
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Lecture # 18

CSE-1010 :Programming I

Transforming Education. Enriching Lives

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 1


What will cover today?
• Introduction to C programming Language

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 2


Use of Computers in Daily life

Fig1. Use of Computers in Daily life

Myanamr Institute of Information Technology, Mandalay,


6/15/2022 3
Myanmar
Most Demand Programming Languages

• According to wiki, there are more than 700 programming languages all over the world.
• Some sources say that more than 9000
• Top 10 programming Language in 2022

1.python
2.java
3.javascript
4.Kotlin
5.R
6.PHP
7.Go
8. C ----------->GitHub, Telegram Messenger, Master Card
9.Swift
10.C#
credit: https://www.geeksforgeeks.org/top-10-programming-languages-to-learn-in-2022/

Myanamr Institute of Information Technology, Mandalay,


6/15/2022 4
Myanmar
Introduction to C Programming
• What is the computer program?
• A computer program is a collection of instructions that performs a specific task when executed by a computer.
• What is the purpose of a computer programming language?
• Languages like English, Chinese, etc. are used to communicate between two humans. In the
same way a programming language is used to communicate between a human and computer.
• Why do we need computer language?
• A programming language that is designed to be easy for a computer to execute; also called ``machine
code'' or ``assembly language.'' machine code: The lowest level language for software which is the
language that is directly executed by the central processing unit (CPU).
•What are the Two types of programming languages:?
• Low-level language (eg: Machine, Assembly)
• High-level language (C, ForTran, Pascal, Python, Flutter,)
The primary difference between low and high-level languages is that any programmer can
understand, compile, and interpret a high-level language feasibly as compared to the
machine(machine-level languages).

Myanamr Institute of Information Technology, Mandalay,


6/15/2022 5
Myanmar
C programming Language
• C Programming Language
• C is one of the most powerful "modern" programming language, in that it allows
direct access to memory and many "low level" computer operations. C source
code is compiled into stand-a-lone executable programs. C is sometimes criticized
because it assumes the "programmer is always right" and allows many
"questionable" programming practices.
• Why we call C?
• Because C comes after B. C programming was Developed by Brian Kernighan and Dennis Ritchie in
1978. Dennis Ritchie (Co-Designer of Unix operating system ) started working on it in 1972 at AT &
T's Bell Laboratories of USA.

Myanamr Institute of Information Technology, Mandalay,


6/15/2022 6
Myanmar
C programming Language
• Why C is important to learn?

• C is the mother of all languages and few reasons to consider learning C is that it makes your
fundamentals very strong.
• C was designed to implement the Unix OS (Which also forms a base for Linux).
• C sits close to the OS which makes it an efficient language because of its efficient system level
resource management.
• C is a very basic language. There are no frills, no GUIs, no Matrix processing abilities, very little
file I/O support, etc.
• C combines portability across various computer architectures as provided by any other high-level
language while retaining most of the control of the hardware as provided by assembly language.

Myanamr Institute of Information Technology, Mandalay,


6/15/2022 7
Myanmar
Reason to learn C
• Major parts of the Windows, Unix and Linux are still written in C. So if you want
program these OS or create your own you need to know C.
• Device drivers of new devices are always written in C.
• The reason is that C provides you access to the basic elements of the computer.
• It gives you direct access to memory of your CPU through pointers.
• It allows you to manipulate and play with bits and bytes.

Myanamr Institute of Information Technology, Mandalay,


6/15/2022 8
Myanmar
Reason to learn C
• Mobiles, Palmtops, PDA's etc are gaining popularity every second.
• Also appliances such as T.V., Refrigerators, and Microwaves etc. are becoming an integral part
of our daily needs.
• You may not know but they have a CPU with them which do need programming and the
software's written for them are known as embedded system programs.
• These programs have to be fast in execution but also have a very little memory.
• No question why C is ideally suited for embedded system programming.
• You must have played games on your PC.
• Even today these astounding 3D games use C as their core. Why?
• The simple reason who will play the game when it takes a lot of time fire a bullet after you have given
command from the console.
• The reply to the command should be damn prompt and fast. Reply in 1 Nano second is an outstanding
game; Reply in 10 Nano seconds is crap.
• Eg: Bauncing ball, Chess, Archery, Fish Movement
• Even today there is no match for C.
• https://www.silvergames.com/en/t/archery
6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 9
Benefits and Weakness
• Benefits of C Programming Language?
• As a middle level language. C combines the features of both high level and low level languages. It
can be used for low-level programming,
• such as scripting for drivers and kernels
• supports functions of high level programming languages, such as scripting for software
applications etc.
• Easy to Learn and Understand, Built in Functions,
•Weakness of C Programming Language?
•C does not have OOPS feature.
•There is no runtime checking in C language.
• There is no strict type checking.
• C doesn't have the concept of namespace
• C's lack of type checking in C can be a powerful advantage to an experienced programmer
but a dangerous disadvantage to a novice.

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 10


Features of C

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 11


Features of C programming Language
• C language has a rich set of features. These include:
• There are a small, fixed number of keywords, including a full set of control
flow primitives. This means there is not much vocabulary to learn.
• C is a powerful, flexible language that provides fast program execution and
imposes few constraints on the programmer.
• It allows low level access to information and commands while still retaining
the portability and syntax of a high level language.
• These qualities make it a useful language for both systems programming
and general purpose programs.
• Another strong point of C is its use of modularity. Sections of code can be
stored in libraries for re-use in future programs.

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 12


Features of C programming Language
• There are a large number of arithmetical, relational, bitwise and
logical operators.
• All data has a type, but implicit conversions can be performed. User-
defined and compound data types are possible.
• Complex functionality such as I/O, string manipulation, and
mathematical functions are consistently delegated to library routines.
• C is a Structured Compiled language widely used in the development
of system software.

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 13


C/C++ IDE & editors for C programming or
C++ programming!
10. C++ Builder
1. Eclipse 11. Turbo C
2. Code:: blocks 12. Notepad ++
3.GNAT programming Studio 13. Atom
4. Visual Studio Code 14. Online C IDE
5. CodeLite https://www.online-cpp.com/online_c_ide
6. NetBeans 8 Credit: https://codecondo.com/top-10-ide-for-
7.QT Creator c-and-cplusplus-for-programmers/
8. Sublime Text
9.Dev C++
Download link for Code::Block
https://sourceforge.net/projects/codeblocks/files/latest/download
Step by step installation for Code::Blocks
https://www.youtube.com/watch?v=mdB16jmaa1I
6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 14
References

Online content
Images and photos from www.google.com
Credit: https://code-blocks.en.softonic.com/download
Credit: Fundamental of computer programming -206 by Er. Indrajeet
Sinha

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 15


Learning to write programs stretches your mind, and helps you think
better, creates a way of thinking about things that I think is helpful in
all domains.”

—Bill Gates, Co-Chairman, Bill & Melinda Gates Foundation, Co-Founder, Microsoft

6/15/2022 MIIT, Mandalay, CSE-1010 Programming I 16

You might also like