0% found this document useful (0 votes)
93 views20 pages

11CS EM CheckOnce

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)
93 views20 pages

11CS EM CheckOnce

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/ 20

என்றும் மாணவர்கள் நலனில்

11 – COMPUTER SCIENCE
A. Prabhakar - 9442979144

Dear Students!
 Congratulations.
 Give your best in each exam.
 Understand and read throughout the book to get full marks.
 C++ programs and other programs of 5 marks will be at the end. Understand well and
read.
 This has been prepared and provided on the basis of
experience and past public examination question papers.
 So, …

One Mark Questions

1. First generation computers used


(a) Vacuum tubes (b) Transistors (c) Integrated circuits (d) Microprocessors
2. Name the volatile memory
(a) ROM (b) PROM (c) RAM (d) EPROM
3. …….… Output device is used for printing building plan.
(a) Thermal printer (b) Plotter (c) Dot matrix (d) inkjet printer
4. Which one of the following is used to in ATM machines
(a) Touch Screen (b) speaker (c) Monitor (d) Printer
5. When a system restarts which type of booting is used.
(a) Warm booting (b) Cold booting (c) Touch boot (d) Real boot.
6. Expand POST
(a) Post on self Test (b) Power on Software Test
(c) Power on Self Test (d) Power on Self Text
7. Which one of the following is the main memory?
(a) ROM (b) RAM (c) Flash drive (d) Hard disk
8. Which generation of computer used IC’s?
(a) First (b) Second (c) Third (d) Fourth

..1.. A. Prabhakar - 9442979144


11 – Computer Science
9. Which refers to the number of bits processed by a computer’s CPU?
A) Byte B) Nibble C) Word length D) Bit
10. How many bytes does 1 Kilo Byte contain?
A) 1000 B) 8 C) 4 D) 1024
11. Expansion for ASCII
A) American School Code for Information Interchange
B) American Standard Code for Information Interchange
C) All Standard Code for Information Interchange
D) American Society Code for Information Interchange
12. 2^50 is referred as
A) Kilo B) Tera C) Peta D) Zetta
13. How many characters can be handled in Binary Coded Decimal System?
A) 64 B) 255 C) 256 D) 128
14. For 11012 the equalent Hexadecimal equivalent is?
A) F B) E C) D D) B
15. What Is the 1’s complement of 00100110?
A) 00100110 B) 11011001 C) 11010001 D) 00101001
16. Which amongst this is not an Octal number?
A) 645 B) 234 C) 876 D) 123
17. Nibble is a set of ________ bits.
a) 2 b) 4 c) 8 d) 16
18. ASCII code for blank space is
a) 32 b) 42 c) 48 d) 28
19. The ASCII value of zero (0) is
a) 32 b) 42 c) 48 d) 28
20. ASCII values for English lowercase letters
a) 97 to 122 b) 87 to 112 c) 65 to 90 d) 85 to 110
21. ASCII index values of English capital letters
a) 97 to 122 b) 87 to 112 c) 65 to 90 d) 85 to 110
22. Which is a basic electronic circuit which operates on one or more signals?
(A) Boolean algebra (B) Gate (C) Fundamental gates (D) Derived gates
23. A + A = ?
(A) A (B) O (C ) 1 (D) A
24. NOR is a combination of ?
(A) NOT(OR) (B)NOT(AND) (C ) NOT(NOT) (D) NOT(NOR)
25. NAND is called as …… Gates
(A) Fundamental Gate (B) Derived Gate (C ) Logical Gate (D) Universal gate
26. Which of the following is said to be the brain of a computer?
(a) Input devices (b) Output devices (c) Memory device (d)Microprocessor
27. How many bits constitute a word?
(a) 8 (b) 16 (c) 32 (d) determined by the processor used.
28. Which of the following device identifies the location when address is placed in the memory address
register?
(a) Locator (b) encoder (c) decoder (d) multiplexer
29. Which of the following is a CISC processor?
(a) Intel P6 (b) AMD K6 (c) Pentium III (d) Pentium IV
30. Which is the fastest memory?
a) Hard disk (b) Main memory (c) Cache memory (d) Blue-Ray disc

..2.. A. Prabhakar - 9442979144


