CIAT CS Answers

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

SECTION-A

1. ___Octal__ number system uses 3 binary digits to represent a


decimal number
2. It is a type of logic with has Truth values (0 and 1) and can
be derived from logic gates such as AND, NOT,OR.
3. A constant does not change its value and it remains the same
forever. A variable, on the other hand, changes its value
from time to time depending on the equation. Constants are
usually represented by numbers.
Ex. Const int a=3
4. an algorithm is a well-defined step-by-step solution or a series
of instructions to solve a problem. An algorithm will make the
problem to look and solve easier.
5. Contiguous/Sequential.
6. Preprocessor Directories
7. Compilers
8. False
9. ASCII
10. 0-9

SECTION-B
1. A. Easy to understand
B. Machine independent: Can be done in any
machine (portable)
C. Easy Debugging
D. Easy to maintain the program
E. Poor control on hardware
F. Slow execution
2.
The binary system has only 2 digits ‘0’ and ‘1’ which is analogous to ‘On’ and ‘Off’
state. This is used in an electrical signal as ‘5 V’ and ‘0 V’ respectively. Every
number in your computer is an electrical signal. So, the computer understands
only binary language.

3. Boolean logic is a form of algebra where all values are either


true or false. These values of true and false are used to test the
conditions that selection and iteration are based around.
4. Pseudocode:
It is an informal high-level description of an
algorithm .

Flowchart:
It is a pictorial representation of an algorithm.

Algorithm:
It is a step by step sequence of solving a given
problem.

5. Use of flowchart:
Analyzing, designing, documenting and
managing a process

Use of pseudocode:
Planning an algorithm with sketching the
structure
Use of Algorithm:
Gives the computer a specific set of
instructions, which allows the computer to do
everything.
6. If A > B and A > C then A is the largest. Exit.
If B > A and B > C then B is the largest. Exit.
if C > A and C > B then C is the largest. Exit.
There is no single largest.

7. If you try to access the array position(index)


greater than its size, the program gets compiled
successfully but, at the time of execution it
generates an “ArrayIndexOutOfBoundsException”
8. Searching:
Designed to retrieve an element from any data
structure when is is used.

Sorting:
It is used to arrange the data of list or array into
some specific order.

9. A linear search or sequential search is a method


for finding an element within a array. It
sequentially checks each element of the array until
a match is found or the whole array has been
searched.
10. Binary search is an efficient algorithm for
finding an item from a sorted list of items. It works
by repeatedly dividing in half the portion of the
list that could contain the item,until you have
narrowed down the possible locations to just one.

SECTION-C
1. Features of computational thinking:

You might also like