This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 97101. |
Mr. Alvis took a photograph by using his mobile phone and he sends that photograph to his friend by using blue tooth. What is Bluetooth? Explain. |
|
Answer» This technology uses radio waves in the frequency range of 2.402 GHz to 2.480 GHz. And transmit data in short distance. Mobile phones, Laptops, tablets etc use Bluetooth technology to transmit data. By using Bluetooth Dongle(a small device that can be buy from the shop) we can convert non Bluetooth PC into Bluetooth enabled and transmits data with data transmission rate of 3 Mbs onwards. |
|
| 97102. |
From the following which is known as a string terminator. (а) ‘\0’ (b) ‘\a’ (c) ‘As’ (d) ‘\t’ |
|
Answer» ‘\0’ is known as a string terminator. |
|
| 97103. |
To write a C++ program, from the following which statement is a must (a) sum() (b) main() (c) #include (d) #include |
|
Answer» (b) main(). A C++ program must contains at least one main() function |
|
| 97104. |
Reserved words for the compiler is..... (a) Literals (b) Identifier (c) Keywords (d) None of these |
|
Answer» Reserved words for the compiler is Keywords. |
|
| 97105. |
Find the odd one out from each group and justify. 1. Cardiac, Villi, Fundic, Pyloric2. Duodenum, Jejunum, ileum, villi 3. Parotid, gastric, sublingual, submaxillary |
|
Answer» 1. Villi: Cardiac, fundic and pyloric are the three major parts of stomach. But villi are small finger like foldings in the intestine. 2. Villi: Duodenum, jejunum and ileum are three regions of intestine but villi are small finger like foldings inside the intestine. 3. Gastric: Parotid, Sublingual and submaxillary are three pairs of salivary gland produce saliva. But gastric gland is stomach gland produce gastric juice. |
|
| 97106. |
The execution of a program ends with ......... function. |
|
Answer» The execution of a program ends with main( ) function. |
|
| 97107. |
Identify the invalid literals from the following and write a reason for each: 1. 2E3.5 2. “9” 3. ‘hello’ 4. 55450 |
|
Answer» 1. Invalid, because exponent part should not be a floating point number 2. valid |
|
| 97108. |
From the following select the input operator (а) >> (b) <<(c) >(d) < |
|
Answer» >> is the input operator. |
|
| 97109. |
The human intestine is long because (a) Bacteria in food can be killed gradually (b) It increases surface are for absorption of food (c) It provides more space for food storage (d) None of these |
|
Answer» (b) It increases surface area for absorption of food. |
|
| 97110. |
From the following select the output operator (a) >> (b) <<(c) >(d) < |
|
Answer» << is the output operator. |
|
| 97111. |
Ajo wants to print a matter in a new line. Which escape sequence is used for this? a) \a b) \n c) \s d)None of these |
|
Answer» \n sequence is used for this. |
|
| 97112. |
State True / FalseComment statements are ignored by the compiler |
|
Answer» Comment statements are ignored by the compiler True |
|
| 97113. |
The execution of a program starts at ....... function. |
|
Answer» The execution of a program starts at main( ) function. |
|
| 97114. |
After observing the model of the lumen of human intestine your friend said that “the villi projected into the lumen actually block the movement of food through the intestine, if the villi are absent food can easily pass through the intestine.” How will you respond to this comment? |
|
Answer» Villi actually decrease the movement of chyme. The function of villi is to increase the surface area of the intestine for the absorption of digested nutrients. |
|
| 97115. |
Identify whether the following are valid identifiers or not? If not give the reason. 1. Break 2. Simple. interest |
|
Answer» 1. Break – It is valid( break is the keyword, not Break); 2. Simple. interest – It is not valid, because dot(.) is used. |
|
| 97116. |
Gastric glands are formed of three types of secretory cells. Name them and mention their function. |
|
Answer» 1. Mucous cell – Secrete mucus 2. Chief cells – Secrete proteolytic enzyme Pepsin 3. Parietal cells – Secrete HCL |
|
| 97117. |
Mr. Dixon declared a variable as follows int 9age. Is it a valid identifier. If not briefly explain. the rules for naming an identifier. |
|
Answer» It is not a valid identifier because it violates the rule The rules for naming an identifier is as follows: 1. It must be start with a letter(alphabet) 2. Under score can be considered as a letter 3. White spaces and special characters cannot be used. 4. Key words cannot be considered as an identifier |
|
| 97118. |
More than one input/output operator in a single statement is called ......... |
|
Answer» Cascading of I/O operator |
|
| 97119. |
State True / False . Comment statements are ignored by the compiler. |
|
Answer» The statement is True. |
|
| 97120. |
To represent null character...... is used. a) \n b) \0 c) \f d) \s |
|
Answer» To represent null character \0 is used. |
|
| 97121. |
Consider the following C = A + B. Here A and B are called ....... a) Operand b) Operator c) Variable d) None of these |
|
Answer» C = A + B. Here A and B are called Operand. |
|
| 97122. |
Given a word ” Mathematics”. How will you locate this word in a standard dictionary. What are the steps used for this purpose |
|
Answer» In the standard dictionary the words are arranged in sorted order so binary search method is more suitable to find the word “MATHEMATICS”. |
|
| 97123. |
Is 0X85B a valid integer constant in C++? If yes why? |
| Answer» Yes. It is a hexadecimal number. | |
| 97124. |
Give below in bracket are the names of some digestive enzymes group them into A – Gastric, B – Pancreatic and C – Intestinal (Trypsin, Dipeptidase, Rennin, Maltase, Pepsin, Chymotrypsin, Nuclease, Amylase) |
||||||||||||
Answer»
|
|||||||||||||
| 97125. |
More-than one input / output operator in a single statement is called .......... |
|
Answer» Cascading of I/O operator |
|
| 97126. |
From the following which is not a character constant. а) ‘c’ b) ‘e’ c) ‘d’ d) “c” |
|
Answer» d) “c”, It is a string constant the others are character constant. |
|
| 97127. |
Symbols used to perform an operation is called ......a) Operand b) Operator c) Variable d) None of these |
|
Answer» Symbols used to perform an operation is called Operator. |
|
| 97128. |
Find the odd one out and justify your answer.Salivary gland, milk gland, gastric gland, thyroid gland. |
|
Answer» Thyroid gland. Thyroid gland is an endocrine gland. All others are exocrine gland. |
|
| 97129. |
Is 0x85B a valid integer constant in C++? If yes why ? |
|
Answer» Yes. It is a hexa decimal number |
|
| 97130. |
In School Assembly, try to arrange all the students in your class according to the increasing order of their heights separately for male/female students. Smallest one will be in front and tallest one at the last position. Write sequential steps for doing this, in two different methods. |
|
Answer» Arranging elements from smallest to largest (ascending) or largest to smallest(descending) is called sorting. There are two sorting methods 1. Bubble sort: It is a simple sorting method. In this sorting considering two adjacent elements if it is out of order, the elements are interchanged. After the first iteration the largest(in the case of ascending sorting) or smallest(in the case of descending sorting) will be the end of the array. This process continues. 2. Selection sort: In selection sort the array is divided into two parts, the sorted part and unsorted part. First smallest element in the unsorted part is searched and exchanged with the first element. Now there is 2 parts sorted part and unsorted part. This process continues. |
|
| 97131. |
From the following which is a valid declaration. а) int 91; b) int x; c) int 9x; d) int “x”; |
|
Answer» intx is a valid declaration. |
|
| 97132. |
Consider the following declaration int mark[200]. The index of the first element is ...... |
|
Answer» The index of the first element is 0. |
|
| 97133. |
How can you find out the word “MATHEMATICS” from a text book. Which is the most convenient method? Justify your answer. |
|
Answer» In a text book the words are not arranged in sorted order so linear search method is convenient. |
|
| 97134. |
From the following which is not true for an array. (a) It is easy to represent and manipulate array variable (b) Array uses a compact memory structure (c) Readability of program will be increased (d) Array elements are dissimilar elements |
|
Answer» (d) Array elements are dissimilar elements |
|
| 97135. |
Whether the statement char text[] = “COMPUTER”; is True/False? Justify |
|
Answer» It is a single dimensional array. If the user doesn’t specify the size the operating system allocates the number of characters + one (for null character for text) bytes of memory. So here OS allocates 9 bytes of memory. |
|
| 97136. |
Consider the following declaration. int mark[200] The index of the last element is |
|
Answer» The index of the last element is 199 |
|
| 97137. |
Consider the following declaration. int mark(50) Is it valid? If no give the correct declaration |
|
Answer» It is not valid. The correct declaration is as follows, int mark[50]. Use square brackets instead of parenthesis |
|
| 97138. |
Explain the needs for arrays Array |
|
Answer» Array is collection of same type of elements. With the same name we can store more elements. The elements are distinguished by using its index or subscript. To store 50 marks of 50 students we have to declare 50 variables, it is a laborious work. Hence the need for arrays arise. By using array this is very easy as follows int mark[50]. Here the index of first element is 0, then 1, 2, 3, etc upto 49. |
|
| 97139. |
Given a word “COMPUTER”, write a C++ program to reverse the word without using any string functions. |
|
Answer» #include<iostream> using namespace std; int main(() { char a[9] = “COMPUTER”; inti; for (i=8; i>=0; i- -) { cout<<a[i]; } } |
|
| 97140. |
Write the names of two searching methods in arrays. Prepare a chart that shows the comparisons of two searching methods. |
|
Answer» It is the process of finding the position of the given element. 1. Linear search: In this method each element of the array is compared with the element to be searched starting from the first element. If it finds the position of the element in the array is returned. 2. Binary search: It uses a technique called divide and conquer method. It can be performed only on sorted arrays. First we check the element with the middle element. There are 3 possibilities. The first possibility is the searched element is the middle element then search can be finished. The second possibility is the element is less than the middle value so the upper bound is the middle element. The third possibility is the element is greater than the middle value so the lower bound is the middle element. Repeat this process. |
|
| 97141. |
Four friends are in a queue for watching a movie. How can you locate a particular person from that queue? Write all the steps sequentially. |
|
Answer» Locate a particular person from a queue can be carried out by using two ways. 1. Linear search: In this method each element of the array is compared with the element to be searched starting from the first element. If it finds the position of the element in the array is returned. 2. Binary search: It uses a technique called divide and conquer method. It can be performed only on sorted arrays. First we check the element with the middle element. There are 3 possibilities. The first possibility is the searched element is the middle element then search can be finished. The second possibility is the element is less than the middle value so the upper bound is the middle element. The third possibility is the element is greater than the middle value so the lower bound is the middle element. Repeat this process. |
|
| 97142. |
Read the following C++ statement: int AR[10] How many bytes will be allocated for this array? |
|
Answer» To store an integer 4 bytes needed so AR[10] needs 10 × 4 = 40 bytes |
|
| 97143. |
int num[10]; The above C++ statement declares an array named num that can store maximum .......... integer numbers.(а) 9 (b) 10 (c) N (d) none of these |
|
Answer» The above C++ statement declares an array named num that can store maximum 10 integer numbers. |
|
| 97144. |
Write a C++ statement that defines a string variable called ‘name’ that can hold a string of up to 20 characters. |
|
Answer» char name[21j; |
|
| 97145. |
When a multidimensional array is accessed, each array index is ........... (a) Separated by column. (b) Surrounded by brackets and separated by commas. (c) Separated by commas and surrounded by brackets. (d) Surrounded by brackets, |
|
Answer» (d) surrounded by brackets |
|
| 97146. |
Define an array. Also write an algorithm for searching an element in the array using any one method that you are familiar with. |
|
Answer» An array is a collection of elements with same data type. The index of first element is 0 (zero) and the index of last element is size -1. There are 2 methods linear search and binary search. Searching: It is the process of finding the position of the given element. 1. Linear search: In this method each element of the array is compared with the element to be searched starting from the first element. If it finds the position of the element in the array is returned. 2. Binary search: It uses a technique called divide and conquer method. It can be performed only on sorted arrays. First we check the element with the middle element. There are 3 possibilities. The first possibility is the searched element is the middle element then search can be finished. The second possibility is the element is less than the middle value so the upper bound is the middle element. The third possibility is the element is greater than the middle value so the lower bound is the middle element. Repeat this process.8.3 Two dimensional (2D) arrays. Some occasions we have to store 6 different marks of 50 students. For this we use 2D arrays. An array with two subscripts is used, eg. int mark[r][c]; Here r is the row and c is the column. |
|
| 97147. |
Suppose you are given Total mark of 50 students in a class 1. How will you store these values using ordinary variable? 2. Is there any other efficient way to store these values? Give reason. |
|
Answer» We have to declare 50 variables individually to store total marks of 50 students. It is a laborious work. Hence we use array, it is an efficient way to declare 50 variables. With a single variable name we can store multiple elements. eg: int mark[50]. Here we can store 50 marks. The first mark is in mark[0], second is in mark[1]…. etc the fiftieth mark is in mark[49], |
|
| 97148. |
Element mark[6] is which element of the array? (a) The sixth (b) the seventh (c) the eighth (d) impossible to tell |
|
Answer» (b) the seventh |
|
| 97149. |
The elements of an array of size ten are numbered from ......... to ............ |
|
Answer» The elements of an array of size ten are numbered from 0 to 9 |
|
| 97150. |
What are priority Queues? How can priority queues be implemented? Explain in brief. |
|
Answer» Priority Queues:- There are some queues in which we can insert items or delete items from any position based on some property. Now, those queues based on the property of priority of the task to be processed are referred to as priority queues. To implement a priority queue we first need to identify different levels of priority and categorize them as the least priority through the most priority level. After having identified the different levels of priority required, we then need to classify each incoming item (job) as to what priority level should be assigned to it. While creating the queues, we need to create n queues if there are n priority levels defined initially. Let suppose there are three priority levels identified as P1, P2, and P3. In this case we would create three queues as Q1, Q2 and Q3 each representing priority levels P1, P2, and P3 respectively. Now every job would have a priority level assigned to them. Jobs with priority level as P1 will be inserted in Q1. Jobs with priority level P2 are inserted in Q2 and so on. Each queue will follow FIFO behavior strictly. Jobs are always removed from the front end of any queue. Elements in the queue Q2 are removed only when Q1 is empty and the elements of the queue Q3 are only removed when Q2 is empty and so on. |
|