11 – Computer Science
31. What is the capacity of 12cm diameter DVD with single sided and single layer?
(a) 4.7 GB (b) 5.5 GB (c) 7.8GB (d) 2.2 GB
32. What is the smallest size of data represented in a CD
(a) blocks (b) sectors (c) pits (d) tracks
33. Display devices are connected to the computer through.
(a) USB port (b) Ps/2 port (c) SCSI port (VGA connector
34. Operating system is a
A)Application Software B) Hardware C) System Software D) Component
35. Which of the following is not a function of an Operating System?
A) Process Management B) Memory Management
C) Security management D) Complier
36. Environment Which of the following OS is a Commercially licensed Operating system?
A) Windows B) FEDORA C) UBUNTU D) REDHAT
37. Operating System Interactive provides
A) Graphics User Interface (GUI) B) Data Distribution
C) Security Management D) Real Time Processing
38. An example for single task operating system is
A)Linux B) Windows C) MS-DOS D) Unix
39. The File management system used by Linux is
A) ext2 B) NTFS C) FAT D) NFTS
40. From the options given below, choose the operations managed by the operating system.
(a) Memory (b) Processes (c) Disks and I/O device (d) all of the above
41. Which is the default folder for many Windows Applications to save your file?
(a) My Document (b) My Pictures (c) Documents and Settings (d) My Computer
42. The shortcut key used to rename a file in windows
(a) F2 (b) F4 (c) F5 (d) F6
43. Omitting details inessential to the task and representing only the essential features of the task is known as
(a) specification (b) abstraction (c) composition (d) decomposition
44. Stating the input property and the input-output relation a problem is known
(a) specification (b) statement (c) algorithm (d) definition
45. If 0 < i before the assignment i := i-1 after the assignment, we can conclude that
(a) 0 < i (b) 0 ≤ i (c) i=0 (d) 0>=i
46. Which of the following properties is true after the assignment at line 3?
1 -- i, j = 0
2 i, j := i+1, j -1
3 --?
(a) i+j >0 (b) i+j < 0 (c) i+j =0 (d) I = j 3.
47. If C is false just before the loop, the control flows through 1 S1 2 while C 3 S2 4 S3
1 S1
2 while C
3 S2
4 S3
(a) S1 ; S3 (b) S1 ; S2 ; S3
(c) S1 ; S2 ; S2 ; S3 (d) S1 ; S2 ; S2 ; S2 ; S3
48. If m x a + n x b is an invariant for the assignment a, b : = a + 8, b + 7, the values of m and n are
(a) m = 8, n = 7 (b) m = 7, n = -8 (c) m = 7, n = 8 (d) m = 8, n = -7
49. Which of the following is not an invariant of the assignment? M, n := m+2, n+3
(a) m mod 2 (b) n mod 3 (c) 3 X m – 2 X n (d) 2 X m – 3 X n

..3.. A. Prabhakar - 9442979144


11 – Computer Science
50. If C1 is false and C2 is true, the compound statement
1 if C1
2 S1
3 else
4 if C2
5 S2
6 else
7 S3
(a) S1 (b) S2 (c) S3 (d) none 4.
51. If C is true, S1 is executed in both the flowcharts, but S2 is executed in
(1) (2)

(a) (1) only (b) (2) only


(c) both (1) and (2) (d) neither (1) nor (2)
52. How many times the loop is iterated?
i := 0
while I ≠ 5
i := i + 1
(a) 4 (b) 5 (c) 6 (d) 0
53. If Fibonacci number is defined recursively as

to evaluate F(4), how many times F() is applied?


(a) 3 (b) 4 (c) 8 (d) 9
54. Using this recursive definition{ a n= 1 if n = 0 a x an -1 otherwise how many multiplications are needed
to calculate a10?

(a) 11 (b) 10 (c) 9 d) 8


55. Who developed C++?
(a) Charles Babbage (b) Bjarne Stroustrup
(c) Billgates (d) Sundar Pichai
56. What was the original name given to C++?
(a) CPP (b) Advanced C (c) C with Classes (d) Class with C
57. Who coined C++?
(a) Rick Mascitti (b) Rick Bjarne (c) Bill Gates (d) Dennis Ritchie
58. The smallest individual unit in a program is:
(a) Program (b) Algorithm (c) Flowchart (d) Tokens
59. Which of the following operator is extraction operator in C++?
(a) >> (b) << (c) <> (d) ^^
60. Which of the following is a valid string literal?
(a) ‘A’ (b) ‘Welcome’ (c) 1232 (d) “1232”

..4.. A. Prabhakar - 9442979144


