11-CS-Halfyearly-EM-2024-Answer Key
11-CS-Halfyearly-EM-2024-Answer Key
QN Answer Mark(s)
2 (D) Zetta 1
Mere
3 (C) decoder (Out of portion - removed from 2023 edition textbook)
attempt
5 (A) F2 1
6 (B) abstraction 1
7 (D) u, v = 10, 10 1
8 (C) m = -5, n = 4 1
10 (D) 11 1
11 (A) int 1
12 (A) \0 1
14 (B) Inheritance 1
15 A) Encryption 1
1
Part – II
Answer any SIX of the following: 6 × 2 = 12
Question number 24 is compulsory.
QN Answer Mark(s)
A Computer is an electronic device that takes raw data as input and
processes it under the control of a set of instructions, produces a
result, and saves it for future use.
16 (OR) 2
Computer is an electronic device that processes the input according to the
set of instructions provided to it and gives the desired output at a very fast
rate.
The Program Counter (PC) is a special register in the CPU which always keeps
17 2
the address of the next instruction to be executed.
Multiple applications can execute simultaneously in Windows is known as
18 2
“Multitasking”.
19
(OR)
Any suitable flow chart.
Token: 1
The smallest individual unit in a program is known as a Token or a Lexical
unit
20
Types: 1
• Keywords • Identifiers • Literals • Operators • Punctuators
21 sqrt(64) = 8 2
The purpose of the destructor is to free the resources that the object may 1
have acquired during its lifetime.
22
A destructor function removes the memory of an object which was allocated 1
by the constructor at the time of creating a object.
The ability of the function to process the message or data in more than one
23 2
form is called as function overloading.
24 10 9 8 7 6 2
2
Part – III
Answer any SIX of the following: 6 × 3 = 18
Question number 33 is compulsory.
QN Answer Mark(s)
25 (151)10 = (10010111)2 1
(10010111)2 = (227)8 1
26 1. User Interface
2. File Management Each ½
3. Memory Management (3)
4. Process Management
5. Security Management
6. Fault Tolerance
27
Assignment Operator Equality Operator
3
Operator: = Operator: ==
28 switch(expression)
{ 3
case constant 1: statement(s); break;
case constant 2: statement(s); break;
…………
…………
default: statement(s);
}
(OR)
Suitable syntax
29 An array of strings is a two-dimensional character array.
Example: char colour[4][10]; 3
The size of the first index (rows) denotes the number of strings.
The size of the second index (columns) denotes the maximum length of
each string.
30 Advantages of Public Constructors:
(1) Object Creation Anywhere: 3
Public constructors allow objects to be created in any scope.
Without public constructors, objects cannot be directly instantiated outside the
class.
(2) Flexibility:
Multiple constructors with varying parameters can be declared as public to provide
flexibility in object initialization.
(3) Ease of Dynamic Memory Allocation:
Public constructors enable the creation of objects dynamically.
(4) Encapsulation and Initialization:
Public constructors allow controlled initialization of member variables.
Advantages of Public Destructors:
(1) Automatic Object Cleanup:
Destructors are called automatically when an object goes out of scope or is
explicitly deleted.
3
31 (1) The overloaded function must differ in the number of its arguments or data
types 3
(2) The return type of overloaded functions are not considered for overloading
same data type
(3) The default arguments of overloaded functions are not considered as part of
the parameter list in function overloading.
32 • When an object of the derived class is created, the compiler first calls the base
class constructor and then the constructor of the derived class. 3
• This is because the derived class is built up on the members of the base class.
• When the object of a derived class expires first the derived class destructor is
invoked followed by the base class destructor.
• The constructors are executed in the order of inherited class i.e., from base
constructor to derived. The destructors are executed in the reverse order.
33 30 3
50
40
Part – IV
Answer all questions: 5 × 5 = 25
QN Answer Mark(s)
34
(a) Generations Main Component Features
• Big in size
5
First • Consumed more power
Vacuum Tubes
(1940–1956) • Malfunction
• Machine Language
• Smaller in size
Second • Less Heat
Transistors
(1956-1964) • Consumed less power
• Machine & Assembly language.
Third • Smaller, faster and reliable
(1964-1971) Integrated Circuits • Less power
• High Level Languages
Microprocessor
• Smaller and Faster
Fourth (Very Large Scale
• Microcomputer series developed
(1971-1980) Integrated
Circuits) • Portable Computers were introduced.
• Parallel Processing
Fifth Microprocessor • Super conductors
(1980-Till (Ultra Large Scale • Recognize Images and Graphics
date) Integration) • Artificial Intelligence and Expert Systems
• Solve high complex problems.
• Parallel and Distributed computing
• Smarter, faster and smaller
Sixth
• Development of robotics
(Future)
• Natural Language Processing (NLP)
• Development of Voice Recognition Software
4
• Clock speed is measured in MHz (Mega Hertz) or in GHz (Giga Hertz).
5
• If a condition is true, a true block is executed otherwise a false block is
executed.
• This statement is also called decision statement or selection statement.
• Suitable Example:
(2) Redundancy:
• Inheritance is the good feature for data redundancy. If you need a same
functionality in multiple class you can write a common class for the same
functionality and inherit that class to sub class.
(3) Easy Maintenance:
• It is easy to maintain and modify existing code as new objects can be created
with small differences to existing ones.
(4) Security:
• Using data hiding and abstraction only necessary data will be provided thus
maintains the security of data.
Disadvantages: 2
(1) Size:
• Object Oriented Programs are much larger than other programs.
(2) Effort:
• Object Oriented Programs require a lot of work to create.
6
(3) Speed:
• Object Oriented Programs are slower than other programs, because of their
size.
38
(a) Constructor Destructor
The name of the constructor must be The destructor has the same name 5
same as that of the class. as that class prefixed by the tilde
character ‘~’.
No return type can be specified for It has no return type.
constructor.
A constructor can have parameter list. The destructor cannot have
arguments.
The constructor function can be Destructors cannot be overloaded.
overloaded.
They cannot be inherited but a They cannot be inherited.
derived class can call the base class
constructor.
The compiler generates a constructor, In the absence of user defined
in the absence of a user defined destructor, it is generated by the
constructor. compiler.
The constructor is executed The destructor is executed
automatically when the object is automatically when the control
created. reaches the end of class scope to
destroy the object.
-o O o-