Introduction to C Language with answers
Introduction to C Language with answers
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
(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.
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
not be translated to its equivalent machine language program. Errors in the program are
Before writing programs using the computer language, program preparation can be
________________________________
flowchart symbols that has standardised meaning.
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
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., -
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.
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 ( _________________ ). 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)
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
II. Use the correct word from the box and complete each sentence
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.
1 Bug Error
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
6. Delimiter \t ; { }
Beginning
End Repeat under
condition
Connector
VI. Match the correct word from the given set of choices and fill in the blanks