11 – Computer Science
61. A program written in high level language is called as
(a) Object code (b) Source code (c) Executable code (d) All the above
62. Assume a=5, b=6; what will be result of a&b?
(a) 4 (b) 5 (c) 1 (d) 0
63. Which of the following is called as compile time operators?
(a) size of (b) pointer (c) virtual (d) this
64. Which of the following data types is not a fundamental type?
(a) signed (b) int (c) float (d) char
65. What will be the result of following statement? char ch= ‘B’; cout << (int) ch;
(a) B (b) b (c) 65 (d) 66
66. Which of the character is used as suffix to indicate a floating point value?
(a) F (b) C (c) L (d) D
67. How many bytes of memory is allocated for the following variable declaration if you are using Dev C++?
short int x;
(a) 2 (b) 4 (c) 6 (d) 8
68. What is the output of the following snippet? char ch = ‘A’; ch = ch + 1;
(a) B (b) A1 (c) F (d) 1A
69. Which of the following is not a data type modifier?
(a) signed (b) int (c) long (d) short
70. Which of the following operator returns the size of the data type?
(a) sizeof( ) (b) int ( ) (c) long ( ) (d) double ( )
71. Which operator is used to access reference of a variable?
(a) $ (b) # (c) & (d) !
72. This can be used as alternate to endl command:
(a) \t (b) \b (c) \0 (d) \n
73. What is the alternate name of null statement?
(A) No statement (B) Empty statement (C) Void statement (D) Zero statement
74. In C++, the group of statements should be enclosed within:
(A) { } (B) [ ] (C) ( ) (D) < >
75. The set of statements that are executed again and again in iteration is called as:
(A) condition (B) loop (C) statement (D) body of loop
76. The multi way branch statement:
(A) if (B) switch (C) if … else (D) for
77. How many times the following loop will execute?
for (int i=0; i<10; i++)
(A) 0 (B) 10 (C) 9 S (D) 11 7.
78. Which of the following is the exit control loop?
(A) for (B) while (C) do…while (D) if…else
79. Identify the odd one from the keywords of jump statements:
(A) break (B) switch (C) goto (D) continue
80. Which of the following is called entry control loop?
(A) do-while (B) switch (C) while (D) if-else
81. A loop that contains another loop inside its body:
(A) Nested loop (B) Inner loop (C) Inline loop (D) Nesting of loop
82. Which of the following header file defines the standard I/O predefined functions ?
A) stdio.h B) math.h C) string.h D) ctype.h
83. Which function is used to check whether a character is alphanumeric or not.
A) isalpha() B) isdigit() C) isalnum() D) islower()

..5.. A. Prabhakar - 9442979144


11 – Computer Science
84. Which function begins the program execution ?
A) isalpha() B) isdigit() C) main() D) islower()
85. Which of the following function is with a return value and without any argument ?
A) x=display(int, int) B) x=display() C) y=display(float) D) display(int)
86. Which is return data type of the function prototype of add(int, int); ?
A) int B) float C) char D) double
87. Which of the following is the scope operator ?
A) > B) & C) % D) ::
88. Which of the following is the collection of variables of the same type that can referenced by a common
name ?
A) int B) float C) Array D) class
89. int age[]={6,90,20,18,2}; How many elements are there in this array?
A) 2 B) 5 C) 6 D) 4
90. cin>>n[3]; To which element does this statement accept the value?
A) 2 B) 3 C) 4 D)5
91. By default, a string ends with which character?
A) \0 B) \t C) \n D)\b
92. Structure definition is terminated by
(A) : (B) } (C) ; (D)::
93. What will happen when the structure is declared?
(A) it will not allocate any memory (B) it will be declared and initialized
(C) it will allocate the memory (D) it will be only declared
94. A structure declaration is given below.
struct Time
{
int hours;
int minutes;
int seconds;
}t;
Using above declaration which of the following refers to seconds.
(A) Time.seconds (B) Time::seconds (C) seconds (D) t. seconds
95. Which of the following is a properly defined structure?
(A) struct {int num;} (B) struct sum {int num;}
(C) struct sum int sum; (D) struct sum {int num;};
96. A structure declaration is given below.
Struct employee
{
int empno;
char ename[10];
}e[5];
Using above declaration which of the following statement is correct.
(a) cout<<e[0].empno<<e[0].ename;
(b) cout<<e[0].empno<<ename;
(c) cout<<e[0]->empno<<e[0]->ename;
(d) cout<<e.empno<<e.ename;
97. When accessing a structure member ,the identifier to the left of the dot operator is the name of
(a) structure variable (b) structure tag (c) structure member (d) structure function
98. Array of character is
a) String b) Array of strings c) Integer array d) Character array

..6.. A. Prabhakar - 9442979144


