Std IX-computer
Std IX-computer
COLLEGE
MANDAVELI, CHENNAI – 600 028.
CLASS: IX
TEACHING NOTES
________________________________________________________________
Lesson 1 –Designing a Program
I. Fill in the blanks:
1. Any task which is done by computer need systematic ___planning___ and ___thinking___
2. To develop a program, it contains 6 phases.
3. Gathering the required resources to solve the problem comes under problem analysis.
4. Top-down approach will design the function from__Higher level ___ to ___lower level___
5. Flow chart is a pictorial representation of procedure.
6. Algorithm will be translated into coding and documentation.
7. Program details built-in within the program is called internal documentation.
8. Step-by-step procedure in logical order is called pseudo code.
A language that is used to communicate with the computer to get its work done is called
computer languages. The most popular computer languages are BASIC, FORTRAN, C, C++, Java etc.
There are three types of computer languages. They are:
Machine Language:
This language is known as the first generation of programming languages. The language
which consist of two digits 0 (false) and 1 (True) are called as Binary Language. Machine language is
directly understood by the computer beca8use all the instructions will be in the form of 0 and 1. It is
difficult for the humans to understand.
Assembly Language:
This language is known as the second generation of programming languages or middle level
languages. The instructions and variable will have specific names instead of binary numbers. To
understand the assembly language, the computer needs a translator called Assembler, which
translates the assembly language into machine language. Java
High-Level Language:
These languages are called third generation of programming languages. These languages are
close to humans as they are easily understandable. The programs written in this language are easy
to read, write and maintain. A program written in this language requires software to translate the
high-level language into machine code. This translation can be done by the compiler or the
interpreter.
2. Explain different translators.
A translator is used to convert high level source code into lower-level. The program written in the
high-level language is called as source code, and to convert the source code into machine code, a
translator is required. There are three types of translator:
Assembler:
Assembler is a translator which is used to translate assembly language into machine
language. The output of the assembler is called the object code.
Compiler:
Compiler is a translator which is used to translate high-level languages into machine
language. It translates the entire program and displays error in the source program during the
translation.
Error messages
Interpreter:
Interpreter is a translator which is used to translate high-level languages into low-level
language. It translates the program line by line and display error, when it is encountered during
translation.
3. Explain Errors.
Errors are illegal operations performed by the user while writing a program,
which results in abnormal working of the program. Errors are also called as bugs. Errors occur while
the program is executed or compiled. Errors are classified into three different types. They are:
Syntax Errors:
Errors that occur when the rules of the programming language are not followed are
called syntax errors. These errors are detected by the compiler and they are also called compile-time
errors.
Logical Errors:
Errors that occur, when the proper output is not obtained when the input is given
are called logical errors. These types of errors produce incorrect output, but the program appears to
be correct.
Run Time Errors:
Errors which occur during execution of a program are called run time errors. These program
will run with mistakes, but produce enormous results.
Lesson 3 – Overview of C
I. Fill in the blanks:
1. AIGOL was the first modern language and introduced in the year 1960.
2. B language was created by Ken Thompson.
3. ANSI defined the standard of C language.
4. The variables which are declared before main () function are called global variables.
5. Declaration and Executable are two parts of main () function.
6. The smallest individual unit in C language is called C tokens.
7. C language has 32 keywords.
8. Single character constant consists of single character enclosed in single quotes.
9. Values can be assigned to variable using assignment operator.
10. Const keyword is used to declare the value of variable as constant.
2. What are variables? What are the rules to be followed to choose a variable name?
A variable is a name used in the program to store the data values. These values of
variables can be changed during the execution of the program. The variable declared in programs
can be any data type.
The rules to be followed to choose a variable name are as follows:
Variable name must consist of uppercase letter A-Z, lower case letters a-z, digits 0-9, and
underscore.
First character must be a letter or underscore.
Blank spaces are not allowed.
Special characters like $, # are not allowed.
Keywords cannot be used as variable names.
Variables are case sensitive.