0% found this document useful (0 votes)
45 views17 pages

2023 I Puc Cs Solutions Midterm

The document discusses a midterm computer science exam with multiple choice and written answer questions covering topics like computer components, programming concepts, and binary arithmetic. It provides the questions, possible answers, and solutions to some of the written questions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views17 pages

2023 I Puc Cs Solutions Midterm

The document discusses a midterm computer science exam with multiple choice and written answer questions covering topics like computer components, programming concepts, and binary arithmetic. It provides the questions, possible answers, and solutions to some of the written questions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

SGT PU COLLEGE, BALLARI.

2023 I PUC MIDTERM COMPUTER SCIENCE –CS 41 SOLUTIONS


PART A
Answer all he following questions. Each question carries 01 mark 20x1=20
Select the correct answer
1. _____ is the characteristics of computer
[a]All the above
2. Microprocessor was developed in ______ generation
[c]Third
3. ______ is internal memory
[a]RAM
4. The smallest dot displayed on monitor is called ________
[b]Pixel
5. _____ is not an output device
[a]Keyboard
6. Two’s complement of 101110 is
[d]101111
7. _______ is a non-positional number system
[c]Roman system
Symbol is used for
[d] Subprogram
8. The process of identifying and correcting errors is called
[a]Debugging
9. The other name for if else if statement is
[d]None of the above
10. [i]The other name for if else if statement is
[d]None of the above
[ii]Hexadecimal number system consists of
[d] A to F
11. The process of dividing a problem into subproblems is called ___
[c]Stepwise refines

12. [i]____ is token


[a]Keywords
12. [ii]Formulae in excel starts with
[d] =

13. [i]Int b=-0x3FFF is an example for


[c]Hexadecimal constant
[ii]In MS excel, columns are named as
[b] A,B,C

14. [i] Multiple use of input/output operators(<<or>>) in a single


statement is called ____
[c]Cascading input/output
[ii] Which among the following is a type of graph
[d] All the above

15. [i]Setw() is present in header file