11 – Computer Science
99. int matrix[][3]={{10,20,30}, {40,50,60}, {70,80,90}, {100,110,120}};
Which statement is used to print the number 60 in this declaration?
a) cout<<matrix[0][0]; b) cout<<matrix[0][1]; c) cout<<matrix[1][2]; d) cout<<matrix[3][0];
100. float price[3];
How much memory space is allocated for matrix price?
a) 3 bytes b) 6 bytes c) 12 bytes d) 24 bytes
101. The term is used to describe a programming approach based on classes and objects is
(A) OOP (B) POP (C) ADT (D)SOP
102. The paradigm which aims more at procedures.
(A) Object Oriented Programming (B) Procedural programming
(C) Modular programming (D) Structural programming
103. Which of the following is a user defined data type?
(A) class (B) float (C) int (D) object
104. The identifiable entity with some characteristics and behaviour is.
(A) class (B) object (C) structure (D) member
105. The mechanism by which the data and functions are bound together into a single unit is known as
(A) Inheritance (B) Encapsulation (C) Polymorphism (D) Abstraction
106. Insulation of the data from direct access by the program is called as
(A) Data hiding (B) Encapsulation (C) Polymorphism (D) Abstraction
107. Which of the following concept encapsulate all the essential properties of the object that are to be
created?
(A) class (B) Encapsulation (C) Polymorphism (D) Abstraction
108. “Write once and use it multiple time” can be achieved by
(A) redundancy (B) reusability (C) modification (D) composition
109. Which of the following supports the transitive nature of data?
(A) Inheritance (B) Encapsulation (C) Polymorphism (D) Abstraction
110. The variables declared inside the class are known as
(A) data (B) inline (C) method (D) attributes
111. A member function can call another member function directly, without using the dot operator called as
(A) sub function (B) sub member
(C) nesting of member function (D) sibling of member function
112. The member function defined within the class behave like ........ functions
(A) inline (B) Non inline (C) Outline (D) Data
113. Which of the following constructor is executed for the following prototype ?
add display( add &); // add is a class name
(A) Default constructor (B) Parameterized constructor
(C) Copy constructor (D) Non-Parameterized constructor
114. Which of the following refers to a function having more than one distinct meaning?
(A) Function Overloading (B) Member overloading
(C) Operator overloading (D) Operations overloading
115. Which of the following reduces the number of comparisons in a program ?
(A) Function Overloading (B) Operations overloading
(C) Operator overloading (D) Member overloading
116. Which of the following is not true with respect to function overloading?
(A) The overloaded functions must differ in their signature.
(B) The return type is also considered for overloading a function.
(C) The default arguments of overloaded functions are not considered for Overloading.
(D) Destructor function cannot be overloaded.

..7.. A. Prabhakar - 9442979144


11 – Computer Science
117. void dispchar(char ch=’$’,int size=10)
{
for(int i=1;i<=size;i++)
cout<<ch;
}
How will you invoke the function dispchar() for the following input?
To print $ for 10 times
(A) dispchar(); (B) dispchar(ch,size);
(C) dispchar($,10); (D) dispchar(‘$’,10 times);
118. class x {
int y;
public:
x(int z) {y=z;}
} x1[4];
int main() {
x x2(10);
return 0;}
How many objects are created for the above program
(A) 10 (B) 14 (C) 5 (D) 2
119. Which of the following is invalid prototype for function overloading
(A) void fun (intx); (B) void fun (intx);
void fun (char ch) ; void fun (inty);
(C) void fun (double d); (D) void fun (double d);
void fun (char ch); void fun (inty);
120. Based on the following class declaration answer the questions (from9.1 to 9.4)
class vehicle protected:
{ int wheels; int load;
public: public:
void input_data(float,float); void read_data(float,float)
void output_data(); void write_data(); };
protected: class bus: private heavy_vehicle {
int passenger; char Ticket[20];
}; public:
class heavy_vehicle : protected vehicle { void fetch_data(char);
int diesel_petrol; void display_data(); };
9.1. Which is the base class of the class heavy_vehicle?
(a) Bus (b) heavy_vehicle (c) vehicle (d) both (a) and (c)
9.2. The data member that can be accessed from the function displaydata()
(a) passenger (b) load (c) Ticket (d) All of these
9.3. The member function that can
be accessed by an objects of Bus class is
(a) input_data(), output_data() (b) read_data() ,write_data()
(c) fetch_data(), display_data() (d) All of these
9.4. The member function that is inherited as public by Class Bus
(a) input_data(), output_data() (b) read_data(), write_data()
(c) fetch_data(), display_data() (d) none of these
121. Which of the following derives a class student from the base class school
(a) school: student (b) class student : public school
(c) student : public school (d) class school : public student

..8.. A. Prabhakar - 9442979144


11 – Computer Science
122. Which of the following is the process of creating new classes from an existing class
(a) Polymorphism (b) Inheritance (c) Encapsulation (d) super class
123. The type of inheritance that reflects the transitive nature is
(A) Single Inheritance (B) Multiple Inheritance
(C) Multilevel Inheritance (D) Hybrid Inheritance
124. Which visibility mode should be used when you want the features of the base class to be available to the
derived class but not to the classes that are derived from the derived class?
(A) Private (B) Public (C) Protected (D) All of these
125. Inheritance is a process of creating new class from
(A) Base class (B) abstract (C) derived class (D) Function
126. A class is derived from a class which is a derived class itself, then this is referred to as
(A) multiple inheritance (B) multilevel inheritance
(C) single inheritance (D) double inheritance
127. Which amongst the following is executed in the order of inheritance?
(A) Destructor (B) Member function
(C) Constructor (D) Object
128. In inheritance, the new class is
a) Super class b) Sub-class c) Derived class d) (b) or (c)
129. A class without any declaration will have _____ size.
a) 1 byte b) 2 bytes c) 4 bytes d) 10 bytes
130. The default visibility mode is
a) private b) protected c) public d) none
131. When classes are inherited with public, protected or private the _____ of the base class are not inherited.
a) private members b) protected members c) public members d) All of them
132. Which of the following is a set of moral principles that regulate the use of computers ?
(a) piracy (b) programs (c) virus (d) computer ethics
133. Commercial programs made available to the public illegally are known as
(a) freeware (b) warez (c) free software (d) software
134. Which one of the following are self-repeating and do not require a computer program to attach
themselves?
(A) Virus (b) worms (c) spyware (d) Trojans
135. Which one of the following tracks a user visits a website?
(A) spyware (b) cookies (c) worms (d) Trojans
136. A computer network security that monitors and controls incoming and outgoing traffic is
(a) Cookies (b) Virus (c) Firewall (d) worms
137. The process of converting cipher text to plain text is called
(a) Encryption (b) Decryption (c) key (d) proxy server
138. Distributing unwanted e-mail to others is calle(d)
(A) scam (b) spam (c) fraud (d) spoofing
139. Legal recognition for transactions are carried out by
(a) Electronic Data Interchange (b) Electronic Data Exchange
(c) Electronic Data Transfer (d) Electrical Data Interchange

..9.. A. Prabhakar - 9442979144


Two Mark Questions

1. What is a computer? 33. What are modifiers? What is the use of


2. What are the characteristics of a computer? modifiers?
3. What is the function of an ALU? 34. What is meant by type conversion?
4. Write the functions of control unit. 35. What is use of comments statement?
5. Distinguish Primary and Secondary memory. 36. What is a null statement and compound
6. Write note on binary number system. statement?
7. Write the 1’s complement procedure. 37. What is selection statement? Write it’s types?
8. Convert (-57)10 into Binary number. 38. Correct the following code segment:
9. List the encoding systems that represents if (x=1)
characters in memory. p= 100;
10. What is Boolean Algebra? else
11. Write a short note on NAND Gate. p = 10;
12. Draw the truth table for XOR gate. 39. What will be the output of the following code:
13. What are derived gates? int year;
14. What are the parameters which influence the cin >> year;
characteristics of a microprocessor? if (year % 100 == 0)
15. What is a program counter? if ( year % 400 == 0)
16. What is a GUI? cout << “Leap”;
17. What is multi-processing? else
18. What are the different Operating Systems used cout << “Not Leap year”;
in computer? If the input given is (i) 2000 (ii) 2003 (iii) 2010?
19. What are called standard icons? 40. Write a for loop that displays the number from
20. Differentiate Files and Folders. 21 to 30.
21. How will you Rename a File? 41. Write a while loop that displays numbers 2, 4, 6,
22. Define an algorithm. 8…….20.
23. What is the difference between an algorithm and 42. Compare if..else and ?: (ternary) operator.
a program? 43. Compare break and continue statement.
24. What is an invariant? 44. Define Functions.
25. Define a loop invariant. 45. What are importance of void data type.
26. What is meant by a token? Name the token 46. What is Parameter and list its types?
available in C++. 47. Write a note on Local Scope.
27. What are keywords? Can keywords be used as 48. What is inline function?
identifiers? 49. What is Traversal in an Array?
28. Write a short note on const keyword with an 50. What is Strings?
example. 51. What is the syntax to declare two – dimensional
29. Why is char often treated as integer data type? array.
30. What is a reference variable? What is its use? 52. Define structure. What is its use?
31. Determine which of the following are valid 53. Differentiate classes and objects.
constant? And specify their type. 54. What is polymorphism?
(i) 0.5 (ii) ‘Name’ (iii) ‘\t’ (iv) 27,822 55. What are called members?
32. What will be the result of following if num=6 56. What is the difference between the class and
initially. object in terms of OOP?
(a) cout << num; (b) cout << (num==5);
57. Why it is considered as a good practice to define a constructor though compiler can automatically generate
a constructor?
58. Write down the importance of destructor.

..10.. A. Prabhakar - 9442979144


59. What is the size of the objects s1, s2? 64. What is the use of overloading a function?
class sum 65. What is inheritance?
{ 66. What is a base class?
int n1,n2; 67. Why derived class is called power packed class?
public: 68. What is the difference between public and private
void add() visibility mode?
{ 69. What is Harvesting ?
int n3=10; 70. What are Warez?
n1=n2=10; 71. Write a short note on cracking.
} 72. What is a Cookie?
} s1,s2; 73. List the search engines supported by Tamil
60. When copy constructor will execute? language.
61. What is function overloading? 74. What is TSCII?
62. List the operators that cannot be overloaded. 75. Write a short note on Tamil Virtual Academy.
63. What is accessibility?

Three Mark Questions

1. Write the applications of computer.


