0% found this document useful (0 votes)
66 views43 pages

Computer Science Exam Questions 2020-2024

The document contains a series of public examination questions for XI Computer Science from March 2020 to June 2024, covering various topics such as logic gates, programming concepts, data types, and operating systems. It includes both 1-mark and 2-mark questions, with a focus on fundamental concepts in computer science. The questions are designed to assess knowledge and understanding of key principles and practices in the field.

Uploaded by

K Sabari
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)
66 views43 pages

Computer Science Exam Questions 2020-2024

The document contains a series of public examination questions for XI Computer Science from March 2020 to June 2024, covering various topics such as logic gates, programming concepts, data types, and operating systems. It includes both 1-mark and 2-mark questions, with a focus on fundamental concepts in computer science. The questions are designed to assess knowledge and understanding of key principles and practices in the field.

Uploaded by

K Sabari
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

XI – Computer Science – Public Examination Questions (March.2020 – June.

2024)

Part – I ( 1 Mark questions ) :

1. Which gate circuit is an OR gate followed by an inverted ? NOR


2. Which is used to connect a monitor or any display device like LCD projector to a computer ?
VGA connector
3. Identify the in-built email software in Ubuntu : Thunderbird
4. Which is specified by the properties of the given input and the relation between the input and the desired
output ? Specification
5. If C1 is false and C2 is true, which compound statement will be executed ? S2

if C1
S1
else if C2
S2
else
S3
6. A loop invariant need not be true : at the start of the algorithm
7. Assume a = 5, b =6 ; what will be the result of a & b ? 4

8. for (int i = 1; i<=10, i++) How many times will the loop be executed ? 10

9. Which function is used to check whether a character is alphanumeric or not ? isalnum( )


10. Which of the following is the scope resolution operator ? ::
11. cin>>n[4]; to which element does the statement accept the value ? 5
12. A structure declaration is given below :
struct Time
(
int hours;
int minutes;
int seconds;
}t;
Using the above declaration, which of the following refers to the structure variable seconds ?
t.seconds
13. The member function defined within the class behave like : Inline function
14. Which of the following derives a class student from the base class school ?
class student : public school
15. A computer network security that monitors and controls incoming and outgoing traffic is : firewall
16. Which generation of computer used Transistors ? Second
17. Pick the RISC processor : Intel P6
18. Which the following operating systems support Mobile Devices ? iOS
19. Ignoring or hiding unnecessary details and modelling an entity only by its essential properties
is known as ? Abstraction
20. How many times the loop is iterated ? 5
i:=0
while i ≠ 5
i:=i+1
21. The unchanging property of a variable in iteration is known as : Loop invariant
22. Which of the following operator is received from operator of C++ ? >>
23. Which can be used as alternate to \n ? endl
24. Which function begins the program execution? main( )
25. Array subscripts is always starts with which number ? 0
26. Which keyword is used to create structures in C++ ? struct
27. Which of the following is a technique of building new classes from an existing class ? Inheritance
28. How will you invoke the function dispchar( ) for the following input ? To print $ for 10 times . dispchar( ) ;
void dispchar(char ch=’$’, int size=10)
{
for (int i=1; i<=size; i++)
cout<<ch;
}
29. Which among the following is executed in the order of inheritance ? Constructor
30. Which of the following is not a malicious program on Computer Systems ? Cookies
31. Identify the output device. Monitor
32. Which gate is called as the logical inverter ? NOT
33. How many level of securities is provided by operating system to the user ? 3
34. In Windows applications which is the default folder to save files ? My documents
35. After the assignment what values will be stored in the variables m, n ? 13, 3
(1) m, n : = 10, 5
(2) m, n : = m+ 3, n – 2
(3) m, n := ?, ?
36. How many times the loop is iterated ? 5
m: = 0
while (m<5)
m := m+1
37. The smallest individual unit in a program is : Tokens
38. Which of the following statement is used to terminate the execution of the loop ? break
39. In C++ which function is used to check whether a character is alphanumeric or not ? isalnum( )
40. int age[ ] = { 6, 80, 75, 21, 10 } ; How many elements are there in this array ? 5
41. Which of the following is a user defined data type ? class
42. Which of the following constructor is executed for the following prototype ? copy constructor
add display (add &a) ;

43. In C++ which of the following operator can be overloaded ? +


44. Which amongst the following is executed in the order of inheritance ? constructor
45. Which of the following deals with procedures, practices and values ? computer ethics
46. Expand POST : Power On Self Test
47. Which amongst this is not an octal number ? 876
48. Which of the following is a very high speed and expensive memory ? Cache
49. Which of the following operating systems support mobile devices ? iOS
50. Which is specified by the properties of the given input and the relation between the input and the desired
output ? specification
51. Which of the following notation is a mix of programming language, like constructs and plain English ?
Pseudo-code
52. Who developed C++ ? Bjarne Stroustrup
53. Which is not a jump statement in C++ ? switch
54. Which of the following header file defines the standard I / O predefined functions ? stdio.h
55. Which of the following keyword is used to declare a structure in C++ ? struct
56. Which of the following supports the transitive nature of data ? Inheritance
57. How many number of destructors can a class in C++ contain ? 1
58. Which of the following is the process of creating new classes from an existing class ? Inheritance
59. Which one of the following are self-repeating and do not require a computer program to attach
themselves ? Worms
60. Which of the following is the first Tamil programming Language ? Ezhil
61. Expand ULSI Ultra Large Scale Integration
62. Which of the following is a CISC processor ? Pentium III
63. Stating the input property and input-output relation of a problem is known as : specification
64. Diagrammatic notation for representing alogrithms are known as ? pseudocode
65. Before assignment x, y =40, 20 ,
After assignment x, y : = x + 5, y - 5
What is the value of x, y ? 45, 15
66. Which of the following data types is not a fundamental type ? signed
67. A loop that contains another loop inside its body ? Nested Loop
68. What is the return data type of the function prototype add(int, int); ? int
69. By default, a string ends with which character ? \0
70. The mechanism by which the data and functions are bound together into a single unit is known as :
Encapsulation
71. The data variables declared inside the classes are known as : data members
72. Which of the following refers to function having more than one distinct meaning ? function overloading
73. The type of inheritance that reflects the transitive nature is : Multilevel Inheritance
74. Which of the following deals with procedure, practice and value ? Computer ethics
75. Getting government services through internet is known as : e -Governance
76. Which generation of computer used IC’s ? Third
77. For 11012 the Hexadecimal equivalent is : D
78. Which of the following is not a part of the microprocessor unit ? Cache Memory
79. Which of the following is single user operating system ? MS - DOS
80. Which command is used to ‘Paste’ ? Edit -> Paste
81. If C1 is false and C2 is true, the compound statement? S2
if C1
S1
else if C2
S2
else
S3
82. Who developed C++ ? Bjarne Stroustrup
83. How many categories of data types are available in C++ ? 3
84. How many times the following loop will be executed ? for(int i = 1; i<10; i++) 9
85. int x = 10;
int main( )

{
int x = 100;
cout << :: x;
}
The output for the above snippet is : 10
86. Which of the following is the collection of variables of the same type that are referenced by a common
name ? array
87. “ Write once and use it multiple time ” can be achieved by : Reusability
88. The functions that perform specific tasks in a class is called : Member functions
89. Which of the following deals with procedures, practices and values ? Computer ethics
90. Which is not a search engine ? Android
91. …….. is the main component of Second Generation computers . Transistors
92. How many bytes does 1 kilobyte contain ? 1024
93. Which is the fastest memory ? Cache memory
94. Operating system is a ….. System software
95. The shortcut key used to rename file in windows : F2
96. Which of the following operator is extraction operator in C++ ? >>
97. Which of the following is a valid string literal ? “1232”
98. The multi way branch statement : Switch
99. Which of the following is the exit control loop ? do..while
100. Which function begins the program execution ? main()
101. int age[ ] = [ 6, 90, 12, 18, 2 ]
How many elements are there in this array ? 5
102. How many access specifiers declared inside class definition ? 3
103. How many types are there in inheritance ? 5
104. Which one of the following is Harass through online ? Cyber stalking
105. class product
{
int code, quantity;
float price;
};
int main( )
{
product p1, p2;
return 0;
}
How many bytes will be allocated with memory space of object p1 ? 12 bytes
106. Name the Volatile memory . RAM

107. For 10102 the Hexadecimal equivalent is : A

108. Display devices are connected to the computer through : VGA Connector
109. File Manangement manages : All of the above
110. Which of the following key combination is used to permanently delete a file or folder without
sending to Recycle bin ? Shift and Delete
111. Stating the input property and the input-output relation in a problem is known as :
specification
112. This can be used as alternate to endl Command : \n
113. #include<iostream>
int main( )
{
int i, sum=5;
for(i=1; i<=5; i++)
{
sum=sum+i;
}
cout<<sum;
return 0;
}
The output for the above snippet is : 20

114. Which function begins the Program execution ? main( )


115. What will happen when the structure is declared ?
It will allocate the memory (mere attempt)
116. The term used to describe a programming approach based on classes and object is : OOP
117. The member function defined within the class behaves like : Inline functions
118. Which of the following is not true with respect to function overloading ?
The return type is also considered for overloading a function

119. Which among the following is executed in the order of Inheritance ? Constructor
120. Commercial programs made available to the public illegally are known as : Warez
121. Write shortcut key is used to cut a file or folder ? Ctrl + X
122. 2 ^ 40 is referred as : Tera
123. What is the smallest size of data represented in a CD ? Pits
124. Operating system provides how many levels of securities to the user ? 3
125. Which is volatile memory ? RAM
126. Using the following recursive definition

1 if n = 0

an = a x an-1 otherwise

How many multiplications are needed to calculate a10 ? 9

127. Which of the following operator is extraction operator in C++ ? >>


128. How many times the following loop will execute ?
for (int i=0; i<5; i++) 5
129. If two strings are equal, then strcmp ( ) function returns which value ? 0
130. By default, a string ends with which character ? \0
131. A constructor that accepts no parameter is called as : default constructor
132. Which is the first tamil programming language ? Ezhil
133. Distributing unwanted e-mail to others is called : spam
134. Inheritance is a process of creating new class from ? Base class
135. Which of the following is the identifiable entity with some characteristics and behaviour ?
Class
136. Which generation of computer used IC’s ? Third generation
137. Omitting details inessential to the task and representing only the essential features of the task
is known as : Abstraction

138. How many time the loop is iterated ? 5


i:=0
while i ≠ 5
i:=i+1
139. Which of the following is the scope operator ? ::

140. Distributing unwanted e-mail to others is called …………. Spam

141. In C++ ……… used for pointer a variable. *


142. Which of the following is the Entry Control loop ? for

143. Legal recognition for transactions are carried out by : Electronic data interchange
144. The mechanism by which the data and function are bound together into a single unit
is known as : Encapsulation

145. #include <iostream>


using namespace std ;
int main ( )
{
int i =1, sum = 0 ;
while ( i <= 10)
{
sum = sum + i ;
i ++ ;
}
cout<<sum ;
return 0 ;

The output for the above snippet is : 55

146. The shortcut key used to rename a file in Windows. F2


147. Which of the following constructor is executed for the following prototype ? Copy constructor
add display ( add & ) ; // add is a class name.
148. Which refers to the number of bits processed by a computer’s CPU ? Word length
149. Interactive operating system provides : Graphics User Interface
150. Which of the following is a CISC processor ? Pentium III
151. Expand POST : Power on Self Test
152. How many bytes does 1 kilobyte contain ? 1024
153. Which of the following is not the part of a microprocessor unit ? Cache memory
154. The file management system used by Linux is : ext2
155. Which is the default folder for many Windows applications to save your file ? My Document
156. How many time the loop is iterated ? 5
i:=0
while i ≠ 5
i:=i+1
157. Which of the following operator is extraction operator in C++ ? >>
158. Which of the following operator gives the size of the data type ? sizeof ( )
159. Which of the following is the exit control loop ? do … while ( )
160. Which function is used to check whether a character is alphanumeric or not ? isalnum ( )
161. Int age [ ] = [6, 90, 20, 18, 2] ; How many elements are there in this array ? 5
162. “ Write once and use it multiple time “ can be achieved by : reusability
163. A computer network security that monitors and controls incoming and outgoing traffic is : Firewall
164. Which of the following refers to a function having more than one distinct meaning ?
Function overloading
165. Inheritance is a process of creating new class from : Base class
oOo
Part – II ( 2 Mark questions ) :

1. Write short note on Impact printer .


2. What is a program counter ?
3. What is a multi-user operating system ?
4. Initially j is 20 and p is 4, then what will be the value of p=p* ++ j; ? p = 84
5. What is Harvesting ?
6. Write the syntax to declare two-dimensional array and write a suitable example.
7. What are the disadvantages of OOP ?
8. What are called class members ?
9. Write a while loop that displays numbers 5, 10, 15, …… 50 .

int i = 5;
while( i<=50)
{
cout <<i<” \n ”;
i=i + 5;
}

10. What are derived gates ?


11. What is GUI ?
12. What is Open Source ?
13. What are the important control flow statements ?
14. What are keywords ? Can keywords be used as identifiers ?
15. What is Parameter and list its types .
16. How many elements are there in the following array declaration and also write its memory allocation ?
char ch[5] ;
17. What is Polymorphism ?
18. Write down the importance of Destructor .
19. What are the functions of an ALU ?

20. Convert the given binary number (11.011)2 into its decimal equivalent . ( 3.375 )10
21. What is recursion ?
22. Write a note on break and continue statement in C++ .
23. Write the syntax and example of, if statement .
24. What are the importance of void data type ?
25. What is polymorphism ?
26. What is TSCII ?
27. If a = 65, b = 15 , then find

(i) a&b ( 0000 0001 )2 = (1)10

(ii) a^b ( 0100 1110 )2 = (78)10

28. What are the components of a CPU ?


29. What is HDMI ?
30. What are the security management levels available in operating system ?
31. What is iteration ?
32. What is meant by type conversion ?
33. Write about strlen( ) function in C++ .
34. What is a class in C++ ?
35. What is cookie ?
36. for (int m=1; m<=9; m+=2)
cout<<m;
(i) How many times the loop will be executed ?
(ii) Write the output of the above snippet .

5 times.
Output : 13579

37. What is a computer ?

38. Find 2’s complement of (-57)10 ( 1100 0111 )2

39. What are the different operating systems used in computer ?


40. How will you rename a file ?
41. Mention three important control flow statements .
42. Write a short note on ‘const’ Keyword with an example .
43. Write a ‘for’ loop that displays the number from 21 to 30 .

44. How to access array elements ?


45. What is cyber crime ? Give an example .
46. Name some of the popular operating systems used in personal computers and Mobile devices .

47. Convert (44)10 into Binary numbers . 1011002


48. What are called Standard Icons ?
49. Define Algorithms .
50. What is the syntax to declare two-dimensional array .
51. What is Function overloading ?
52. Why derived class is called ‘Power Packed Class’ ?
53. What is TSCII ?
54. What are the importance of void data type ?
55. What is a computer ?
56. Write a note on Hexadecimal Number System .

57. Conver into Binary number (46)10 ( 0010 1110 )2

58. Define software and mention its types .


59. Differentiate files and folders .
60. What is the difference between an algorithm and a program ?
61. Write about the Input / Output operators in C++ .
62. What is harvesting ?
63. What is an Instruction Set ?
64. Write the functions of Control unit .

65. Perform Binary addition for the following : 1510 + 2010

66. What is GUI ?


67. What is meant by a token ? Name the token available in C++.
68. Define a loop invariant .
69. What is Polymorphism ?
70. What is Inheritance ?
71. Write short note on cracking .
72. Write the output for the following ?
#include<iostream>
using namespace std;
int main( )
{
double var1=87.25255;
cout<<(float)var1<<endl;
cout<<(int)var1<<endl;
}
73. List the encoding systems that represent characters in memory .
74. What is a program counter ?
75. What is an invariant ?
76. Write about strlen ( ) function .
77. What are Warez ?
78. What is abstraction ?
79. What are called Standard icons ?
80. Define class .
81. Convert the following if-else statement into conditional statement .
if (marks >= 60)
Grade = (marks>=60) ? A : B
Grade = ‘A’;
else
Grade = ‘B’;
82. Distinguish Primary and Secondary Memory.

83. (1324)8 – convert to equivalent Decimal number. (724)10

84. What is Multi user operating sysem ?


85. Write a short note on const keyword with example.
86. What are the importance of void data type ?
87. What are Warez ?
88. List the search engines supported by Tamil Language.
89. Define an alogorithm.
90. Write the output of the following program.
#include<iostream>
using namespace std ;
int main ( )
{
int i ;
for ( i = 0 ; i < 8 ; i ++ )
cout << i << endl ;
return 0;
}
91. What is the function of an ALU ?
92. Write the associative laws.
93. What is HDMI ?
94. What is known as Multitasking ?
95. What is the use of setw ( ) format manipulator ?
96. Write about strlen ( ) function.
97. What is the syntax to declare two – dimensional array ?
98. List the operators that cannot be overloaded.
99. Write a while loop that displays numbers 2, 4, 6, 8, …… , 20
oOo
Part – III ( 3 Mark questions ) :

1. Write the truth table and draw logic symbol of XOR gate .
2. Write short notes for the following :
(a) Network Indicator
(b) Session Indicator
3. What are the values of variables m and n after the assignments in line (1) and line (3) ?
(1) m, n := 4, 10
(2) –m, n= ?,? ( m = 4 , n = 10 )
(3) m, n := m+5, n-2
(4) –m, n = ?, ? (m=9,n=8)
4. What is type conversion ? Write short note on implicit type conversion .
5. Write the syntax and purpose of switch statement .
6. What is called nested structure ? Give example .
7. Define Encapsulation .
8. What are the points to be noted while deriving a new class ?
9. Read the following C++ snippet and answer the questions given below :
class student
{
int m, n;
public:
void ad( );
float calc( );
} x1, x2 ;

(i) Identify the members of the class . m , n, add ( ) , calc( )


(ii) What is size of the objects x1, x2 in memory ? x1 = 8 bytes , x2 = 8 bytes
10. Convert 34010 to its equivalent Binary, Octal and Hexadecimal .

Binary : ( 101010100)2 Octal : ( 524 )8 Hexadecimal : ( 154 )16

11. Differentiate CD and DVD .


12. Write the specific use of Cortana .
13. Define flow chart, pseudo code and a programming language .
14. What is operator Overloading ? List the operators which cannot be overloaded .
15. What is the difference between isupper( ) and toupper( ) functions ?
16. List some of the features of modular programming .
17. What are the ways to define member functions of a class ? Give example .
18. Write a C++ program to print the following series .
1 3 5 7 …….. 75

#include<iostream>
using namespace std;
int main()
{
for (int i=1; i<=75; i+=2)
cout<<i<<'\t';
return 0;
}

19. Write the truth table of fundamental gates .


20. Differentiate CD and DVD .
21. Write not on Recycle bin .
22. What is Decomposition ?
23. Write short note on : (i) Keywords (ii) Identifiers
24. Write note on strcmp ( ) function in C++ .
25. What is an array ? What are its types ?
26. Write about three types of visibility mode .
27. Read the following C++ code and answer the questions give below :
#include<iomanip>
#include<iostream>
using namespace std;
class product
{
int code, quantity ;
float price;
public:
void assigndata( );
void print( );
};
int main( )
{
product p1,p2;
cout<<”\n Memory allocation for object p1”<<sizeof(p1);
cout<<”\n Memory allocation for object p2”<<sizeof(p2);
return 0;
}
(i) What is the name of the class in the above program ? product
(ii) What are the data members of the class ? code, quantity, price
(iii) What is the memory size of the objects p1, p2 ? p1 : 12 bytes, p2 : 12 bytes
28. (a) State whether the following numbers are valid or not, if invalid write reason .

(i) (796)8 invalid. Second digit 9 is a wrong one

(ii) (7GE)16 invalid. Second digit G is a wrong one

(iii) (11110)2 valid.

(b) Write the number system for the following numbers .

(i) (926)10 Decimal number .

(ii) (ABC)16 Hexa decimal number .

(iii) (450)8 Octal number .


29. Write a note on interfaces and ports available in computer .
30. Write a note on following process management algorithms . (a) FIFO (b) Shortest Job First
31. What is a flow chart ? Write the disadvantages of flow chart ?
32. Write a note on logical operators in C++ .
33. List the rules for function overloading in C++ .
34. List some of the features of Modular Programming .
35. What are the guidelines of ethics to be followed by computer users ?
36. Read the following C++ snippet and answer the questions given below .
class personal
{
int admno, rno;
protected:
char name[20];
public:
personal();
void pentry();
void pdisplay();
};
class marks: private personal
{
int m;
protected:
char grade[5];
public:
marks();
void mentry();
void mdisplay();
};
class result: public marks
{
float total, agg;
char remark[5];
result();
void rcalculate();
void rdisplay();
};
(a) Which type of inheritance is shown in the above snippet ? Multi level inheritance

(b) Write the visibility mode of class marks and result. Marks – private result - public
(c) Name the base classes and derived classes in the above snippet .
Base class - personal Derived class - Marks, result
37. What is the difference between copy and move ?
38. List the building blocks of Algorithms .
39. Why is ‘main’ function special ?
40. What are Modifiers ? What is the use of Modifiers ?
41. Write about memory representation of 2-D array .
42. Write the disadvantages of OOP .
43. Mention different ways of defining methods of a class .
44. Name the operators which cannot be overloaded .
45. What is Derived class ? Why derived class is called power packed class ?
46. Explain about classification of Microprocessors based on the Data Width .
47. Write the characteristics of sixth generation computers .
48. What is Case – analysis ?
49. What are Keywords ? Can keywords be used as identifiers ?
50. What is a null statement and compound statement ?
51. Write the syntax and the purposes of switch statement .
52. Write a note on User – defined functions .
53. What are ethical issues ? List some of them .
54. Write a C++ program to sum the numbers from 1 to 10 using ‘for’ loop .
#include <iostream>
using namespace std;
int main ()
{
int i,sum=0;
for(i=1; i<=10;i++)
{
sum=sum+i;
}
cout<<"The sum of 1 to 10 is "<<sum;
return 0;
}

55. What is radix of a number system ? Give examples .


56. Explain the types of RAM .
57. What are the functions of windows operating system ?
58. Write the procedure to creat a file in wordpad .
59. Write a note on logical operators .
60. Write a C++ program to print multiplication table of a given number using for-loop .

#include<iostream>
using namespace std;
int main()
{
int n, i;
cout<<"Enter the number : ";
cin>>n;
cout<<"Multiplication table \n";
for(i=1; i<=12; i++)
cout<<n<<"x"<<i<<" = "<<(n*i)<<endl;
return 0;
}

61. Write a note on local scope .


62. What is an Array of strings ?
63. What is meant by Computer Ethics ?
64. What are the characteristics of a Computer ?
65. Write down the classifications of microprocessors based on the instruction set .
66. Write the two way to creat a new folder .
67. What are the advantages and disadvantages of Time-sharing operations system ?
68. Write about strcmp( ) function .
69. Write short notes on Class access specifiers of C++ .
70. Write about encryption and decryption .
71. Write a short note on Tamil Virtual Academy .
72. Write a C++ program to display numbers from 1 to 10. Except 5 using ‘for’ and ‘Continue’ statement .

73. Differentiate - Break and Continue statement .


74. Write a note on Recycle bin .
75. What do you mean by Overriding ?
76. List out the key features of operating system .
77. What is called anonymous structure ? Give an example .
78. Differentiate – Cold booting and Warm booting .
79. Write a note on binary number system .
80. List out the features of procedural programming .
81. Convert the following Octal numbers into Binary numbers .
(i) 6137 (ii) 245 (iii) 472
82. Write a not on Recycle bin.
83. What are the points to be noted while deriving a class ?
84. How is state represented in algorithms ?

85. Give the Truth Table of XOR gate.


86. What is the difference between isupper ( ) and toupper ( ) functions ?
87. Differentiate – CD and DVD.
88. Write the significant features of monitor.
89. What is an array ? Write its types.
90. Write a C++ program to display number from 5 to 1 using do - while loop.
91. Add : (a) -2210 + 1510 (b) 2010 + 2510
92. Write the De Morgan’s Laws.
93. Classify the microprocessor based on the size of the data.
94. Write a note on the elements of a windows.
95. Why is main ( ) function special ?
96. Write the syntax and purpose of switch statement.
97. Write short note on pow ( ) function in C++.
98. How to access members of a structure ? Give an example.
99. Write a C++ program to print multiplication table of a given number.

oOo
Part – IV ( 5 Mark questions ) :

1. Explain the basic components of a computer with a neat diagram .


(OR)

Convert the following :

(i) (1920)10 =( )8 ( 3600 )8


(ii) (1920)10 =( )2 ( 11110000000 )2

(iii) (8BC)16 =( )2 ( 1000 1011 1100 )2


(iv) (6213)8 =( )2 ( 1100 1000 1011 )2

(v) (255)10 =( )16 ( FF )16


2. Explain the concept of Distributed Operating System . (OR)

Trace the step-by-step execution of the algorithm for factorial (3) .


factorial(n)
- - inputs : n is an integer, n >= 0 Factorial (3)
- - outputs : f = n! i = 1, F = 1
F=1×1
f, i : = 1, 1
F=1×2
while i <= n F=2×3
f, i : = f x i, i + 1 F=6

3. Assume a = 15, b = 20 ; what will be the result of the following operations ?


(அ) a & b (ஆ) a | b (இ) a ^ b (ஈ) a>>3 (உ) (~b)

(அ) a & b = 00000100 = 4 10


(ஆ) a I b = 00011111 = 31 10
(இ) a ^ b = 00011011 = 27 10
(ஈ) a >> 3 = 00000001 = 1 10
(உ) ( ~b) = 11101011 = - 21 10

(OR)

Explain call by value method using function in C++ with suitable example .
4. Expalin briefly the basic concepts of OOP .
(OR)

Write the output for the following program .


#include<iostream>
using namespace std;
class nest
{
int x1;
Enter the number 5
int square_num( )
The square of 5 is 25
{
The cube of 5 is 125
return x1*x1;
}
public:
void input_num( )
{
cout<<”\n Enter the number “;
cin>>x1;
}
int cube_num()
{
return x1*x1*x1;
}
void disp_num()
{
int sq=square_num();
int cu=cube_num();
cout<<”\n The square of “ <<x1<<” is “ <<sq;
cout<<”\n The cube of “<<x1<<” is “ <<cu;
}
};
int main()
{
nest n1;
n1.input_num();
n1.disp_num();
return 0;
}
5. What are the restrictions on operator overloading ?
(OR)

Debug the following program to get the output.


Output
Enter data
Name : Raman
Code : 1305
Experience : 25
Display data
Name : Raman
Code : 1305
Experience : 25 years

Program
#include<iostream>
#include<string>
Class Employee
{
private
char name[20];
int code;
public:
void getdata();
void display();
}
Class staff : public Employee
{
int ex;
public:
void get();
void display();
}
void Employee :: display();
{
cout<<”Name : “<<name;
cout<<”Code : “<<code;
}
void Employee :: getdata( )
{
cout<<”Name : “;
gets(name);
cout<<”Code : “;
cin>>code;
}
void staff :: getdata( )
{
Employee :: getdata( );
cout<<”Experience”;
cin>>exp;
void staff :: Display( )
{
Employee::display( );
cout<<”Experience : “ <<ex<<” years “ <<endl;
}
void main( )
(
staff s
cout<<”Enter data”<<endl;
S.getdata( )
cout<<”Display data”<<endl;
s.display( );
return 0;
};

6. (a) Discuss the various generations of Computers .


(OR)

(b ) Explain the characteristics of a Microprocessor.


7. (a) Explain the advantages and disadvantages of Open Source Operating System .
(OR)

(b) Explain the types of errors .


8. (a) What is an entry control loop ? Explain any one of the entry control loop with its syntax and
suitable example .
(OR)

(b) Write a C++ program to find the difference between two matrix .
9. (a) Explain the different types of inheritance .
(OR)

(b) Write the different types of cyber attacks ?


10. (a) Write the differences between Object Oriented Programming and Procedural programming .
(OR)

(b) Write the output for the following program .

#include<iostream>
using namespace std;
Constructor of class simple
class simple
{ Enter the values for a and b30 40

private: The two integers are 30 40


int a,b; The sum of the variables70
public: Destructor is executed
simple()
{
a=0;
b=0;
cout<<"\nConstructor of class simple";
}
~simple()

cout<<"\nDestructor is executed";

void getdata()
{
cout<<"\nEnter the values for a and b";
cin>>a>>b;
}
void putdata()
{
cout<<"\nThe two integers are"<<a<<'\t'<<b<<endl;
cout<<"\nThe sum of the variables"<<a+b;
}
};
int main( )
{
simple s;
s.getdata();
s.putdata();
return 0;
}
11. (a) Discuss the various generations of computers .
(OR)

(b) Write the uses of operating system .


12. (a) Explain the types of errors in C++ .
(OR)

(b) What is an entry controlled loop ? Explain any one of the entry controlled loop
with syntax and suitable example .
13. (a) What are the key differences between if … else and switch statements in C++ ?
(OR)

(b) Explain scope rule of variables in C++ with example .


14. (a) (i) What is structure ? What is its use ?
(ii) Write the syntax and an example for creating a structure .
(iii) How to access members of a structure ? Give example .
(OR)

(ஆ) Write the output for the following C++ program .


Assume the values for age as 23 , height as 161.5 and weight as 45.
#include<iostream>
using namespace std;
struct Student Enter the age :23
{ Enter the height :161.5
Enter the weight :45
int age;
Your details :
float height,weight;
Age :23
}obj; Height :161.5
int main() Weight :45

{
cout<<"\nEnter the age :";
cin>>obj.age;
cout<<"\nEnter the height :";
cin>>obj.height;
cout<<"\nEnter the weight:";
cin>>obj.weight;
cout<<"\nYour details";
cout<<"\nAge :"<<obj.age;
cout<<"\nHeight :"<<obj.height;
cout<<"\nWeight :"<<obj.weight;
return 0;
}
15. (a) (i) Explain the main features of OOPS .
(ii)What are the advantages of OOPS.
(OR)

(b) Debug the given C++ program to get the following output .
Output:
Sum Constructor :
Difference Constructor :
1.Add :
2.Difference :
Enter your choice :2
Enter the values for a and b :20 60
The difference of two numbers are : -40
Difference Destructor :
Sum Destructor :

Program
?include<iostream>
using namespace std
class sum
{
int a,s;
protected:
int b;
publicly:
void sum()
{
a=b=s=0;
cout<<"\nSum Constructor :";
}
void input();
{
cout<<"\nEnter the values for a and b :";
cin>>a>>b;
}
void addition()
{
s=a+b;
cout<<"\nThe sum of two numbers is :"<<s;
}
void minus()
{
return a-b;
}
+sum()
{
cout<<"\nSum Destructor :";
}};

class difference # public sum


{
int d1;
public:
difference()
{
d=0
cout<<"\nDifference Constructor :";
}
void sub()
{
input();
d=minuses();
cout<<"\nThe difference of two numbers are :"<<d;
}
~difference()
{
cout<<"\nDifference Destructor :";
}
};
int main[]
{
difference obj;
int ch=0;
cout<<"\n1. Add :\n\n2.Difference :";
cout<<"\n\nEnter your choice :";
cin>>ch;
switch(ch);
{
case '1':
obj.input();
obj.addition();
break;
case '2':
obj.sub();
break;
}
return 0;
};

16. (a) (i) Convert (98.46)10 to binary ( 1100010.01110… )2

(ii) Find the 2’s complement of (-46)10 ( 11010010 )2

(iii) Add (1101010)2 + (101101)2 ( 10010111 )2

(iv) Subtract (1101011)2 + (111010)2 ( 11001 )2

(v) Convert (145)8 to binary ( 1100101 )2


(OR)

(b) Expalin the parts of a window in Windows operatin System .


17. (a) (i) What are tokens in C++ ?
(ii) Explain the types of tokens in C++ with suitable example .
(OR)
(b) Write a C++ program to find the sum of the series given below .

18. (a) Explain the for loop in C++ with its syntax and a suitable example .
(OR)

(b) Explain call by value method with suitable example .


19. (a) (i) Write a note on the main features of object oriented programming .

(ii) Explain the advantages and disadvantages of Object Oriented Programming .


(OR)

(b) Write the output for the following C++ program .


#include<iostream>
using namespace std;
class Trial
{
int x; Value of first assignment:45
public: Value of second assignment:54
Value of Object1:10
void assign(int y)
Value of Object2:20
{ Value of first assignment after passing the values :45
x=y; Value of second assignment after passing the values :54
}
void test(Trial obj1,Trial obj2)
{
obj1.x=10;
obj2.x=20;
cout<<"\nValue of Object1:"<<obj1.x;
cout<<"\nValue of Object2:"<<obj2.x;
}
void display()
{
cout<<x;
}
};
int main()
{
Trial a1,a2,a3;
a2.assign(45);
a1.assign(54);
cout<<"\nValue of first assignment:";
a2.display();
cout<<"\nValue of second assignment:";
a1.display();
a3.test(a1,a2);
cout<<"\nValue of first assignment after passing the values :";
a2.display();
cout<<"\nValue of second assignment after passing the values :";
a1.display();
return 0;
}
20. (a) Explain the different visibility mode in C++ with a suitable example .
(OR)

(b) Debug the given C++ program to get the following ouptput :

Output
The width of the box is :20
The length of the box is :67
Program
#include<stream>
using namespace std;
classes Box
{
double width;
public::
double length;
int printWidth()
{
cout<<"\nThe width of the box is :"<<width;
cout<<"\nThe length of the box is :"<<length;
}
void setWidth(double w,l);
}
void Box?:setWidth(double w,double l)
{
width=w;
length=l;
}
int MAIN( )
{
Box obj;
b.setWidth(67.0,20.0);
b.print Width();
exit 0;
}

21. (a) What are the rules for operator overloading ?


(OR)
(b) (i) Convert (923)10 into Octal and Hexadecimal .
Octal (1633)8 Hexa decimal (39B)16
(ii) Convert (99.76)10 into Binary . (1100011.11000…)2
22. (a) Explain the types of Microprocessors .
(OR)
(b) What are the types of Errors ?
23. (a) What are arithmetic operators in C++ ? Differentiate unary and binary arithmetic operators. Give
example for each of them .
(OR)
(b) What are ‘switch’ statement and mention the rules for switch statement ?
24. (a) Answer the following .
(i) Define functions .
(ii) What is default argument ? Give example .
(OR)
(b) Debug the given C++ program to get the following Output :

Output
Blue
Red
Orange
Yellow
Program

$include<stdio.h>
using namespace;
int main[ ]
{
float colour [4][10]={“Blue”, ”Red”, ”Orange”,}
for(int i=0; i<4; i++);
cout<<colour[j]<<”\t”;
}
}

Corrected program

#include<iostream>

using namespace std;

int main()
{

char colour [4][10]={"Blue", "Red", "Orange","Yellow"};

for(int i=0; i<4; i++)

cout<<colour[i]<<"\n";

25. (a) Discuss the various generations of computers .


(OR)

(b) Write the output for the following :


#include<iostream>
Enter roll no and name..11201 Raja
using namespace std; Enter 3 subject marks..90 90 90
Roll no :-11201
class student
Name :- Raja
{ Marks Obtained
Subject1… 90
private:
Subject2… 90
char name[20]; Subject3… 90
TOTAL MARK SCORED : 270
int rno;
public:
void acceptname()
{
cout<<"\n Enter roll no and name..";
cin>>rno>>name;
}
void displayname()
{
cout<<"\n Roll no :-"<<rno;
cout<<"\n Name :-"<<name<<endl;
}
};
class exam : public student
{
total=mark1+mark2+mark3;
cout<<"\nTOTAL MARKS SCORED :";<<total;
}
};
{
public:
int mark1, mark2, mark3;
void acceptmark()
{
cout<<"\n Enter 3 subject marks..";
cin>>mark1>>mark2>>mark3;
}
void displaymark()
{
cout<<"\n\t\t Marks Obtained";
cout<<"\n Subject1..."<<mark1;
cout<<"\n Subject2..."<<mark2;
cout<<"\n Subject3..."<<mark3;
}
};
class result : public exam
{
int total;
public:
void showresult()
{
total=mark1+mark2+mark3;
cout<<"\nTOTAL MARKS SCORED :"<<total;
}
};
int main()
{
result r1;
r1.acceptname();
r1.acceptmark();
r1.displayname();
r1.displaymark();
r1.showresult();
return 0;
}
26. (a) Explain Data and Information .
(OR)

(b) Explain the types of ROM .


27. (a) Explain the versions of windows operating system .
(OR)

(b) Write the specification of an alogorithm for computing the square root of a number .
28. (a) Explain the types of errors .
(OR)

(b) Explain multi-way branch statement (switch) with a suitable example .


29. (a) Explain the parts of a Loop .
(OR)

(b) Find the output of following program .


#include<iostream>
Enter Number1=1
using namespace std; Enter Number2=2
Enter Number3=3
int main()
Enter Number4=4
{ Enter Number5=5
Enter Number6=6
int num[10], even=0, odd=0;
Enter Number7=7
for(int i=0;i<10;i++) Enter Number8=8
Enter Number9=9
{
Enter Number10=10
cout<<"\n Enter Number"<<i+1<<"=";
There are5Even Numbers
cin>>num[i];
There are5Odd Numbers
if(num[i]%2==0)
++even;
else
++odd;
}
cout<<"\n There are"<<even<<"Even Numbers";
cout<<"\n There are"<<odd<<"Odd Numbers";
}
30. (a) Debug the following C++ program :

Output
15
14
13

Program
%include(iostream.h)
#include<conio.h>
Class A
{
public;
int a1,a2:a3;
Void getdata[]
{
a1=15;
a2=13;a3=13;
}
Class B :: public A()
{
PUBLIC
voidfunc()
{
int b1:b2:b3;
A::getdata[];
b1=a1;
b2=a2;
a3=a3;
cout<<b1<<'\t'<<b2<<'t\'<<b3;
}
void main()
{
clrscr();
B der;
der1:func();
getch();
}
(OR)

(b) Explain the advantages of object oriented programming .


31. (a) Explain the various generation of computers .
(OR)

(b) Explain 1’s compliment representation with an example .

32. (a) Explain the characteristics of a microprocessor .


(OR)

(b) Explain if … else statement with a suitable example .


33. (a) Explain the different types of inheritance .
(OR)

(b) Explain case analysis with an example .


34. (a) Explain the use of header file with examples .
(OR)

(b) What is an entry control loop ? Explain any one of the entry controlled loop with suitable example .
35. (a) Explain call by value method with suitable example .
(OR)

(b) What are the rules for operator overloading ?


36. (a) Discuss the various Generations of Computers .
(OR)

(b) Explain the process management algorithms in Operating System .


37. (a) (i) Write the procedure to convert fractional decimal to binary .

(ii) Convert (98.46)10 to Binary .


(OR)

(b) Arrange the memory devices in ascending order based on the access time a.
38. (a) Explain about Binary operators used in C++ .
(OR)

(b) Explain Call by value method with example .


39. (a) Mention the difference between constructor and destructor .
(OR)

(b) Write the output of the following program :


#include<iostream>
using namespace std;
int main( )
{
Char dev[5] [10] = { “Monitor”, “Speaker”, “Printer”, “Scanner”, “Keyboard” };
for(int i=0; i<5; i++)
cout<<dev[i]<<””\n” ;
}
40. (a) Explain the different types of Cyber attacks .
(OR)

(ஆ) Debug the following C++ program .


Output
Constructor of base class…
Constructor of derived…
Constructor of derived1…
Destructor of derived1…
Destructor of derived…
Destructor of base class…
Program :
$include<iostream>
using namespace std ;
class base ( )
{
public ;
base( )
{
cout<<”\n Constructor of base class…”;
}
!base( )
{
cout<<”\n Destructor of base class…”;
};
}
Class derived : : public base
{
public :
derived( )
{
cout<<”\n Constructor of derived…”;
}
!derived( )
{
cout<<”\n Destructor of derived…”;
}
};
Class derived1 : : public derived…”;
{
public :
derived1( );
{
cout<<”\n Constructor of derived1…”;
}
derived1( );
{
cout<<”\n Destructor of derived1…”;
}
};
int main( ):
{
derived1 x;
return 0;
}
41. (a) Explain the basic components of a computer with a neat diagram .
(OR)

(b) List out the uses of operating system .


42. (a) Explain the characteristics of a Microprocessor .
(OR)

(b) (i) Add : 11010102 + 1011012


(ii) Subtract : 11010112 - 1110102
43. (a) Explain control statements with suitable example .
(OR)

(b) Explain the main features of Object Oriented Programming .

44. (a) Explain the different visibility mode through pictorial representation .
(OR)

(b) (i) What are the rules for function overloading ?


(ii) State the rules for Operator overloading .
45. (a) (i) What is Parameter and list its types .
(ii) Write a short note on pow ( ) function in C++ .
(OR)

(b) Debug the following C++ program :


Program :
%include(iostream)
using namespace Std
int main [ ]
{
int n, num, digit, rev = 0
Cout >> “Enter a positive number :” ;
Cin >> num ;
n = num;
while (num)
{
digit = num%10
rev = (rev * 10) + digit ;
num = num/10
}
Cout <<” The reverse of the number is : << rev << endl ;
if (n = = rev);
Cout <<” The number is a palindrome ;
else :
Cout >> The number is not a palindrome” :
return 0;
}
}
வெளியீடு 1 :
Enter a positive number : 1221
The reverse of the number is : 1221
The number is a palindrome
வெளியீடு 2 :
Enter a positive number : 1234
The reverse of the number is : 4321
The number is not a palindrome

S.No. Errors Corrected

1 %include(iostream) #include<iostream>
2 using namespace Std using namespace std;
3 int main [ ] int main()
4 { {
5 int n, num, digit, rev = 0 int n, num, digit, rev = 0 ;
6 Cout >> “Enter a positive number :” ; cout <<"Enter a positive number :" ;
7 Cin >> num ; cin >> num ;
8 n = num; n = num;
9 while (num) while (num)
10 { {
11 digit = num%10 digit = num % 10;
12 rev = (rev * 10) + digit ; rev = (rev * 10) + digit ;
13 num = num/10 num = num /10 ;
14 } }
15 Cout <<” The reverse of the number is : << cout <<" The reverse of the number is : "<<
16 rev << endl ; rev << endl ;
17 if (n = = rev); if (n == rev)
18 Cout <<” The number is a palindrome ; cout <<" The number is a palindrome " ;
19 else : else
20 Cout >> The number is not a palindrome” : cout <<" The number is not a palindrome " ;
21 return 0; return 0;
22 } }
23 }

46. (a) Explain the basic components of a computer with a neat diagram. (OR)

(b) Explain the concept of a Distributed Operating System along with its advantages.
47. (a) Perform binary addition for the following.

(i) (- 21) 10 + (5) 10 ( ii ) (-12) 10 + (15) 10 (OR)

(b) What is function overloading ? What are the rules for function overloading ?
48. (a) Explain about types of ROM. (OR)

(b) Write the differences between if – else and switch statement.


49. (a) What is an output unit ? Explain any three output devices. (OR)

(b) Write the output of the following program.


#include<iostream>
using namespace std;
class student
{
int rno, marks ;
public :
student ( int r, int m )
{
cout<<” Constructor “<< endl ;
rno = r ;
marks = m;
}
void printdet( )
{
marks = marks + 30;
cout<< “ Roll no : “<<rno<<” \n “ ;
cout<< “Marks : “<<marks<<endl;
}
};
int main( )
{
student s(14, 70) ;
s.printdet ( ) ;
cout<<” Back to Main “ ;
return 0 ;
}

50. (a) Explain the different types of inheritance. (OR)

(b) Debug the following C++ program.


Output :
Total area : 35
Program :
%include<iostream>
using namespace std :
CLASS Shape
{
Private ( )
int count
Protected :
int width ;
int height ;
PUBLIC ;
Void setwidth [ int w ]
{
width = w ;
};
void setheight ( int h )
{
height = h ;
}
}
Class rectangle : Public Shape
{
Public
int getarea [ ]
{
return ( width * height ) ;
};
}
int MAIN ( )
{
rectangle rect :
rect.setwidth(5) ;
rect.setheight(7) ;
cout>>” Total area : “ <<rect.getarea( )<<endl ;
return 0 ;
};

51. (a) Discuss the various generations of Computers. (OR)

(b) (i) Add : 11010102 + 1011012

(ii) Subtract : 11010112 - 110102


52. (a) Explain the types of ROM. (OR)

(b) List out the points to be noted while creating a user interface for an operating system.
53. (a) Explain the versions of Windows Operating System. (OR)

(b) Explain the fundamental gates with expression and truth table.
54. (a) What is an entry control loop ? Explain any one of the entry controlled loop with suitable example.
(OR)

(b) Write a program to accept any integer number and reverse it.
55. (a) What are the advantages of OOPs ? (OR)

(b) What are the rules for operator overloading ?

oOo

You might also like