RTMCQ and OCT 3rd Merged
RTMCQ and OCT 3rd Merged
3. Which of the given options are used to calculate the running time complexity of
an algorithm
ANS= Asymtotic notation
5. Name of the unix command to perform safe shut down a unix system
ANS= Shutdown
7. White box testers should require the working knowledge of the code segment
ANS-True
8. A doubly linked list cannot be implemented using a single pointer variable in
every node
Ans= false
11.Path is used to locate file in unix files system. The types of path supported are
&
Ans = Absolute
Relative
14. If you create a view WITH READ ONLY option, it can only be viewed and not
updated. State true/false.
Ans = true.
15.From the below list which files will be listed using the following command?
Ls chap[^1-4]
Ans a) chap6
b) chap7
18.Consider the following array {12,3,1,5,8} Tell us the number of steps that are
required to sort the elements in the ascending order using insertion sort.
Ans = 4
20. In which of the given data structures, does the implementation becomes
difficult?
Ans= graph
21.Which element is used to indicate that elements defined in the xsd must appear
in the same order in the xml file.
Ans = <xs.sequence>
25.Name the Unix command to perform safe shut down a unix system
Ans = shutdown.
26.White box testers should require the working knowledge of the code being
tested
Ans= true
34. Bonus calculated module was unit tested by the developer. Depending on the
salary the bonus
needs to be calculated. Assume if one of the salary-range is between 30000 to
40000 then the
bonus should be 10%. From the given options identify the test cases for
Equivalence Partitioning.
Ans-
25000,35000,45000
25000,27000,29000
42000,43000,45000
32000,35000,39000
35. What will be the code to create a text box which accepts only 4 digit numbers
Ans = <input type=”text” name=”pin” pattern=”*0-9+,4-”>
37. What is the command to concatenate fname and lname with a space in between
and display
the output under the heading of “Full Name”?
Employee(eid,fname,lname,salary)
Ans= select fname||’ ’||lname as ‘Full Name’ from employee;
select fname||’ ‘||lname ‘Full Name’ from employee;
38. Consider the following table structure and write a query to display all the
employees who
have and don’t have department id assigned
Emp(fname,lname,dno)
Dept(dep9d,dname)
Ans= 1) SELECT FNAME,DEPTID,DNAME FROM EMP E LEFT OUTER JOIN DEPT D
ON (E.DNO=D.DEPTID);
2) SELECT FNAME,DEPTID,DNAME FROM EMP E FULL OUTER JON DEPT D
ON(E.DNO=D.DEPTID
Startprogram
||,or
Startprogram
<>,!=
Startprogram
!= and NOT IN
42. In order to refer to all the elements in a one dimensional array which is the
possible option that you would choose.
Ans = Using an indexed loop, such that the respective from 0 to the array
size minus one.
43 is the time duration for each sprint
a>2-3 days
b>2-5 hours
c>2-4 weeks
d>1 month
43. Match the correct options with the characteristics of a good program
46. Which of the following options are false with respect to trees?
Choose the best option
A) tree which does not have any node other than the root node has depth of zero
b)A tree which does not have any node other than root node is called a null tree
C)A tree with n nodes has exactly n branches or degree
D)All the options
48. Which of the following can be the parent tag for<figcaption> element?
Tag 1: <figure>
Tag 2: <footer>
Tag 3: <caption>
Ans = Tag 1 only
50. which is the command to display all login names and the number of user
logged in
Who -u
Who -q
Who -H
Who -m
51. is used to alter the program flow, when a set of statements need
to be executed only if a condition is fulfilled.
Command mode
Insert mode
Append mode
Escape mode
55. What string datatype can be used for a string that does not contain line
feeds,carriage return or tabs.
a . xs:string
b. xs:name
c. xs:nospace
d. normalized string.
60. which uml diagram is capable to depict conditional branching and loop
execution?
Ans = sequence diagram
78. which of the given options are true with respect to linked lists, when
compared to arrays
1.Linked lists are dynamic in size
2.Random access is possible in linked list
3.Insertion and deletions are expensive in linked list
4.All the options
81. US Insurance project development team members are divided into two
groups, one team
works in the development office in India and the other group works onsite, ie,
at the client location
So Programmers located in different locations is not suitable for methodologies
Ans=DSDM
84) Sam and rose are working on the loan monitoring project the head version
was checked
out By both sam and rose .both of them made their changes in the local
machines both of them
Made the required changes and updated the same to the server from the given
options Identify
correct option
Ans= Second projects gets over written by the first one
86. In a binary search algorithm, if the element to be searched is lesses than the
pivot value (middle value), then is split in half.
Right interval
Left interval
Half interval
Complier dependent
87. startprogram
public interface studentmark{
/*insert code here*/ int mark=100;
}
which modifiers when inserted in the above code will provide compilation
errors?(choose two)
endprogram
final
static
abstract
private
public
88. )Amaze Agencies, Customers can apply for loan. To apply loan the
customers
should get registered first then apply for the loan. The admin will approve the
loan
and then the loan will be issued to the customer.
Identify the classes in above scenario.
Ans: Customer, Loan, Register.
90. class High{
public High(String s){
System.out.print("From High");
}
}
public class Main extends High{
public Main(String s){
System.out.print("From Low");
}
public static void main(String[] args){
new Main("High Low");
System.out.prinln("");
}
}
Ans = compile time error
92. 1)INNER JOIN 2)LEFT OUTERJOIN 4)RIGHT OUTER JOIN 5)FULL OUTER JOIN
WITH
A)Returns records that have matching values in both tables B)Returns the matched records
from the
right table, and all records from the left table C)Returns the matched records from the left
table, and
all records from the right table D)Returns all records when there is a match in either left or
right
table
a>1-d,2-c,3-b,4-a
b>1-d,2-b,3-c,4-1
c>1-d,2-b,3-a,4-c
d>1-a,2-b,3-c,4-d
93. Consider the file staff dat which has the following content
1:Anu Professor 85000 y
2 Sam Associate Professor 150000 5yrs
3. John Professor 75000 6yrs
4. Suresh Associate Professor 150000 5yrs Which is the command to display the outbus as
tolos?
Suresh Associate Professor
Sam Associate Professor
John Professor
Anu Professor
Ans= cut -d: -f 2,3 staff dat|sort -r
94. The company needs to change the job title ‘officer’ to ‘Administrative officer’ for all
officers.which statement does this
Ans= update employee job=’Administrative officer’ where upper=’officer’;
95. identify the type of control statement from the given option, in which the program chooses
two or more alternative path based on the result of a particular expression that returns a
Boolean value.
Ans=sequential
97. predict the output display the loan type and the number of customers under
each loan type,considering only those loan types which are taken by more than
one customer.
Select loan_type,count(customer-id) from loans_taken l1 inner join loans l2 on l1
loan_id=l2 loan_id group by loan_type having count(customer_id)>1 order by
loan_type
Startprogram
H1{
Text-shadow : 2px 3px 5px;
}
Endprogram
Clonable
Serialization
Autocloseable
Comparable
Comparator
100.
Statement 1 : an include relationship between usecase means the included usecase
will be called every time the base usecase is executed
101 what is the order of execution when there is a parent class and a child class
with constructors in it?
Ans =
1. initialization block of super class
2. initialization block of the class
3. constructor of super class
4. constructor of the class
102. Spot the error. Observe the given algorithm to calculate the simple interest.
Identify the
Ans = Step 4
Ans=
video quality is high
finally
104.
You need to analyze the time duration from the time that your orders are placed
to the time that your orders are shipped.
To do this, you must create a report that displays the customer number, date
ordered, date shipped, and the number of
months in whole numbers from the time the order is placed to the time the order
is shipped Which statement produces the required results
options =
O SELECT customer_id, order_date, shipping_date, ROUND(DAYS BETWEEN
(shipping_dale, order_date)) 30) Time Taken FROM order,
105. in CSS, which of the following code/ codes can be used for colouring a
table background in red?
Code 1: table {background-color: red; }
Code 2: table {bgcolor: red;}
Code 3: table {background: red;}
Choose one
Ans= code 1 only
107. Agile methodology accepts change of requirement at any stage. State true or
false
Ans = 1
108. A linear structure which follows a specific order in which the operations are
performed.Stack follows which of the given orders?
Ans = last-in-first-out
109. when an exception occours in a method.The method creates an object for that
exception. To handel the exception, it is given to the run time system.the run time
system searches for all the methods in the call stack,it is cannot find the
approproate handler then it hands over the object to?
Ans= nosuchmethodexception
Ans= 1
113. What is the relationship between these two Building has rooms
Ans
Composition
Aggregation
Generalization
Hierarchy
114. which of the following tag represents a section of the document intended for
navigation in html5?
Ans= nav
115. A Software needs to be developed for a Sterlin Hospital to monitor the radiations given
for cancer patients. Even a very minute
deviation would result in the risk of the life of the patient. Which would be the appropriate life
cycle model used to implement
the given scenario
Select one:
a. Agile
b. Prototyping
c. Water fall
d. Spiral
116. which of the following operations can be used instead of the or operator
when there are multiple values that need to be compared
Ans = IN
117. Consider the scenario. For an insurance, a customer makes a claim. The claim
can be a
normal or a critical claim. The insurance company confirms the claim. What diagram
can be used tounderstand the state changes of the component triggered by events
and the dynamic
nature
Correct answer : state chart diagram
119.
Startprogram
Body{
Background-color : rgba(0,0,0,0);
}
Endprogram
Ans = fully transparant
125. Which of the following tags is used to define a multi-line input field?
Ans: datalist /textarea
Select to_char(report_date,
‘Mon’) as MONTH, status
from AQI_DELHI;
Endprogram
22
333
Option 1 Ans=
startprogram
Echo “enter the number”
Read n
For((i=1;i<=n;i++))
Do for ((j=1;j<=i;j++))
Do
Echo -e “$i \c”
Done echo “ ”
Done
endprogram
red
import java.util.ArrayList;
public class testuserMain{
public static void main(String[] anrgs)
{
ArrayList<String> a1=new ArrayList<String>(5);
a1.add("Ten");
a1.add("Twenty");
a1.add(4,"Fifty");
a1.add("thirty");
a1.add("Fourty" );
System.out.println(a1);}}
Ans= indexoutofbound
114. Which of the given options define a set of activities that transform the client needs to an
effective software solution
Ans-Software planning
Software cost estimation
Software development process
Software resource planning
. Carefully read the question and answer accordingly. In an array, if an item to be searched is
found in the middle of an array then it is said to be _____
ans= average case
Class bird{
System.out.print("b1");
}
public Bird(){
System.out.print ("b2");
}
Correct answer:r1 E2 Testman b1 b2 E1 r2 M1
class ClassA{
Which of the following is used to reference data that can act as an abbreviation or can be
found at an external location?
Ans- ENTITY
In a CSS script, each property of an element is separated by a ______
Ans – semicolon (;)
Ans= -5.0
-54.0
1.Unix file system is a collection of files and directories organized in a ______
manner
Ans:- Hierarchy
1. Command mode
2. Insert mode
3. Append mode
4. Escape mode
1. Correctness
2. Reliability
3. Reuse
4. Redundancy
1. $
2. \
3. /
4. >
1. tee
2. grep
3. wc
4. ls
Customer (custid,custnmae,address,city,country)
Choose the option display all customer who all are not from Hyderabad and delhi.
1. clrscr
2. cls
3. clear
4. clearscreen
8. Path is used to locate file in Unix filesystem. The types of path supported are
____ and ____
1. Absolute
2. Relative
3. Reference
4. Dynamic
1. False(0)
2. True(1)
$cd/home/course/CSE/C++
1. Absolute
2. Relative
3. Reference
4. Dynamic
11. In a binary search algorithm, if the element to be searched is lesse than the
pivot value (middle value), then _____________ is split in half
1. Right interval
2. Left interval
3. Half interval
4. Complier dependent
12. US Insurance project development team members are divided into two groups,
one team works in the development office in India and the other group works
onsite, i.e, at the client location So Programmers located in different locations is
not suitable for _______________ methodologies
13. A doubly linked list cannot be represented using a single pointer variable in
every node
1. False
2. True
14. Consider the following table structure and write a query to display all the
employees who have and don’t have department assigned
Emp(fname,lname,dno)
Dept(deptid,dname)
1. 2-3 days
2. 2-5 hours
3. 2-4 weeks
4. 1 month
16. Name the Unix command to perform safe shut down a Unix system
a. halt
b. poweroff
c. shutdown
d. reboot
17. What is the command to concatenate fname and lname with a space in
between and display the output under the heading of “Full Name”?
Employee(eid,fname,lname,salary)
18. A not null column cannot be created at table level during table creation. State
true/false.
1. False
2. True
19. . identify the type of control statement from the given option, in which the
program chooses two or more alternative path based on the result of a particular
expression that returns a Boolean value.
1. Sequential
2. All of the options
3. Decision
4. Iteration
20. which of the given options are true with respect to linked lists, when compared
to arrays
21. A linear structure which follows a specific order in which the operations are
performed. Stack follows which of the given orders?
1. Last-In-First-Out
2. First-In-First-out
3. Bottom-Up
4. Top-Down
1. Linked List
2. Stack
3. Queue
4. Binary Tree
1. C
2. C++
3. VC++
4. JAVA
24. consider a scenario: you have written a code to display a menu on the screen
and some operations are performed based on the given user input. Which control
structure would you use, so that the menu is guaranteed to show? display at least
once on the screen, before performing the operation
1. Do-While loop
2. For-Loop
3. While-Loop
4. None
25. Match the correct options with the characteristics of a good program
2)Eficiency - B)Deals with the amount of time and memory space required for a
program
27. Agile methodology accepts change of requirement at any stage. State true or
false
1. True
2. False
28. predict the output display the loan type and the number of customers under
each loan type,
considering only those loan types which are taken by more than one customer.
1st option
29. Which of the given options are used to calculate the running time complexity
of an algorithm
1. Prototype Model
2. Water Fall Model
3. Rapid Application Development Model
4. Spiral Model
31. In which of the given data structures, does the implementation becomes
difficult?
1. Linked list
2. Stack
3. Array
4. Graph
32. which of the command displays all login names and the number of users
logged in.
1. Who -u
2. Who -q
3. Who -H
4. Who -m
33. which of the following operations can be used instead of the or operator
when there are multiple values that need to be compared
1. IN
2. LIKE
3. OR
4. AND
34. which of the following method is used to convert date from one format to
other?
1. to_Char();
2. to_Date();
3. convert();
4. default();
35. Which of the following options are false with respect to trees.
1. A tree which does not have any node other than the root node has depth of
zero
2. tree without any nodes is called as null tree
3. a tree with n nodes has exactly n branches or degree
4. All of the above
36. If you create a view WITH READ ONLY option, it can only be viewed andnot
updated. State true/false.
1. True
2. False
WITH
A)Converts null to an actual value B)if the first expression is not null, the
second expression is returned and if the first expression is null, the third
expression is returned C)Returns the first not null expression present in the
expression list D)Compares two expressions and returns nut if they are equal
38. what will be the xsd definition for the following element40?
39. The WHERE clause cannot be used to apply additional conditions inSELECT
statement containing the ON or the USING clause. State true/false.
1. True
2. False
1. Startprogram
-,minus()
2. Startprogram
||,or
3. Startprogram
<>,!=
4. Startprogram
!= and NOT IN
42. The company needs to change the job title ‘officer’ to ‘Administrative officer’
for all officers. Which statement does this
1JINNER JOIN 2)LEFT OUTERJOIN 4)RIGHT OUTER JOIN 5)FULL OUTER JOIN
WITH
A) Returns records that have matching values in both tables B) Returns the
matched records from the
right table, and all records from the left table C) Returns the matched records
from the left table, and
all records from the right table D) Returns all records when there is a match in
either left or right
table
1. 1-d,2-c,3-b,4-a
2. 1-d,2-b,3-c,4-1
3. 1-d,2-b,3-a,4-c
4. 1-a,2-b,3-c,4-d
1. Persistence is a way through which the life time of object exists even after
the program terminates
2. Java uses serialization for object persistence
3. Persistence is a way through which the life time of object is terminated as
the program terminates
4. Persistence of object is done by java runtime automatically
1. Abstraction
2. Encapsulation
3. Typing
4. Hierarchy
47. What is the relationship between these two Building has rooms
1. Composition
2. Aggregation
3. Generalization
4. Hierarchy
48. What are the best ways to ensure that a class implements the required
behavior?
1. Use Interface
2. Method inside interface are public and abstract
3. Have a strict testing
4. Use encapsulation
1. $(“p”)hide();
2. $(p)hide();
3. $(“p”)-hide();
4. (“p”)hide();
50. 3. Consider the file staff data which has the following content
4.Suresh Associate Professor 150000 5yrs Which is the command to display the
outbusas
tolos?
John Professor
Anu Professor
51. Which attribute of schema element is used to identify the default namespace
54. What string datatype can be used for a string that does not contain line
feeds,carriage return or tabs.
1. xs:string
2. xs:name
3. xs:nospace
4. normalized string
55. Sita wishes to greet the user when the user clicks on “Greet me” button in
which event does she need to write the javascript code for greeting the user?
1. Onchange
2. Onmouseover
3. Onclick
4. Onmouseclick
56. Which of the following can be the parent tag for<figcaption> element?
Tag 1: <figure>
Tag 2: <footer>
Tag 3: <caption>
1. <section>
2. <body>
3. <articles>
4. <header>
Startprogram
<2020SalesReport>
<income>1000000</income>
<profit>500000</profit>
</2020SalesReport>
Endprogram
1. True
2. False
59. startprogram
endprogram
which modifiers when inserted in the above code will provide compilation
1. final
2. static
3. abstract
4. private
5. public
60. Consider the following css code snippet
Startprogram
H1{
Endprogram
61. Which script displays an alert box with the required information when a
button with the
1. <script>document.getElementById(“msgbtn”).addEventListener(“click”,fu
nction(){alert(“Welcome to button clicks!”);});</script>
2. <script>document.getElementById(“msgbtn”).EventListener(“click”,functio
n(){alert(“Welcome to button clicks!”);});</script>
3. <script>document.getElementById(“msgbtn”).includeEventListener(“click”,f
unction(){alert(“Welcome to button clicks!”);});</script>
4. <script>document.getElementById(“msgbtn”).addEventListener(“click”,func
tion={alert(“Welcome to button clicks!”);));</script>
1. Clonable
2. Serialization
3. Autocloseable
4. Comparable
5. Comparator
63. When constructing looping statements, if the iteration condition Is not
terminated, it will result in infinite loop. State True or false
1. True
2. False
64. Amaze Agencies, Customers can apply for loan. To apply loan the customers
should get registered first then apply for the loan. The admin will approve the
loan and then the loan will be issued to the customer. Identify the classes in
above scenario.
1. Customer, Loan
2. Customer, Loan, Register.
3. Customer, ApplyLoan, Register.
4. Customer, ApplyLoan, Register, IssueLoan
1. COMMIT
2. GRANT
3. ROLLBACK
4. REVOKE
66. is used to alter the program flow, when a set of statements need to be
executed only if a condition is fulfilled.
1. Conditional statement
2. Looping statement
3. Iterative statement
4. Sequential Statements
67. Bonus calculated module was unit tested by the developer. Depending on the
salary the bonus needs to be calculated. Assume if one the salary range is
between 30000 to 40000 then the bonus should be 10%.From the given op9ons
iden9fy the test cases for equivalence portioning
1. 25000,35000,45000
2. 25000,27000,29000
3. 42000,43000,45000
4. 32000,35000,39000
1. Selection sort
2. Merge sort
3. Bubble sort
4. Insertion sort
69. ERD Example consider the given scenario. A product may or may not have a
sale. A sale can have one or more products. Identify the optionality between the
product and sales
1. 1..0
2. 0..0
3. 1..1
4. 0..1
70. order the types of cohesion from the worst cohesion to the best cohesion
a. functional cohesion
b. co-incidental cohesion
c. communicational cohesion
d. temporal cohesion
e. procedural cohesion
f. logical cohesion
g. sequential cohesion
1. b,f,d,e,c,g,a
2. d,e,f,g,a,b,c
3. a.b.c.d.e.f.g
4. g.f.e.d.c.b..a
72. Efficiency of an algorithm is based on the CPU ,Memory Usage, Disc usage and
network usage. State true of false?
1. True
2. False
73. in CSS, which of the following code/ codes can be used for colouringa
1. 4thvariable
2. _98_
3. &count
4. $says
5. New
75. Consider the scenario. For an insurance, customer makes a claim. The claim
can be a normal or a critical claim. The insurance company confirms the claim.
What diagram can be used to understand the state changes of the component
triggered by events and dynamic nature?
a) Intern()
b) Delete()
c) Append()
d) Reverse()
e) Replace()
78. Which of the given options define a set of activities that transform the client
needs to an effective software solution
a) Software planning
b) Software cost estimation
c) Software development process
d) Software resource planning
80. You need to analyze the time duration from the time that your orders are
placed to the time that your orders are shipped. To do this, you must create a
report that displays the customer number, date ordered, date shipped, and the
number of monthsin whole numbersfrom the time the order is placed to the time
the order is shipped Which statement produces the required results
81. which uml diagram is capable to depict conditional branching and loop
execution?
a) Usecase diagram
b) Sequence Diagram
c) Both
a) Text()
b) Html()
c) Val()<br>
d) Body()
83. am and Rose are working on the Lone Monitoring project. The head version
was checked out by both Sam and Rose, both of them made their changes in the
local machine. Both of them made the required changes and updated the same to
the server. From the given options identify the correct option
84. In HTML, base tag should be used inside the head section only.
a) True
b) False
85. White box testers should require the working knowledge of the code being
1. True
2. False
86. Spot the error. Observe the given algorithm to calculate the simple interest.
Identify the incorrect step (if any)
Step 1: Start
Step4: Simple_Interest=result%100
87
1.
22
333
Option 1 Ans=
startprogram
Read n
For((i=1;i<=n;i++))
Do for ((j=1;j<=i;j++))
Do
Done echo “ ”
Done
endprogram
Option A
89:- Which of the following are the correct ways to declare an array?
Ans:- b & c
90. What will be the code to create a text box which accepts only 4 digit numbers
System.out.print("From High");
System.out.print("From Low");
System.out.prinln("");
1. From High
2. From Low
3. High Low
4. Compilation Error(Option D)
System.out.println("Integer "+i);
System.out.println("Int "+i);
3. class BlackBoard{
Short story=200;
bb=null;
return bb;
}
public static void main(String[] args)
BlackBoard b3=b1.write(b2);
b1=null;
}
Ans:- 1
int num2=58;
display();
num1=58;
num2=85;
void display()
System.out.println("num1="+num1);
System.out.println("num2="+num2);
myobj.display();
}}
Ans:-num1=85
num2=58
num1=58
num2=85(Option A)
index=1;
int index;
new TestMain().find();
}
void find(){
int[][]d = {{7,8,9},{4,5,6},{0,1,2,3}};
System.out.println(d[index++][index++]);
Ans = 6(Option A)
End program
Ans:- Stay home ! Stay safe!!(Option 1)
System.out.println(i%d);
short no=4;
System.out.println((no-i)*d);
Ans= -5.0
54.0(Option C)
8. import java.util.*;
{
String[] str={"Banana","Apple","Watermelon","Mango"};
Arrays.sort(str,o);
for(String s: str)
System.out.print(s+" ");
System.out.println(Arrays.binarySearch(str,"map"));
return str2.compareTo(str1);
9. class ClassA
subObj.show();
String[] str={“Banana”,”Apple”,”Watermelon”,”Mango”};
Arrays.sort(str,o);
for(String s: str)
System.out.print(s+” “);
System.out.println(Arrays.binarySearch(str,”map”));
return Str2.compareTo(str1);
}}
correct Option: A
}}
try{
((smartTv)new Television()).gePictureResoution();
catch(ClassCastException e)
finally{
System.out.println("Finally");
}
Ans=
System.out.print("Hello");
public display()
System.out.print("display");
System.out.print("hai");
Ans = haiHellodisplayHellodisplay
13. In javascript what will be returned by the following code
snippet?
Startprogram
Document.write(new date().getmonth());
Endprogram
Ans = month as number from 0 to 11 format (Option A)
14. In what colour will be the heading appear, from the above lines of code?(Red,
Green, Blue,myclass)
Ans:- Red(Option A)
Startprogram
Body{
Background-color : rgba(0,0,0,0);
Endprogram
int b=a.length;
System.out.print(new
String[]{"Harley","Aprilla","Kawasaki","Triumph","Guzz"}[0]);
}}
m.put(t1,"Design");
m.put(t2,"Code");
m.put(t3,"Develop");
System.out.println(m.size());
class Tasks{
String day;
Tasks(String d){
day=d;
return((Tasks)o).day==this.day;
return 0;
Correct option: 3