2. Differentiate optical and Laser mouse.
3. Write short note on impact printer.
4. What is radix of a number system? Give example
5. Convert (150)10 into Binary, then convert that Binary number to Octal
6. Convert (98.46)10 to Binary.
7. Add a) -2210 +1510 b) 2010 +2510
8. Differentiate Computer Organisation from Computer Architecture.
9. Classify the microprocessor based on the size of the data.
10. Write down the classifications of microprocessors based on the instruction set.
11. Differentiate CD and DVD.
12. List out the key features of Operating system
13. Write a note on Recycle bin.
14. Write the two ways to create a new folder.
15. Differentiate copy and move.
16. What is the format of the specification of an algorithm?
17. What is abstraction?
18. What is the difference between assignment operator and equality operator?
19. For the given two flowcharts write the pseudo code.

20. If C is false in line 2, trace the control flow in this algorithm.


1 S1
2 -- C is false

..11.. A. Prabhakar - 9442979144


11 – Computer Science
3 if C
4 S2
5 else
6 S3
7 S4
21. What is case analysis?
22. Describe the differences between keywords and identifiers?
23. Differentiate “=” and “==”.
24.
25. What is the use of a header file?
26. Why is main function special?
27. What are arithmetic operators in C++?
28. Differentiate unary and binary arithmetic operators. Give example for each of them.
29. Evaluate the following C++ expressions where x, y, z are integers and m, n are floating point numbers. The
value of x = 5, y = 4 and m=2.5;
(i) n = x + y / x; (ii) z = m * x + y; (iii) z *= x * m + x;
30. Convert the following if-else to a single conditional statement:
if (x >= 10)
a = m + 5;
else
a = m;
31. Write the syntax and purpose of switch statement.
32. What is the difference between isupper() and toupper() functions ?
33. Write about strcmp() function.
34. Write short note on pow() function in C++.
35. What are the information the prototype provides to the compiler ?
36. What is default arguments ? Give example.
37. Define an Array ? What are the types?
38. Write note an Array of strings.
39. How to access members of a structure? Give example.
40. What is paradigm ? Mention the different types of paradigm.
41. Write a note on the features of procedural programming.
42. List some of the features of modular programming
43. What do you mean by modularization and software reuse?
44. Define information hiding.
45. Write with example how will you dynamically initialize objects?
46. What are advantages of declaring constructors and destructor under public accessibility?
47. What are the rules for function overloading?
48. What is operator overloading? Give some examples of operators which can be overloaded.
49. Discuss the benefits of constructor overloading ?
50. What are the points to be noted while deriving a new class?
51. What do you mean by overriding?
52. Write some facts about the execution of constructors and destructors in inheritance
53. What is the role of firewalls?
54. Write about encryption and decryption.
55. What are the guidelines to be followed by any computer user?
56. What is piracy? Mention the types of piracy?

..12.. A. Prabhakar - 9442979144


Five Mark Questions

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


2. Discuss the various generations of computers.
3. Explain the fundamental gates with expression and truth table.
4. Explain the Derived gates with expression and truth table.
5. Explain the characteristics of a microprocessor.
6. Explain the types of ROM.
7. Explain the process management algorithms in Operating System.
8. Explain the different ways of finding a file or Folder.
9. Write about Binary operators used in C++.
10. What are the types of Errors?
11. Explain control statement with suitable example.
12. What is an entry control loop? Explain any one of the entry-controlled loop with suitable example.
13. Explain Call by value method with suitable example.
14. What is Recursion? Write a program to find the factorial of the given number using recursion.
15. What are the different forms of function return? Explain with example.
16. Explain scope of variable with example. Write a program to accept any integer number and reverse it.
17. What are the advantages of OOPs?
18. Write a note on the basic concepts that supports OOps?
19. Mention the differences between constructor and destructor
20. What are the rules for operator overloading?
21. Explain the different types of inheritance
22. Explain the different visibility mode through pictorial representation
23. What are ethical issues? Name some.
24. What are the various crimes happening using computer?
25. Write the different types of cyber attacks.

C++ PROGRAMS & OUTPUTS


(Do not memorize the outputs. Understand.)

1. Write the output of the following coding.


(a) (b)
int x = 10; int x = 10;
int main() int main()
{ {
int x = 100; int x = 100;
cout<<x; cout<<::x;
} }
Output: Output:
100 10

..13.. A. Prabhakar - 9442979144


