Professional Documents
Culture Documents
st
UNIT I - FUNDAMENTALS OF C
IMPORTANT TOPICS:
Types of programming
Pseudocode
Algorithm
Flowchart
Definition of Program
Basic structure of C program
Compiler vs Interpreter
Programming Token
Types of Tokens in C
Data type
Type Casting
Decision making
Input, Output, Function
Comments in C
TYPES OF PROGRAMMING:
Not that imp for the test
PSEUDOCODE:
“It is a simpler version of a programming code in plain English which uses short phrases to write
code for a program before it is implemented in a specific programming language.”
Pseudocode is an artificial and informal language that helps programmer to develop programs.
Pseudocode is text-based detail design tool.
It is an intermediary between an algorithm and implemented program.
Page 1 of 4
FUNDAMENTALS OF C
1. What is pseudocode?
2. What’s the purpose of pseudocode?
3. What’s the difference between pseudocode and algorithm?
4. Write a pseudocode for swapping two values.
5. Write a pseudocode for given program.
ALGORITHM:
“Systematic logical approach which is a well-defined, step-by-step procedure that allows a
computer to solve a problem.”
It is based on conducting a sequence of specified actions in which these actions describe how to
do something, and your computer will do it exactly that way every time. An algorithm works by
following a procedure, made up of inputs.
Pseudocode:
It is a simpler version of a programming code in plain English which uses short
phrases to write code for a program before it is implemented in a specific programming language.
To understand it further let’s write the algorithm of the same program earlier.
Step 3: Read the values of variable p (principal), n (Number of years), r (Rate of Interest).
Step 6: STOP
Page 2 of 4
FUNDAMENTALS OF C
Here we go step by step in a systematic order and use more programming terms which shows the
exact procedure a computer go through to solve the given problem.
FLOWCHART:
DEFINATION OF PROGRAM:
COMPILER VS INTERPRETER:
PROGRAMMING TOKEN:
TYPES OF TOKENS IN C:
DATA TYPE:
TYPE CASTING:
DECISION MAKING:
COMMENTS IN C:
Page 3 of 4
FUNDAMENTALS OF C
Page 4 of 4