[a] iomanip.h
[ii]A program written in high level programming language is called
[c]Source Code
Fill in the blanks [Const, & , cout, <<, >>, sizeof)
(lady ada lovelace, mouse, flowchart, application program, radix
16. [i] Const is keyword
[ii]A Flowchart is a visual representation of algorithm

17. [i]& is the address of operator


[ii]Mouse is a pointing device
18. [i]Sizeof is used to return the size of a variable
[ii] application program is not a hardware

19. [i] The result will be displayed using << in C++


[ii] Lady ada Lovelace is the first lady programmer

20. [i] >> is stream insertion operator


[ii] radix is called number of digits present in any number system.
PART B
Answer any Four of the following questions 02x04=08
21. What is Software? Mention its types
Solution
A set of instructions which is written in the form of program is called
Software. There are two types namely
System Software & Application Software

22. How Computers are used in industry


Solution
It is used to design engineering works, testing, analyse the data
It is used for Invoices, billing and other activities
It is used for communication purpose

23. Give differences between Volatile and non-Volatile memory


Solution
Volatile Memory Non-Volatile memory
The memory stored is temporary The memory Stored is permanent
It is made up of Semiconductor It is made up of magnetic material
material
Ex : RAM Ex : ROM
24. What are language translators? Mention different language
translators
Solution
Translator is a program which translates the source Program into object
program instructions [High Level Language instructions into Machine level
language instructions]
The different language translators are as follows
[a]Compiler [b]Assembler [c]Interpreter

25. Mention the advantages of top down approach


Solution
 In this method we break up the given problem into smaller parts
 It is mainly used for structured programming like COBOL, FORTRAN,
C etc
 Communication is less among modules
 It is used in top down approach

26. What is nested if Statement? Write its syntax


Solution :
If one if statement is enclosed within another if statement then it is called
as “ Nested if Statement”
Syntax
If(condition 1)
{
Else if (condition 2)
{
Else if(condition 3)
{
Stmt ;
}
Stmt;
}
Stmt;
}

27. Mention any two benefits of OOP


Solution
 We can break the given complex program into number of parts called
modules
 It achieves reusability
 Data redundancy can be done
28. Explain lvalue or rvalue with an example
Solution:
Lvalue refers to location value and rvalue refers to reference value
Example : Suppose If a variable b holds a value 10 and its address is 2000
then lvalue holds 10 and rvalue holds 2000

PART D
29. Write the differences between SRAM and DRAM
SRAM D RAM
SRAM stands for Static Random DRAM stands for Dynamic Random
access Memory Access Memory
It is made up of semiconductor It is made up of magnetic material
material
It doesn’t needs to be refreshed It needs to be refreshed periodically
periodically
It consumes less power It consumes more power
It is more expensive It is less expensive
It is volatile It is non volatile memory
30. Convert (512)10 =(?)2=(?)8=(?)12
Solution (1000000000)2 = (1000)8 = (200)16

31. Differentiate between CUI & GUI


CUI GUI
Command line interface Graphical User interface
The user must remember the The User need not rememberr the
commands at the command prompt commands
Mouse operation is not available for Mouse operation is required to
DOS select the commands
Navigation is difficult Navigation is easy
The speed is high The Speed is slow

32. What are the characteristics of good program


 It is case sensitive
 It is machine independent
 It achieves abstraction, encapsulation, inheritance,
polymorphisim
 Memory management can be easily done
 Dynamic memory allocation can be easily achieved.
33. Draw a flowchart to swap two numbers

START 34.

Read a, b

Compute temp=a, a=b, b=temp

Print a, b

STOP

34.Add 46 and 74 using Binary addition


64 32 16 8 4 2 1
46 0 1 0 1 1 1 0
74 1 0 0 1 0 1 0
1 1 1 1 0 0 0
PART D
Answer any Six of the following questions 6x5=30
37. Explain the characteristics of good computer
The characteristics of computer are as follows
[a]Speed
The computer works very fast. The speed of computer is measured in
terms of Million instructions per second or Billion instructions per second
Ex: A money counting machine counts money faster than man.

[b]Storage
The computer can store a large amount of data and information. The
Storage capacity of computer is measured in terms of Bytes. A group of 8
bits is called Byte.

[c]Accuracy
The computer generated results without any mistakes at a high rate of
consistency

[d]Deligence
It doesn’t become tiredness and lack of concentration. It can work for
hours without making any errors

[e]Cost effectiveness
Computers reduce the amount of paper work and human effort, thereby
reduces costs
38. What are the features of Second generation
Solution
It was designed in the year 1956-1963
It is made up of transistors in place of vaccum tubes
These machines are much faster, more reliable than earlier machines
It generates less heat and consumes less electricity
It uses punched cards for input and printout for output.
The instructions was stored in the memory using magnetic drum but
enhanced to magnetic core technology.
Ex : IBM 1620, UNIVAC 1108

39.Subtract 35 from 55 using 2’s Complement


32 16 8 4 2 1
Minuend 55 1 1 0 1 1 1
Subtraend 35 1 0 0 0 1 1
1’ complement + 0 1 1 1 0 0
1 of subtraend
1
2’s complement
0 1 1 1 0 1
of Subtraend is
Now, add
Subtraend value 1 1 0 1 1 1
to minuend
Carry is
generated,
Discard the carry
0 1 0 1 0 0
and remaining
bits will give
difference

The solution is 010100


40.Explain different types of Computer Codes
BCD
It stands for Binary Coded Decimal
Example convert 537 into BCD
0101 0110 0111

Excess 3
It is a non weighted code
Example : Convert 547 to Excess 3 Code
1000 1010 0110

EBCDIC
It stands for Extended Binary Coded Decimal interchange code
It is a 8 bit EBCDIC Code

ASCII
It stands for American standard code for Information interchange
It is a 7 bit code.

Gray code
The excess 3 code can be easily converted to gray code
00 01 11 10
41. What is modular programming? Mention its advantages.
The process of splitting the lengthier and complex programs into smaller
units (modules) is called modularization and programming in such
approach is called modular programming
Advantages
Code is easier to read
Code is easier to test
Reusability can be achieved easily
It is faster to execute
Example : Pascal and C Programming languages

42. Write an algorithm to find area of triangle


Solution
Step 1 : Start
Step 2 : Input s1,s2,s3
Step 3 : s=(s1+s2+s3)/2
area=sqrt(s*(s-s1)*(s-s2)*(s-s3))
Step 4 : Print area, s [where s represent side]
Step 5 : Stop

43.Write any five mathematical functions of ESS


[01] Abs(number)
Returns the absolute value of a number
=abs(-160) Ans. 160

[02[ fact(number)
Returns the factorial of a given number
=fact(5) Ans. 120
[03] gcd(number1, number2)
Returns the greatest common divisor
=gcd(10,20) Ans. 10

[04] lcm(number1, number2)


Returns the least common multiplier
=lcm(20, 30) Ans. 60

[05] mod( num, divisor)


Returns the remainder after number is divided by divisor
= mod( 20, 5) Ans. 0
44. Explain any five basic HTML tags
Solution
Bold tag:
<b>…..</b>
It makes the text to appear thicker and darker
<html>
<head>
<title>bold</title>
<body>
<b>apple is red in color</b>
</body>
</html>

Italic tag: <I>…….</I>


It makes the data to appear as italic
<i>mango</mango>

<html>
<head>
<title>bold</title>
<body>
<i>apple is red in color</i>
</body>
</html>
Underline tag <u>…….</u>
It makes the text to appear underlined.
<u>mango</u>

<html>
<head>
<title>bold</title>
<body>
<u>apple is red in color</u>
</body>
</html>

Superscript tag <sup>……</sup>


It defines the superscripted text
<html>
<head>
<title>superscript</title>
a<sup>2</sup>
</head>
</html>

Subscript tag <sub>………</sub>


It defines the subscript text
<html>
<head>
<title>subscript</title>
a<sub>2</sub>
</head>
</html>
45.Explain block diagram of Computer

Input devices:

An input device is any hardware component that allows you to enter data and
instructions into a computer. Some of the widely used input devices are the
keyboard, mouse, microphone, scanner, and Webcam.

Central processing unit:

CPU is the part of the computer that carries out the instructions of a computer
program. It is the unit that reads and executes program instructions. Hence it is
known as the brain of the computer. It takes all major decisions, makes all sorts of
calculations.

The CPU consists of storage or memory unit, arithmetic logic unit (ALU) and
control unit.
Memory unit: memory unit is also known as the primary storage or main memory
(RAM). It stores data, program instructions, internal results and final output
temporarily, before it is sent to an appropriate output device.

Arithmetic and logic unit (ALU): ALU is the unit where all arithmetic operations
(addition, subtraction, multiplication, division etc.) and logical functions such as
AND, OR,NOT are performed.

Control Unit: it acts as a central nervous system and ensures that the information
is stored correctly and the program instructions are followed in proper sequence.

Storage unit: results obtained after processing will be in the primary memory,
these data or information can be stored in the storage device/secondary memory
units. Secondary storage devices , are called as auxiliary memory devices.
Secondary storage devices can hold more storage data than main memory and is
less expensive.

Output unit: an output device is any hardware component that conveys


information to one or more people in user understandable form. Commonly used
output devices are printer, monitor, and speakers.
46. Subtract 19 from 27 using 1’s complement method
16 8 4 2 1
Minuend 27 1 1 0 1 1
Subtraend -19 1 0 0 1 1
1s
complement
0 1 1 0 0
of
Subtraend
Add this
value to 1 1 0 1 1
minuend
Carry is
generated
called as 1 0 0 1 1 1
end around
carry
Add end
around 1
carry to LSB
Difference 0 1 0 0 0

The solution is 01000 final difference

***Thank you ***

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy