Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 29

C PROGRAMMING

DAY-1
WHAT IS COMPUTER
PROGRAMMING

• Computer programming is the process of designing and


building an executable computer program to accomplish
a specific computing result or to perform a specific task.
OPERATING SYSTEM

• An operating system (or OS) is a group of computer programs, and


other software that lets people interact with a computer.
• It manages computer hardware and software resources.
• It provides common services for computer programs.
C PROGRAMMING LANGUAGE

• The C programming language is a computer programming


language that was developed to do system programming for the
operating system UNIX and is an imperative programming
language.
BLOCK DIAGRAM OF
COMPUTER
6
COMPILER

• A compiler is a program that translates a source program written in


some programming language into machine code for computer
architecture(set of rules/methods).
INTERPRETER

• An interpreter is a computer program that directly executes


instructions written in a programming or scripting language, without
requiring them previously to have been compiled into a machine
language program.
What is C Language?

• C is a general-purpose computer programming


language.

• C is also said to be structures programming language or


function oriented programming language.

• C is a High level programming language.


Why do we use C?

• C language is used to create applications or software.

• Initially, C was developed to create an operating system


called UNIX.

• The popular software like Linux OS, PHP & MySQL are
created using C language.
Why do we use C?

Generally C Language is used to create the following…

• Operating Systems
• Language Compilers
• Assemblers
• Interpreters
• Text Editors
• Network Drivers
• Databases
History of C Language?

C Language was developed by Dennis Ritchie in the year of


1972.

Born – September 9, 1941


Profession – Computer Scientist
Place – Bell Labs, US
Known As – Father of C & UNIX
Dennis Ritchie
Basics of C Programming?

• C is a structured programming language. So every


instruction in a c program must follow the predefined
structure (Syntax).

• C is also known as Function Oriented Programming


Language. So every executable statement must written
inside a function.
General Structure of a C Program

Documentation

• It is used to provide brief information of the program.

• This part is written using comments.

• Generally the documentation part does not executed


by compiler & it is optional part.
GENERAL STRUCTURE OF C
Rules for Writing C programs

• Every c program must contain exact one main method


• Every executable instruction must end with semicolon (;)
• All the system defined words (Keywords) must be used in lowercase
letters
• Every open brace ({) must have the respective closing brace (})
• The variables must be declared in the declaration section before
they are used
The C preprocessor is a macro
processor that is used
automatically by the C compiler
to transform your program
before actual compilation.
What is C Character set?

• C Character set is a collection of characters supported in C


programming language.

• C Programming language has a rich set of characters which


are used to construct c program instructions.
22
A list of 32 reserved keyword in c
language is given below:
PRECEDENCE AND
ASSOCIATIVITY

• Precedence is the priority for grouping different types of operators with


their operands. Associativity is the left-to-right or right-to-left order for
grouping operands to operators that have the same precedence.

Eg: 10 + 20 * 30 = ?
PRECEDENCE AND ASSOCIATIVITY
Thank You

You might also like