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

Introduction to C Language with answers

Uploaded by

shreeprakash1620
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Introduction to C Language with answers

Uploaded by

shreeprakash1620
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Complete the Lesson Summary

 HGC
9

JV
Let us recollect that, a ________________________
Program is a set of instructions given to the

computer to perform any specific task. Programs are written using computer languages. LS-1

The original program is written by a person using a _______________________________


high level language

(source program) such as C, C++ and JAVA. The source program is then converted to

__________________________________
machine language instructions (Object program) that are interpreted

by a computer.

Translation of a source program to object program is done by specialised software called

Compiler or ______________________.
Interpreter Since the source program has to be converted to

machine readable form, it is essential to precisely follow the writing instructions of that

language which is called ________________.


Syntax If the program has _______________
errors it will

not be translated to its equivalent machine language program. Errors in the program are

called Bugs and correcting such errors is called _________________________.


De-bugging

Before writing programs using the computer language, program preparation can be

simplified using ____________________.


flowcharts The program logic is made very easy through

________________________________
flowchart symbols that has standardised meaning.

C is a high level programming language designed at AT&T’s Bell Laboratories. It is a

general purpose structured programming language which can be run in any operating

system. While writing programs we must know: (a) the alphabets, numbers and special

symbols called character set used in C. (b) how to construct the constants, variables and

keywords using the______________________________.


character set (c) finally how are they combined

as instructions to form a program. 
Page 1

Complete the Lesson Summary (Contd …)
 HGC
9

JV
Constants are values that will not change during the execution of the program. Integer,

____________
real and _______________
character are some constant types available in C Language.
Integer constant is either a __________________________________________
positive or a negative value with a LS-1

permissible range of -32768 to +32767 e.g., 1030, -8654. Real constants which are also

called __________________________
floating point constant could be written in two forms,

_____________________
fractional form (decimal point value) and ______________________
exponential form e.g., -

32.76, +12.3e-5. A character constant is a single alphabet or a digit or a symbol enclosed

within single quotes e.g., ‘A’, ‘z’.

A __________________
variable is a space allocated in the memory to store a particular value.

The value can be altered during the execution of the program. Depending on the type of

variable declared in the program, a variable can store values such as ________________,
integer
_______________,
real _______________
character type. A variable name can be a combination of

alphabets, digits and underscore. Variable name must start with an alphabet and should not

contain space, commas, or other special characters e.g., int num_1, float salary, char grade.

Keywords also called _____________________


reserved words are those whose meaning has already

been explained to the C compiler. Some of the keywords available in C are _________,
void
_______,
float _________
int etc.

Delimiters
_____________________ such as ; , (), { } are used to separate keywords and other
statements in C.

Operators help in executing logical and mathematical operations. The different types of

operators are Arithmetic Operators ( ________________________________


+, -, *, /, % ),
__________________
Relational Operators ( > , < , >=, <=, !=, == ), Assignment Operator ( _____
= ),
&&, ||, !
Logical Operators ( _____________________________ ), Increment and Decrement

++, --
Operators ( _________________ ). The various operators when formed with variables and

expression
constants form an ____________________ e.g., (i) ( A+B) * C (ii) AX 2+BX+C (iii) a++ (iv)

a=10 (v) a==10



Statements are a __________________________________________
set or a sequence of action

terminated with a semicolon (;) e.g., tot= mat+sci+soc+lang+eng;



Teacher’s Signature:

I. Specify the correct terminology for the hint provided HGC
9

JV
1. A set of instructions to perform any specified task. Program
2. Process of correcting mistakes in a program. De-bugging
3. Translates high level language to machine language. Compiler W-1
4. Also known as floating point constant. Real Constant
5. Quantity that does not change. Constant
6. Writing instructions precisely pertaining to that language. Syntax
7. Words whose meaning has already been explained to the compiler. Keywords

8. Diagrammatic representation of a program. Flowchart

II. Use the correct word from the box and complete each sentence

Bug Machine language Exponential form Variable


Character Integer constant Character set Syntax & Logical

Machine language
1. A Computer can interpret a set of code called _____________________________ instructions.
Bug
2. The error in a program is called __________________________
Character set
3. A __________________________ denotes any alphabet, digit or special symbol used to
represent information.
Integer constant
4. The permissible range for _____________________________ is -32768 to +32767
Exponential form
5. The real constants could be written in fractional form and __________________________
Variable
6. A _________________________ is a space allocated in the memory to store a particular value.
Character
7. A __________________________ constant is a single alphabet, digit or a symbol enclosed
within single quotes.
Syntax & Logical
8. A program might have __________________________________________ types of errors.

III. Give the Alternative name for the following

1 Bug Error

2 Reserved Words Keywords

3 Real Constants Floating point constant

4 Source Program
High level language 

program
5 Machine language
Object Program
program
Page 1 
IV. Circle the word that is not associated with the word in the first column HGC
9

JV
1. C++ Oracle Java BASIC

2. Compiler Translator Object Program Interpreter


W-1
3. Function float main() getch()

4. ‘A’ ‘a’ ‘z’ “z”

5. 12.3e-5 -35.2e4 12 0.15

6. Delimiter \t ; { }

V. Identify and name the given flowchart symbols

Processing Input / Output


operations Conditional
statement

Beginning
End Repeat under
condition

Connector

VI. Match the correct word from the given set of choices and fill in the blanks

1. Keywords main for=10 ex main


2. Real Constant 0.001 0.001 12 no=120
3. C Language Language OS Package
4. Integer Constant int age=10 int age=10.5 int age=10 int age=2.6
5. Real Variable float mark float 12.3 float mark float 120
6. Character Constant char sec= ‘A’ char sec char sec=’A’ float salary
7. Variable char grade char grade char -32.7 

8. Special Symbols # # a 8
9. Increment Operator = ++ &&
++
Teacher’s Signature: 

You might also like