11 – Computer Science
2. Write the output of the following coding.
#include<iostream> Output:
using namespace std; 87.2525
int main() 87
{
double var1=87.25255;
cout<<(float)var1<<endl;
cout<<(int)var1<<endl;
}
3. How many times the following loop will execute?
(a) (c) (e)
for ( i=0; i<=10; i++) for ( i=1; i<=10; i++) for ( i=1; i<=10; i+=2)
{} {} Answer: 5 times
Answer: 11 times Answer: 10 times (f)
(b) (d) for ( i=1; i<=10; i++);
for ( i=0; i<10; i++) for ( i=1; i<10; i++) Answer: 10 times
{} {}
Answer: 10 times Answer: 9 times
4. Write the output of the following coding.
#include<iostream>
#include<stdio>
#include <string>
#include<conio>
using namespace std;
struct books {
char name[20], author[20];
} a[50];
int main()
{
clrscr();
cout<< "Details of Book No " << 1 << "\n";
cout<< "------------------------\n";
cout<< "Book Name :"<<strcpy(a[0].name,"Programming ")<<endl;
cout<< "Book Author :"<<strcpy(a[0].author,"Dromy")<<endl;
cout<< "\nDetails of Book No " << 2 << "\n";
cout<< "------------------------\n";
cout<< "Book Name :"<<strcpy(a[1].name,"C++programming" )<<endl;
cout<< "Book Author :"<<strcpy(a[1].author,"BjarneStroustrup ")<<endl;
cout<<"\n\n";
cout<< "================================================\n";
cout<< " S.No\t| Book Name\t|author\n";
cout<< "=====================================================";
for (int i = 0; i < 2; i++) {
cout<< "\n " << i + 1 << "\t|" << a[i].name << "\t| " << a[i].author;
}
cout<< "\n=================================================";
return 0;
}

..14.. A. Prabhakar - 9442979144


11 – Computer Science
Output:
Details of Book No 1
------------------------
Book Name :Programming
Book Author :Dromy
Details of Book No 2
------------------------
Book Name :C++programming
Book Author :BjarneStroustrup

================================================
S.No | Book Name |author
=====================================================
1 |Programming | Dromy
2 |C++programming | BjarneStroustrup
=================================================
5. Write the output of the following coding.
#include <iostream>
#include <string> Output:
using namespace std; First Student
roll no : 1
struct student
name : Brown
{ phone no : 123443
int roll_no; Second Student
char name[10]; roll no : 2
long phone_number; name : Sam
}; phone no : 1234567822
int main(){ Third Student
student p1 = {1,"Brown",123443}; roll no : 3
name : Addy
student p2, p3;
phone no : 1234567844
p2.roll_no = 2;
strcpy(p2.name ,"Sam");
p2.phone_number = 1234567822;
p3.roll_no = 3;
strcpy(p3.name,"Addy");
p3.phone_number = 1234567844;
cout<< "First Student" <<endl;
cout<< "roll no : " << p1.roll_no <<endl;
cout<< "name : " << p1.name <<endl;
cout<< "phone no : " << p1.phone_number <<endl;
cout<< "Second Student" <<endl;
cout<< "roll no : " << p2.roll_no <<endl;
cout<< "name : " << p2.name <<endl;
cout<< "phone no : " << p2.phone_number <<endl;
cout<< "Third Student" <<endl;
cout<< "roll no : " << p3.roll_no <<endl;
cout<< "name : " << p3.name <<endl;
cout<< "phone no : " << p3.phone_number <<endl;
return 0;
}

..15.. A. Prabhakar - 9442979144


