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

Chap 1

The document provides an introduction to programming fundamentals and the C programming language. It discusses the background and uses of C programming, provides a sample C program and output, and explains how to compile and execute C programs. It also defines key programming terms, describes different types of programming languages and methodologies like structured, functional, and object-oriented programming. Finally, it explains algorithms, flowcharts, and pseudocode, defining each term and discussing their advantages and disadvantages as ways to represent the logic of a problem solution.

Uploaded by

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

Chap 1

The document provides an introduction to programming fundamentals and the C programming language. It discusses the background and uses of C programming, provides a sample C program and output, and explains how to compile and execute C programs. It also defines key programming terms, describes different types of programming languages and methodologies like structured, functional, and object-oriented programming. Finally, it explains algorithms, flowcharts, and pseudocode, defining each term and discussing their advantages and disadvantages as ways to represent the logic of a problem solution.

Uploaded by

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

DEC 20012 :

PROGRAMMING FUNDAMENTAL

INTRODUCTORY
TO PROGRAMMING
CHAPTER 1
COURSE LEARNING OUTCOME (CLO) :
CLO1 (Apply knowledge of basic concepts and fundamentals of structured programming in solving a
variety of engineering and scientific problems using a high level programming language.
know the programming language

C Programming

 C language is used for creating computer applications


and also used a lot in writing embedded
software/firmware for various electronics, industrial
and communications products which use micro-
controllers.

 It is also used in developing verification software, test


code, simulators etc. for various applications and
hardware products.
2
know the programming language

Background of C Programming

 The C programming language was pioneered


by Dennis Ritchie at AT&T Bell Laboratories
in the early 1970’s.

 C is a “higher-level language”  provides


capabilities that enable

3
know the programming language

Sample of C Program
• Basic C Program

4
know the programming language

Sample of C Program
• Output :

HELLO WORLD

5
The Basic Structure of a C Program

6
know the programming language

Compile & Execute Programs

 A compiler is a computer program (or set of programs)


that transforms source code written in a programming
language (the source language) into another computer
language (the target language, often having a binary
form known as object code).
 At compiling time the program are scan for any syntax
and semantics error.
 The most common reason for converting a source code
is to create an executable program.

7
know the programming language

Compile & Execute Programs

 An executable file or executable program,


or sometimes simply an executable, causes
a computer to perform indicated tasks
according to encoded instructions.

8
know the programming language

Steps to write C programs and get the output


• Below are the steps to be followed for any C program to
create and get the output.

9
know the definition and types of programming

Introduction to Programming Concept and


Terminology

 Defining Terms
 Programme - A set of instructions that tells the
computer what to do
 Programmer – A person who is involved in the
programming phases.
 Programming language – is the language understood
by the computer, used to tell the computer what to do.

10
know the definition and types of programming

Types Of Programming Language

 Machine languages
 is a true computer language
 machine specific instructions, consists of binary numbers Example : 0 and 1.
 lowest level representation of computer program

 Assembly languages
 Using mnemonics to represent machine language instructions (translated via assemblers)
Example : mov ax, 1234h (mov value 1234h into register ax)

 High-level languages
 Codes similar to everyday English
 Use mathematical notations (translated via compilers)
Example : grossPay = basePay + overTimePay

11
understand the types of programming and structure programming methodology

Types of Programming

 Structured Programming
 Functional / Modular Programming
 Object Oriented Programming (OOP)

12
understand the types of programming and structure programming methodology

Types of Programming

Structured Programming
•Computer programming in which the
statements are organized in a specific manner to
minimize error or misinterpretation.
•Examples : ALGOL, Pascal, C, PL/I and Ada.

13
understand the types of programming and structure programming methodology

Types of Programming

Functional / Modular Programming


• Modular programming is subdividing
program into separate subprograms such as
functions and subroutines.
• make program shorter, hence easier to read
and understand.
• Examples : Scheme, LISP 14
understand the types of programming and structure programming methodology

Types of Programming

Object Oriented Programming (OOP)


•A computer programming methodology that
focuses on data rather than processes, with
programs composed of self-sufficient modules
(objects) containing all the information needed to
manipulate a data structure. Abbreviated OOP.
•Examples : Java, C++
15
Remember algorithm, flowchart and pseudocode

Algorithm

• Algorithm is a list of sequential steps to solve a problem


• Algorithm is first step of the solution process, after the
analysis of problem, programmer write the algorithm of
that problem
• 2 methods in writing algorithm :
• Flow Chart
• Pseudo Code
16
Remember algorithm, flowchart and pseudocode

Flowchart
Steps in problem solving (logic)
using diagrams and specific
symbols.

17
Remember algorithm, flowchart and pseudocode

Pseudocode
• Steps in problem solving (logic) written using a combination of
spoken language and some programming language – semiformal.

• Example : (Pseudocode for multiply a and b)


Begin
Read a
Read b
Count y=a*b
Write y
End
18
Remember algorithm, flowchart and pseudocode

Flowchart Sysmbol
TERMINAL
Start/Stop
Begin/ End
FLOWLINE
direction of the flow of control
PROCESS
instruction operation

DECISION
comparison operation
(use in Branching, Looping)
VONNECTOR
Connect one part of the flowchart
to another
INPUT/OUTPUT
reading & printing

19
20
Remember algorithm, flowchart and pseudocode

Advantages of Flowchart

21
Remember algorithm, flowchart and pseudocode

Disadvantages of Flowchart

22

You might also like