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.
| 11551. |
The average case complexity of Insertion Sort is(A) O(2n )(B) O(n3 )(C) O(n2 ) (D) O(2n) |
|
Answer» Correct option- (C) O(n 2 ) |
|
| 11552. |
Income tax paid by the business is not a business expenditure and is treated as ….(a) Capital (b) Drawings (c) Revenue (d) Expense |
|
Answer» (b) Drawings |
|
| 11553. |
The_________contain all of the components offered by the Swing API. |
|
Answer» The answer is Palette. |
|
| 11554. |
….. is the programming software. (a) DOS (b) Windows (c) UBUNTU (d) PASCAL |
|
Answer» The correct answer is : (d) PASCAL |
|
| 11555. |
What will be displayed in jTextField1 and jTextField2 after the following code is executed: int number = 12; if (number <15) { jTextField1.setText(""+ number) ; number++; jTextField2.setText(""+ number) ; } else { jTextField1.setText("number1”) ; number++; jTextField2.setText("number2”) ; } |
|
Answer» The answer is 12 13 |
|
| 11556. |
Ms. Sharma works as a programmer in “ABC Car Rental Company” where she has designed a software to compute charges to be paid by the client. A screenshot of the same is shown below:A client can take any car out of Deluxe/ SemiDeluxe/ Ordinary for rent. A client can also opt for services of a guide. Charges vary depending on the type of car opted. Charges of services of Guide are extra. Help Ms. Sharma in writing the code to do the following:After selecting appropriate Radio Button and checkbox (if required), when ‘CALCULATE’ button is clicked, Amount, Guide Charges and Total Amount should be calculated and displayed in the respective text fieldsCategory of CarAmount (In Rs.)Deluxe Car1000 per daySemi deluxe car800 per dayOrdinary car700 per dayAmount is obtained by multiplying per day charges of Car with number of days for which the car is taken. If ‘Guide Required’ checkbox is selected, Guide charges per day are Rs.500.00. Guide Charges is calculated as :Car required for No. of days * 500; Total Amount = Amount + Guide Charges |
|
Answer» // Calculation of Amount if (jRadioButton1.isSelected()) jTextField3.setText("" + 1000* Integer.parseInt(jTextField2.getText())); if (jRadioButton2.isSelected() jTextField3.setText("" + 800* Integer.parseInt(jTextField2.getText())); if (jRadioButton3.isSelected()) jTextField3.setText("" + 700* Integer.parseInt(jTextField2.getText())); //Calculation of Guide Charges if(jCheckBox1.isSelected()) jTextField4.setText("" + 500* Integer.parseInt(jTextField2.getText())); //Total Amount jTextField5.setText("" + (Integer.parseInt(jTextField3.getText())+ Integer.parseInt(jTextField4.getText()))); (ii) When ‘CLEAR’ button is clicked, all the textfields and checkboxes should be cleared. jTextField1.setText(""); jTextField2.setText(""); jTextField3.setText(""); jTextField4.setText(""); jTextField5.setText(""); jTextField6.setText(“”); jCheckBox1.setSelected(false); (iii) When ‘CLOSE’ button is clicked, the application should close. System.exit(0); |
|
| 11557. |
Deepti works as a programmer in a travel company. She has developed the following code to display travel detail according to user’s choice. Help her in rewriting the same code using SWITCH CASE: if(choice==1) jTextField1.setText(“New Delhi to Goa”); else if(choice==2) jTextField1.setText(“New Delhi to Paris”); else if(choice==3) jTextField1.setText(“New Delhi to Bangkok”); else jTextField1.setText(“Pl. choose valid option”); |
|
Answer» switch(choice) { case 1: jTextField1.setText(“New Delhi to Goa”); break; case 2: jTextField1.setText(“New Delhi to Paris”); break; case 3: jTextField1.setText(“New Delhi to Bangkok”); break; default: jTextField1.setText(“Pl. choose valid option”); } |
|
| 11558. |
Which one is matched correctly? (a) Finacle – banking software (b) DOS – programming software (c) COBOL – operating software (d) MS – Office – specific purpose software |
|
Answer» (a) Finacle – banking software |
|
| 11559. |
Satyam is designing a frame in Netbeans containing list box. Help him in writing suitable Java statement to extract selected item from a given listbox named “jList1.” ( |
|
Answer» jList1.getSelectedIValue(); |
|
| 11560. |
While working in Netbeans, Ms. Sonia has designed a login page where she wants to display “Welcome” or “Try again” message depending on the password entered by the user in text field named ‘jTexField1’. If password entered is “India”, ‘Welcome’ message should be displayed otherwise ‘Try again’ message should be displayed. Help her in choosing more appropriate statement out of 'If statement' and 'Switch statement'. |
|
Answer» IF statement as String matching can only be done through if statement. |
|
| 11561. |
Following is a list of programming languages: BASIC, COBOL, C, JAVA Help Sandhya in identifying Object Oriented language(s) from the above given list. |
|
Answer» The answer is Java |
|
| 11562. |
Ashish and Dutta were partners in a firm sharing profits in 3:2 ratio. On Jan. 01, 2015 they admitted Vimal for 1/5 share in the profits. The Balance Sheet of Ashish and Dutta as on Jan. 01, 2016 was as follows: It was agreed that: (i) The value of Land and Building be increased by Rs. 15,000. (ii) The value of plant be increased by 10,000. (iii) Goodwill of the firm be valued at Rs. 20,000. (iv) Vimal to bring in capital to the extent of 1/5th of the total capital of the new firm. Record the necessary journal entries and prepare the Balance Sheet of the firm after Vimal’s admission. |
| Answer» Correct Answer - Gain on Revaluation Rs. 25,000. Balance Sheet Total Rs. 2,25,000 | |
| 11563. |
What is computer? |
|
Answer» Computer is an electronics device it's work on input instructions. and after processing get output.
|
|
| 11564. |
Binding two values together into one can be considered as |
|
Answer» Pair is used to combine together two values which may be different in type. |
|
| 11565. |
Is it possible to initialize a variable at the time of execution. What kind of initialization is this? Give an example |
|
Answer» Yes it is possible. This is known as Dynamic initialization. The example is given below eg: int a = 10, b = 5; int c = a*b; here the variable c is declared and initialized with the value 10*5. |
|
| 11566. |
The content of a variable, is called ........ |
|
Answer» R-value (Read value) of a variable |
|
| 11567. |
P,Q and R share profit and losses in the ration of 4:3:2 respectively. Q retires and P and R decided to share future profits and losses in the ratio of 5:3. Then immediately H is admitted of 3/10 shares of profits half of which was gifted by P an remaining shares was taken by H equally form P and R. Calculate the new profit sharing ratio after H' admission and gain ratio of P and R. |
|
Answer» Old ratio (P, Q and R) = 4 : 3 : 2 New Ratio (P and R) = 5 : 3 Gaining ratio = New ratio - Old ratio P's gain = (5/8) - (4/9) = 13/72 R's gain = (3/8) - (2/9) = 11/72 On H's admission : Old ratio (P and R) = 5 : 3 H is admitted for 3/10 shares P's sacrifice in favour of H = (3/10) x (3/4) = 9/40 ......(1/2 + 1/4 = 3/4) R's sacrifice in favour of H = (3/10) x (1/4) = 3/40 New ratio = Old ratio - sacrificing ratio P's new share = (5/8) - (9/40) = 16/40 R's new share = (3/8) - (3/40) = 12/40 H's share = P's sacrifice + R's sacrifice = (9/40) + (3/40) = 12/40 Therefore, new ratio of P, R and H is 16 : 12 : 12 or 4 : 3 : 3 |
|
| 11568. |
Is it possible to declare a variable in between the program as and when the need arise? Then what is it? |
|
Answer» Yes it is possible to declare a variable in between the program as and when the need arise. It is known as dynamic initialisation. eg. int x = 10, y = 20; int z = x*y; |
|
| 11569. |
Suppose the address of a variable age is 1001 and the content i.e. age = 33. Then what is R-value and L-value? |
|
Answer» R-value is 33 and L-value is 1001 |
|
| 11570. |
In the following program, some lines are missing. Fill the missing lines and complete it.#include<iostream.h> {4 int num1, num2, sum; Cout<<“Enter two numbers:”;…………..………….Cout<<"sum of numbers are=”<<sum; } |
|
Answer» The correct program is given below. #include<iostream> using namespace std; int main() { int num1, num2, sum; Cout<<“Enter two numbers:”; cin>>num1>>num2; sum = num1+num2; Cout<<"sum of numbers are=”<<sum; } |
|
| 11571. |
Supposing you find two people arguing: One is saying globalisation has hurt our country's development. The other is telling, globalisation is helping India develop. How would you respond to these organisations? |
|
Answer» Globalisation has hurt our country's development because: firstly, it has led to the annihilation of small producers who face stiff competition from cheaper imports. Secondly, workers no longer have job security and are employed "flexibly". Globalisation is helping India develop on account of the following reasons: firstly, the competition it entails has led to rise in the quality of products in the market. Secondly, it has made available a wider variety of goods in the market, for the buyer to choose from. Now, imported goods are easily available alongside domestic products. |
|
| 11572. |
We’ll have to sell the piano, darling. It ______ (occupies) too much room. A) makes out B) takes up C) takes awayD) fills in |
|
Answer» Correct option is B) takes up |
|
| 11573. |
Most schools in England ______ at the end of July. A) break up B) break down C) break off D) break with |
|
Answer» Correct option is B) break down |
|
| 11574. |
From the following which data type uses 4 bytes of memory. (a) float (b) short (c) char (d) double |
|
Answer» float uses 4 bytes of memory. |
|
| 11575. |
is it possible to declare a variable as and when a need arise . What kind of declaration is this ? |
|
Answer» Yes. lt is known as Dynamic declaration |
|
| 11576. |
char data type ......... uses bytes of memory. (a) 1 (b) 3 (c) 7 (d) 8 |
|
Answer» char data type 1 uses bytes of memory. |
|
| 11577. |
Integer data type uses ........... bytes of memory. (a) 5 (b) 2 (c) 3 (d) 4 |
|
Answer» Integer data type uses 4 bytes of memory |
|
| 11578. |
I was ______ with Alvin for arguing with the waiter about our bill. A) put out B) put off C) put down D) put on |
|
Answer» Correct option is A) put out |
|
| 11579. |
Expand ASCII ........ |
|
Answer» American Standard Code for Information Inter-change |
|
| 11580. |
From the following which is not true , to give a variable name. a) Starting letter must be an alphabet b) contains digits c) Cannot be a key word d) special characters can be used |
|
Answer» d) special characters can be used |
|
| 11581. |
Emerin wants to store a constant value. Which key word is used for this? |
|
Answer» constant word is used for this. |
|
| 11582. |
From the following which data type uses 4 bytes of memory a) float b) short c) char d) double |
|
Answer» float data type uses 4 bytes of memory |
|
| 11583. |
Raju wants to add value 1 to the variable ‘p’ and store the new value in ‘p’ itself. Write four different statements in C++ to do the task. |
|
Answer» 1)P=P+1; 2) p++;(post increment) 3) ++p; (pre increment) 4) p+=1; (short hand in C++) |
|
| 11584. |
Ramu wants to store the value of From the following which is correct declaration a) char pi=3.14157 b) int pi=3.14157 c) float pi=3.14157 d) long pi=3.14157 |
|
Answer» c) float pi=3.14157 |
|
| 11585. |
Alvin wants to store the value of π From the following which is correct declaration a) char pi=3.14157 b) const int pi=3.14157 c) const float pi=3.14157 d) long pi=3.14157 |
|
Answer» c) const float pi=3.14157 |
|
| 11586. |
Classify the following data types. int array function char pointer void float double structure |
|
Answer» Fundamental data types int float double void char Derived data types array function pointer structure |
|
| 11587. |
Integer data type uses Integer data type ; a) 5 b) 2 c) 3 d)4 |
|
Answer» Integer data type uses Integer data type is 4. |
|
| 11588. |
Sheela wants to store her age. From the following which is the exact data type. a) void b) char c) int d) double |
|
Answer» int is the exact data type. |
|
| 11589. |
The function used to read a character from a file that has been opened in read mode is(A) putc(B) getc(C) getchar(D) putchar |
|
Answer» Correct option - (B) getc Explanation:- getc is used to read a character from a file that has been |
|
| 11590. |
Why is C standard library needed? |
|
Answer» C Standard Library: C would have been a tough programming language in absence of the standard library. The standard library in C includes header files and standard functions in these files. Header files are collection of macros, types, functions and constants. Any program that needs those functions has to include these header files. For example, the standard library functions, included in “stdlib.h” header file, are used for number conversions, storage allocation and other functions on the same line. These functions are called utility functions. C does not have any built-in input/output statements as part of its syntax. All I/O operations are carried out through function calls such as printf and scanf. There are many functions that have become standard for I/O operations in C, collectively known as standard I/O library “stdio.h”. Because of this standard inputoutput header file, standard I/O functions can be used on many machines without any change. |
|
| 11591. |
main ( ) is an example of(A) library function(B) user defined function(C) header(D) statement |
|
Answer» Correct option -(A) library function Explanation:- main() is a special function used by C system to tell the computer where the program starts. |
|
| 11592. |
If an integer needs two bytes of storage, then the maximum value of a signed integer is.(A) 216-1(B) 215-1(C) 2 16(D) 215 |
|
Answer» Correct option - (B) 215-1 Explanation:- If we use a 16 bit word length, the size of the integer value is limited to the range -215 to 215-1 |
|
| 11593. |
Consider the following: P1 is an integer pointer P2 is a long integer pointer P3 is a character type pointerThe initial value of P1 is 2800, P2 is 1411 and P3 is 1201. What is the new value of P1 after P1=P1+1, P2 after P2=P2+1 and P3 after P3=P3+1; |
|
Answer» The initial value of P1 is 2800 which is an integer pointer so new value of P1 is 2802 after P1= P1+1 The initial value of P2 is 1411 which is a long integer pointer so new value of P1 is 1415 after P2= P2+1 because long takes 4 bytes of memory. The initial value of P3 is 1201 which is a char type pointer so new value of P3 is 1202 after P3= P3+1 |
|
| 11594. |
The function that allocates requested size of bytes and returns a pointer to the first byte of the allocated space is -(A) realloc(B) malloc(C) calloc(D) none of the above |
|
Answer» Correct option - (B) malloc Explanation:- malloc allocates requested size of bytes and returns a pointer to the first byte of the allocated space. |
|
| 11595. |
Choose the function that returns remainder of x/y -(A) remainder( )(B) mod( ) (C) modulus( )(D) rem( ) |
|
Answer» Correct option - (C) modulus( ) Explanation:- modulus( ) function produces the reminder of an integer division. |
|
| 11596. |
Write a function, my_atoi, similar to the library function atoi that returns the numeric value corresponding to the string passed to it as an argument. |
|
Answer» #include<stdio.h> |
|
| 11597. |
Write a function rightrot(x, n) that returns the value of the integer x rotated to the right by n positions. |
|
Answer» A function rightrot(x, n) that returns the value of the integer x rotated to the right by n positions. #include<conio.h> rightrot(x,n) { int x,n,k=0,num,rem,i,j,dig; int arr1[10],arr2[10]; clrscr(); printf("\n Enter the integer to be rotated : "); scanf("%d",&x); printf("\n Enter the positions by which %d is to be rotated : ",x) scanf("%d",&n); for(num=x;num!=0;num/=10) { rem=num%10; arr1[k++]=rem } i=k-1; k=0; for(;i>=0;i--) arr2[k++]=arr1[i]; k-=1; for(i=1;i<=n;i++) { dig=arr2[k]; for(j=k;j>0;j--) arr2[j]=arr2[j-1]; arr2[0]=dig; } printf("\n\n The original number is : “); return x; printf("\n The rotated number is : "); for(i=0;i<=k;i++) printf("%d",arr2[i]); getch(); } |
|
| 11598. |
Every internal node in a B-tree of minimum degree 2 can have(A) 2, 3 or 4 children(B) 1, 2 or 3 children(C) 2, 4 or 6 children(D) 0, 2 or 4 children |
|
Answer» Correct option - (B) 1, 2 or 3 children |
|
| 11599. |
The order of a B-Tree with 2, 3, 4 or 5 children in every internal node is(A) 2(B) 3(C) 4(D) 5 |
|
Answer» Correct option- (C) 4 |
|
| 11600. |
The depth dn, of complete binary tree of n nodes, where nodes are labeled from 1 to n with root as node 1 and last leaf node as node n is(A) [ log2 n − 1 ](B) [log2 n + 1 ](C) [ log2 n + 1](D) [ log2 n − 1] |
|
Answer» Correct option- (C) [ log2 n + 1] |
|