11 – Computer Science
6. Write the output of the following coding.
#include<iostream>
using namespace std; Output:
class student Constructor
{ Name: Bharathi
int rno, marks;
public: Roll no : 14
student(int r,int m) Marks : 100
{
cout<<"Constructor "<<endl; Back to Main
rno=r;
marks=m; }
void printdet()
{
marks=marks+30;
cout<<"Name: Bharathi"<<endl;
cout<<"Roll no : "<<rno<<"\n";
cout<<"Marks : "<<marks<<endl; }
};
int main(){
student s(14,70);
s.printdet();
cout<< "Back to Main";
return 0;
}
7. Write the output of the following coding.
#include<iostream>
using namespace std;
Output:
class Seminar Seminar starts now
{ Welcome to Seminar
int Time; Recap of Previous Seminar Content
public: Lectures in the seminar on
Seminar() Vote of thanks
{ Vote of thanks
Time=30; Vote of thanks
cout<<"Seminar starts now" <<endl; }
void Lecture()
{
cout<<"Lectures in the seminar on"<<endl; }
Seminar(int Duration)
{
Time=Duration;
cout<<"Welcome to Seminar "<<endl;
}
Seminar(Seminar &D)
{
Time=D.Time;
cout<<"Recap of Previous Seminar Content "<<endl; }

..16.. A. Prabhakar - 9442979144


11 – Computer Science
~Seminar()
{
cout<<"Vote of thanks"<<endl;
}
};
int main()
{
Seminar s1,s2(2),s3(s2);
s1.Lecture();
return 0;
}
8. Answer the questions based on the following program.
#include<iostream> cout<<"\nEnter Second String:";
#include<string.h> cin>>string2;
using namespace std; ob1.getstring(string2);
class comp ob==ob1;
{ return 0;
public: }
char s[10]; i. Mention the objects which will have the scope
void getstring(char str[10]) till the end of the program.
{ ob, ob1
strcpy(s,str); ii. Name the object which gets destroyed in
} between the program.
void operator==(comp); The object ob in the overloaded operator
}; definition “operator==(comp ob)”
void comp :: operator==(comp ob) iii. Name the operator which is over loaded and
{ write the statement that invokes it.
if (strcmp(s,ob.s)==0) ✓ Overloaded operator : ==
cout<<"\n Strings are Equal"; ✓ Overloaded operator invokes the
else statement: ob==ob1;
cout<<"\n Strings are not Equal"; iv. Write out the prototype of the overloaded
} member function
int main() void operator==(comp);
{ v. What types of operands are used for the
comp ob, ob1; overloaded operator?
char string1[10], string2[10]; The objects ob and ob1 created by the class are
cout<<"Enter First String:"; used as operands for the overloaded operator.
cin>>string1;
ob.getstring(string1);

vi. Which constructor will get executed in the above program? Write the output of the program
Default constructor gets executed.
Output 1: Output 2:
Enter First String : TEXT Enter First String : TEXT
Enter Second String : BOOK Enter Second String : BOOK
Strings are not Equal Strings are not Equal

..17.. A. Prabhakar - 9442979144


11 – Computer Science
9. Consider the following c++ code and answer the questions.
class Personal
{
int Class, Rno;
char Section;
protected:
char Name[20];
public:
personal();
void pentry();
void Pdisplay();
};
class Marks:private Personal
{
float M[5];
protected:
char Grade[5];
public:
Marks();
void Mentry();
void Mdisplay();
};
class Result:public Marks
{
float Total,Agg;
public:
char FinalGrade, Commence[20];
Result();
void Rcalculate();
void Rdisplay();
}:
3.1. Which type of Inheritance is shown in the program?
Multilevel Inheritance
3.2. Specify the visibility mode of base classes.
❖ Mark class – private
❖ Result class - public
3.3 Give the sequence of Constructor/ Destructor Invocation when object of class Result is created.
❖ Constructor execution order → personal(), Marks(), Result()
❖ Destructor execution order → Result(), Marks(), personal()
3.4 Name the base class(/es) and derived class (/es).
❖ Base classes : personal, Marks
❖ Derived classes : Marks, Result
3.5 Give number of bytes to be occupied by the object of the following class:
Turbo C++ Dev C++
(a) Personal : 25 Bytes 29 Bytes
(b) Marks: 50 Bytes 54 Bytes
(c) Result: 79 Bytes 83 Bytes

..18.. அ. பிரபாகர் - 9442979144


11 – Computer Science
3.6. Write the names of data members accessible from the object of class Result.
FinalGrade, Commerce
3.7. Write the names of all member functions accessible from the object of class Result.
Rcalculate(), Rdisplay()
Mentry(), Mdisplay()
3.8 Write the names of all members accessible from member functions of class Result.
Total, Agg, FinalGrade, Commence and Grade
10. Write the output of the following coding
#include<iostream>
using namespace std; Output:
class A I am class A
{
I am class A
protected: x = 30
int x; y = 20
public:
void show() Bye
{ Bye
cout<<"x = "<<x<<endl; Bye
} Bye
A()
{
cout<<endl<<"I am class A "<<endl;
}
~A()
{
cout<<endl<<"Bye ";
cout<<endl<<"Bye ";
}};
class B : public A
{
protected:
int y;
public:
B(int x, int y)
{
this->x = x; //this -> is used to denote the objects datamember
this->y = y; //this -> is used to denote the objects datamember
}
B()
{
cout<<endl<<"I am class B "<<endl;
}
~B(){}
void show()
{
cout<<"x = "<<x<<endl;
cout<<"y = "<<y<<endl;
}};

..19.. அ. பிரபாகர் - 9442979144


11 – Computer Science
int main()
{
A objA;
B objB(30, 20);
objB.show();
return 0;
}
11. Debug the following program.
Error Program Correct Program
%include(iostream.h) #include<iostream>
#include<conio.h> #include<conio.h>
class A() class A
{ public; {
int a1,a2:a3; public:
void getdata[] int a1, a2, a3;
{ a1=15; a2=13; a3=13; } } void getdata()
class B:: public A() {
{ PUBLIC a1=15;
voidfunc() a2=13;
{ int b1:b2:b3; a3=13;
A::getdata[]; }
b1=a1; };
b2=a2; class B : public A
a3=a3; {
cout<<b1<<’\t’<<b2<<’t\’<<b3; } public:
void main() void func()
{ B der; {
der1:func(); } int b1, b2, b3;
A::getdata();
b1 = a1;
b2 = a2;
b3 = a3;
cout<<b1<<”\t”<<b2<<”\t”<<b3;
}
};
void main()
{
B der;
der.func();
}

Wish You All The Best!

Prabhakar A (aprabhakarmca.blogspot.com)

..20.. அ. பிரபாகர் - 9442979144

You might also like