c-lecture1
c-lecture1
Email
[email protected]
vCourse Hours
vMaterials and Resources
vDistribution of Grade
Elements
vSyllabus
vThe Method of Course
Course Code / Name:
Course Schedule :
Wednesday - LAB1
Face-to-face Lesson :
Section1 à 09:00 – 12:50
Section2 à13:00 – 16:50
Supplementary Materials:
Low Level Language: The term low level highlights the fact that it is
closer to a language which the machine understands.
• To overcome this limitation, high level language has been evolved which uses
normal English, which is easy to understand to solve any problem. High level
languages are computer independent and programming becomes quite easy
and simple.
o BASIC
o COBOL
o FORTRAN
o C
o C++
INTRODUCTION TO “C”
Brief History of C
² The C programming language is a structure oriented programming language,
developed at Bell Laboratories in 1972 by Dennis Ritchie.
² In 1978, Dennis Ritchie and Brian Kernighan published the first edition “The C
Programming Language” and is commonly known as K&R C.
² Many of C’s ideas & principles were derived from the earlier language B,
thereby naming this new language “C”.
WHY IS C POPULAR ?
² It is reliable, simple and easy to use.
² C is a small, block-structured programming language.
² C is a portable language, which means that C programs
written on one system can be run on other systems with little
or no modification.
² C has one of the largest assortments of operators, such as
those used for calculations and data comparisons.
² Although the programmer has more freedom with data
storage, the languages do not check data type accuracy for
the programmer.
vC is a powerful general-purpose
programming language. It is fast, portable
and available in all platforms.
v If you are new to programming, C is a
good choice to start your programming
journey.
You can install on your personal computer one of
the programs listed below:
Ø Dev C++ (on windows platform)
Ø C Online Compiler (with browser)
Ø Xcode (on Macbook)
Ø Visual Studio
Ø Eclipse
Ø Visual Studio C++ Express Edition
Ø Netbeans
Ø Code Blocks
COMPILE AND RUN C PROGRAMMING ON YOUR COMPUTER
Process Priority
Operations
1 Parentheses (…)
2 Functions cos, sin, ln, log
3 Multiplication and Division a*b and a/b
4 Addition and Subtraction a+b and a-b
vC sqrt()
The sqrt() function computes the square root of a
number.
b.) 𝑎 + 𝑏 ! − 𝑐 "
!#$
c.) 𝑎 + 𝑏 −
$! %&#'
#! ($!
d.) !#$
$(' !
e.) 𝑎 + "#$
)( %&