Ads Here

Tuesday, September 7, 2021

mcq accenture

 1. Consider the following Java Code (Assume that Employee is a valid Java class)

With respect to the code, how many object/objects will be available for garbage collection after 

Line-1? Choose the most appropriate option

Ans- 2

2. Choose the most appropriate option

Ans – Compile time error

Main.java:21: error: doWork(int) in Main cannot implement doWork(int) in A

void doWork(int s)

 ^

 attempting to assign weaker access privileges; was public

1 error

3. Refer to the below code and predict the output

Ans - 

Not equal! 10

4. What is the output expected on the execution of the following code?

Ans – 30

5. Consider the table Employee(empId,jobBand)

What is the correct DML statement to update the job band of all employees to NULL?

ANS –

UPDATE TABLE employee SET jobBand is NULL;

UPDATE employee SET jobBand = NULL;

UPDATE TABLE employee SET jobBand = NULL;

UPDATE employee SET jobBand is NULL;

6. Consider the table Employee(empId,jobBand)

What is the correct SQL statement where all unique job band from employee table?

Ans –

select jobBand DISTINCT from employee;

select DISTINCT jobBand,empid from employee;

select DISTINCT(jobBand) from employee; // gave right answer as well

select DISTINCT jobBand from employee;

7. Consider table Account(accountId,balance) Identify the SQL queries which gives the same result

Ans –

SELECT * FROM Account WHERE balance>1000 and balance<5000;

SELECT * FROM Account WHERE balance>=1000 OR balance<=5000;

SELECT * FROM Account WHERE balance between 1000 and 5000;

SELECT * FROM Account WHERE balance>=1000 AND balance<=5000;

8. Refer the incomplete HTML Code given below

Assume abc.html is existing and a valid HTML page. Identify the appropriate option to be placed at 

Line 1 so that values entered in the text boxes are not appended to URL while submitting to 

abc.html. 

Ans –

method =” GET”

method = “POST”

submit = “GET”

submit =” POST”

9. What would be the output of the following Java Script

Ans –

number object

int object

number undefined

int undefined

10. Which of the following is not a part of SRS document

Ans –

Functional Requirement

Non-Functional Requirements

Implementation Details

Hardware Software specifications

11. Consider the following array (12,3,1,5,8) Tell us the number of steps that are required to sort 

the elements int the ascending order using insertion sort

Ans – 3

12. Choose the appropriate option where prototype model is used

Ans –

For projects where requirements are clear

For projects where requirements are unclear

Projects where lot of risk factors needs to be considered

Projects with frequent changes

13. Arrow symbols in the flowchart is used to show the sequence of steps and the relationship 

among them. State true or false

AnsTrue

False

14. Which command in UNIX is used for clearing the Screen?

Ansclrscr

cls

clear

clearscreen

15. 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)

AnsSelect fname || “ “ || lname as ‘Full Name’ from employee;

Select fname || “ “ || lname ‘Full Name’ from employee;

Select fname & lname as ‘Full Name’ from employee;

Select fname & ‘ ‘ & lname ‘Full Name’ from employee;

16. Frrom the below list which files will be listed using the following command

ls chap(^1-4)

AnsChap4

Chap5

Chap6

Chap7

17. What is an identity of an object?

Ans-

Is the property that uniquely differentiates the object from other objects

Is the id given to the object by the class

Is the state of an object

Is the behavior of the object

18. 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)

AnsSelect fname,deptid from emp e, dept d where e.dno(*)=d.deptid;

Select fname,deptid,dname from emp e left outer join dept d on (e.dno=d.deptid);

Select fname,deptid,dname from emp e, dept d where.dno = d.deptid(*);

Select fname,deptid,dname from emp e full outer join dept d on (e.no=d.deptid);

19. Refer the code and predict the output

Ansb A B C

A B C

A B C b

B Hreeva A B C

20. given the following code snippet: which of the following are true

Ans – the output will be [7 , D, 7 ]

21. Predict the output

Given two files

Ans – Compile time error

Main.java:16: error: no1 is not public in One; cannot be accessed from outside pac

kage

System.out.print(" "+o.no1);

 ^

Main.java:17: error: no2 has protected access in One

System.out.print(" "+o.no2);

 ^

2 errors

22. Identify the correct CSS representation for a paragraph

Ansp{padding:25px;}

p{padding=25px;}

p=padding:25px;

p: padding: 25px;

23. Which attribute is used to reference an xml schema in an xml document

Ansxsi:schemaLocation

xsi:Location

xsd:schemaLocation

xsi=schemaLocation

24. Two modules with more dependency is known as loosely coupled modules and two modules 

with less dependency is known as uncoupled modules state true or false

AnsTrue

False

25. Carefully read the question and answer accordingly. To execute the result of the last executed 

procedure, call recursive procedures use stacks. State true or false

AnsTrue

False

26. Path is used to locate file in Unix filesystem. The types of path supported are ____ and ____

Ans-

Absolute

Relative

Reference

Dynamic

27. Predict the output

Step 1: start the program

Step 2: Declare a variable count and set the count as 1

Step 3: Print the count

Step 4: Increment the count by 1

Step 5: Check whether count is greater than or equal to1. If yes go to step 3. If no go to step 6

Step 6: Print the count

Step 7: Stop

Ans1 1

1 2

2 1

Loop runs indefinitely

28. Below statement is an example of _____ path in Unix

&cd /home/course/CSE/C++

AnsAbsolute

Relative

Reference

Dynamic

29. Predict the output of below command

grep “Atul” employee.txt || echo “not found”

AnsSearches for Atul and echoes “not found”

Searches for Atul

Searches for Atul and displays

Searched for Atul and echoes “not found” when not found

30. 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?

AnsSate chart diagram

Sequence diagram

Activity diagram

Interaction diagram

31. Predict the output

Cat Meow

Dog BOW WOW

Dog Meow

Cat Bow Wow

32. A team of employees is trying to analyze the root cause of the issues identified for the online 

Library Management. From the options identify the process that is carried out.

AnsCoding

Testing

Analysis

Debugging

33. Information hiding is achieved through which OOP principle?

AnsAbstraction

Encapsulation

Typing

Hierarchy

34. From the following options choose all the possible Exceptions for the above code

Try{

Int check = Integer.parseInt(“Five”);

}

Ans-(class cast, number format)

ClassCastException

IllegalStateException

NumberFormatException

IllegalArgumentException

ExceptionInInitializeError

35. Unix file system is a collection of files and directories organized in a ______ manner

Ans- hierarchical

36. Predict the output

Ans- true true

37. Predict the output

AnsA 3 B

A B

A followed by an exception

An exception is thrown at runtime

Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to 

java.lang.Integer

38. What is true regarding State Chart Diagram?

AnsDepicts different states of an object during lifetime

Flow of activity

Chart diagram of objects

Static view of objects

39. Predict the output

An exception is thrown at runtime

The code compiles and runs with no output

CTE

- Exception in thread "main" java.lang.ClassCastException: Tree cannot be cast to TestMain

40. Predict the output

Ans – 6

41. Predict the output. Which statement can replace to allow the above code to compile and run.

Ans –

List<List<Integer>> db = new ArrayList<List<Integer>>();

List<List<Integer>> db = new List<List<Integer>>();

List<List,Integer> db = new List<List,Integer>();

[0, 0, 0, 0, 0, 0]

[0, 1, 2, 3, 4, 5]

[0, 2, 4, 6, 8, 10]

[0, 3, 6, 9, 12, 15]

[0, 4, 8, 12, 16, 20]

[0, 5, 10, 15, 20, 25]

42. Carefully read the question and answer accordingly. In Linear search algorithm, if an item to be 

searched is found in the middle of an array then it is said to be _____

AnsBest case 

Worst case

Average case

Null case

43. Which of the given phases consume more time during the Software life cycle

AnsAnalysis

Design

Testing

Maintenance

44. If you are asked to do a modular software design, which combination of coupling and cohesion 

should you use for designing the software?

AnsHigh cohesion and high coupling

High cohesion and low coupling

Low cohesion and high coupling

Low cohesion and low coupling

45. What is the output of the following script

<script>var x=16+4+”100”

alert(x)</script>

Ans – 20100

46. Which jquery syntax hides all the paragraph elements

Ans-

$(“p”).hide();

$(p).hide();

$(“p”)-hide();

(“p”).hide();

47. Match the following

DDL, DML, DCL, TCL

GRANT, COMMIT, SELECT, CREATE

AnsDDL – CREATE

DML – SELECT

DCL – GRANT

TCL – COMMIT

Note:

DDL (Data Definition Language) – Create, drop, alter, truncate, comment, rename

DQL (Data Query Language) – SELECT

DML (Data Manipulation Language) – Insert, update, delete

DCL (Data Control Language) - Grant, revoke

TCL (transaction Control Language) – Commit, rollback, savepoint, set transaction

48. Which is the root element of every XSD?

AnsSchema

Root

Schema xsd

Base

49. The kernel is the core part of UNIX operating system. Choose 3 tasks achieved by Kernel from 

the list below

AnsPerforms disk operations

Manages I/O operations

Performs memory and processes management

Interfaces between user and operating system

50. You must explicitly commit GRANT on tables. State true or false

AnsTrue

False

51. Which of the following algorithm(s) is/are said to be non-adaptive?

AnsSelection sort

Merge sort

Bubble sort

Insertion sort

52. Which of the following is more efficient in terms of memory utilization and execution speed?

AnsRecursion

Iteration

Sequential

Conditional

53. In HTML, what is the default min and max values for the input type called range?

AnsMin=0, max=100

Min=1, max=10

Min=0, max=10

Min=1, max=100

54. Root is a super user in Unix operating system and it is represented using _____

Ans-

$

/

>

~

55. Given

Which of the following statement can replace // insert code here, that will compile without any 

errors? Choose all that apply

Ansstatic void check(int...checkArgs){}

static void check(int[] checkArgs){}

static void check(int...checkArgs,int y){}

static void check(int checkArgs...){}

static void check(int x,int...checkArgs){}

56. java.util.List allows you to grow or shrink its size and provides indexed access to its elements, 

but whose methods are not synchronized. State True or False

AnsTrue

False

57. State true or false

White box testers require the working knowledge of the code being tested

AnsTrue

False

58. Carefully read the question and answer accordingly. In an array, if an item to be searched is 

found in the last element of the array or not found in the array then it is said to be _____

AnsBest case

Worst case

Average case

Null case

59. What does public String pattern() return?

AnsReturns the compiled version of boolean after matching the regular expression against the given

Returns the compiled version of regular expression into a Pattern

Returns the pattern’s source regular expression

Returns the compiled version of string into the pattern

60. What is the complexity of the given code

AnsO(nlogn)

O(n^2)

O(n^2logn)

O(logn)

61. Choose the options which are true with respect to views in SQL?

AnsView is a virtue table that does not physically exist

Views are used for maintaining logical data independence

View do not maintain data integrity

View is database objects that physically exist

62. For developing a water plant application the following statements are captured in the SRS 

i) if the water level goes below 20%, then the application should raise an alarm for immediate 

action

ii) if the water level goes below 15%, then the application should automatically switch on the 

power button to fill in water in the tank

Identify the issue with the requirement specified in the SRS

AnsContradicting requirements

No issues with the requirements

Incomplete requirements

Unreliable requirement

63. Name the Unix command to perform safe shut down a Unix system

AnsPoweroff

Shutdown

Reboot

64. Predict the output

AnsA few many

A few

Many

Compile time error - error: no suitable method found for find(int)

65. Predict the output

Ans6

66. Predict the output

AnsInt 127

67. When constructing looping statements, if the iteration condition Is not terminated, it will 

result in infinite loop. State True or false

AnsTrue

False

68. Predict the output

Hi hi followed by exception

Hi hi hi

Hi hi

Hi

Hi followed by exception

69. Select the statements that are true about Persistence

AnsPersistence is a way through which the life time of object exists even after the program terminates

Java uses serialization for object persistence

Persistence is a way through which the life time of object is terminated as the program terminates

Persistence of object is done by java runtime automatically

70. Predict the output

AnsCompile time error

10

18

8

71. 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.

Ans25000,35000,45000

25000,27000,29000

42000,43000,45000

32000,35000,39000

72. Predict the output

AnsBow Wow

Roar

Bow Wow Roar

Compile time error

73. Choose the statement that true about Class?

AnsClass is a dynamic component

Class is described using attributes and methods

Change the class to change the state of an object

Class properties depends on object properties

74. Which xsd correctly defines a restriction on votingage element where the value is between 18 

and 130

Ans-

<xs:element name=”votingage”><xs:simpleType><xs:restriction 

base=”xs:integer”><xs:minInclusive value=”18”/><xs:maxInclusive 

value=”130”/></xs:restriction></xs:simpleType></xs:element>

75. Given

Public abstract Interface1 {public void method(String s);}

Which of the following is/are correct class implementation(s)

AnsPublic abstract class Class1 implements Interface{

Public abstract void method(String s){}

}

Public abstract class Class1 implements Interface1{}

Public class Class1 extends Interface1{

Public void method(Integer i) {}

}

Public class Class1 implements Interface1{

Public void method(Integer i) {}

}

Public class Classs1 implements Interface1{

Public void method(String i) {}

Public void method(Integer s) {}

}

76. Predict the output

AnsWatermelon Mango Banana Apple -5

77. What is the relationship between these two Building has rooms

AnsComposition

Aggregation

Generalization

Hierarchy

78. If an element is to be retrieved from a specific location in an array, the array has to be _____

AnsTraversed from the first position until the element is found

Added in ascending order and compared with each element

Traversed from the last position to first until the element is found

Sorted in descending order and compared with each element.

79. Predict the output

Ans85 Message 406 80Message

80. In which of the given SDLC models’ rapid changes are easily incorporated

AnsV-model

Agile model

Prototyping model

Waterfall model

81. What is the lifeline in a sequence diagram?

AnsObject’s life time

Actor’s life time

System’s life time

Modelling life time

82. What are the best ways to ensure that a class implements the required behavior?

AnsUse Interface

Method inside interface are public and abstract 

Have a strict testing

Use encapsulation

83. Predict the output

How many objects eligible or GC is reached, how many objects are eligible for Garbage Collection?

Ans – 1 (or 2)

84. Predict the output

Ans- An exception is thrown at runtime

85. What are the types of Interaction Diagrams?

AnsSequence diagram

Collaboration diagram

Activity diagram

State chart diagram

86. A Team is allocated with a new project. All their work needs to be accessed and updated in the 

same repository. Which of the given options would help them achieve this?

AnsSoftware configuration management

Creating a common folder in the server

Creating a common folder local

Using IDE

87. Predict the output?

Ans – 2

88. Choose the correct order in which the Oracle Server evaluate clauses

AnsWhere, group by, having

Where, having, group by

Having, where, group by

Group by, having, where

89. Carefully read the question and answer accordingly

Analysis of selection algorithm eliminates ___ number of elements each time

Ansn elements

n/2 elements

n/4 elements

(n/2) +n elements

90. Predict the output

Ans- Car Ferrari Portofino Portofino

91. Software which controls radiation equipment for patients is best shut down, if it receives bad 

input for a radiation dosage. This is a best example for ________

AnsCorrectness

Robustness

Verification

Validation

92. Predict the output

Ans - *c

93. Predict the output

Ans- Compile time error

94. Predict the output

Ans- 3 1

95. Which concept ensures every change that is made to the artifact can be properly tracked and 

changed?

AnsVersion control

Resource planning

Testing

Review of artifacts

96. Which script code produces the output as Welcome to “Javascript”

Ans-

<script>var x="welcome to \"Javascript\"“; alert(x);</script>

<script>var x="welcome to "Javascript"“; alert(x);</script>

<script>var x="welcome to \"Javascript\"“; x. alert(x);</script>

<script>var x1="welcome to \"Javascript\"“; alert(x);</script>

97. Which is not an attribute of schema element

Anstargetnamespace 

xmlns

elementFormDefault

version

98. What is the output of the following code?

<script> var str=”A bag of apples is full of apples”; var pos=str.indexOf(‘apples’);alert(pos)</script>

Ans= 9

99. Predict the output of the below SQL query

SELECT DISTINCT CITY FROM CUSTOMER;

AnsDisplays all cities

Displays unique cities

Displays distinct cities

Query has syntax error

100. What are the best ways to ensure that a class implements the required behavior?

AnsUser interface

Method inside interface are public and abstract 

Have a strict testing

Use encapsulation

101. O(nlogn) is the best-case time complexity of Bubble Sort. State True or False

AnsTrue

False

102. Predict the output of the following command

$ who | tee userlist.txt

Ans-

The command displays the output on the monitor

The command displays the output of who in the monitor and also saves the output in userlist.txt

The command saves the output in userlist.txt

The command displays an error message on the monitor

103. Which of the given options perform requirement specification- based testing

AnsWhite box testing

Black box testing

Integration testing

Glass box testing

104. Consider the following CSS script

Start program

padding: 20px, 30px;

end program

what is the order of padding property that has two values?

AnsTop and right, left and bottom

Right and left, top and bottom

Top and bottom, right and left

Right and bottom, top and left

105. What is the command to fetch employee id, employee name and salary with 10% increase 

from employee?

Employee(eid,ename,salary)

AnsSelect eid, ename, (salary+salary*0.1) from employee;

Select eid, ename, (salary+salary*10/100) from employee;

Select eid, ename, salary*10% from employee;

Select eid, ename, salary*10/100 from employee;

106. UNIX is more commonly used operating system in comparison with other OS. Choose two 

reason from the below options in support of this statement.

AnsIt is open source software

It is highly secure

It is user friendly

Has good graphical user interface

107. What attribute is used to indicate that an attribute is required for an element in the XSD

Ansuse

required

needed

mandatory

108. Two tables joined using SELF JOIN are different tables with the same columns

AnsTrue

False

109. In HTML, what is the default type of an input element?

Anssubmit

text

hidden

reset

110. What string datatype can be used for string that does not contain line feeds, carriage returns 

or tabs

Ansxs: string

xs: name

xs: nospace

normalisedString

111. 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>

<xs: ordered>

<xs: queue>

<xs: same-order>

112. Which is the HTML5 equivalent of <div id=” content”>

Ans-

<section>

<body>

<article>

<header>

113. Which script displays an alert box with the required information when a button with the 

name msgbtn is clicked

Ans-

<script>document.getElementById(“msgbtn”).addEventListener(“click”,function(){alert(“Welcome to 

button clicks!”);});</script>

<script>document.getElementById(“msgbtn”).EventListener(“click”,function(){alert(“Welcome to 

button clicks!”);});</script>

<script>document.getElementById(“msgbtn”).includeEventListener(“click”,function(){alert(“Welcom

e to button clicks!”);});</script>

<script>document.getElementById(“msgbtn”).addEventListener(“click”,function={alert(“Welcome to 

button clicks!”);));</script>

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

115. 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

Ans- b-f-d-e-c-g-a

116. After the development of the online website for banking, the testers found that the 

application was not user friendly to differently abled people. Identify in which level of testing, the 

testers would have identified this issue

AnsUnit testing

Integration testing

System testing

Acceptance testing

117. In javascript, which of the following popup boxes has the cancel button? Choose one

AnsAlert box and prompt box

Alert box and confirm box

Confirm box and prompt box

Alert box, prompt box and confirm box

118. which of the following is correct if the xsd is <xs: element name=”bgcolor” type=”xs: string” 

fixed=”green”/>

Ans-

<bgcolor>green</bgcolor>

<bgcolor>red</bgcolor>

<bgcolor>green<bgcolor>

<bgcolor>GREEN</bgcolor>

119. Choose a query that will display the names of colleges where the available seats are between 

50 to 100 hint: inclusive of 50 and 100

AnsSelect college_name from college where available_seats=50 and available_seats=100;

Select college_name from college where available_seats 50 and available_seats 100;

Select college_name from college where available_seats between 50 and 100;

Select college_name from college where available_seats between 50 to 100;

120. What will be the XSD definition for the following element <age>40</age>

Ans-

<xs:element name=”age” type=”xs:integer”/>

<xs:element name=”age” type=”Integer”/>

<element name=”age” type=”xs:integer”/>

<xs:element name=”age” type=”xs:int”/>

121. Which is the correct implementation for a progress bar in HTML5

Ans- #review

<progress value=”20” max=”100”></progress>

<progress value:20 max:100></progress>

<progress value max=”20”,”100”></progress>

<progress value=”20” and max=”100”></progress>

122. Which command is used to get intermediate result in a pipeline of commands in Unix

Ans-

tee

grep

wc

ls

123. Carefully read the question and answer accordingly. A simple algorithm may have high 

complexity, whereas a complex algorithm may have lower complexity in the sense of time needed 

for the computations. State true or false

AnsTrue

False

124. Identify which is not an XML Naming Rule

AnsThe names of elements are case- sensitive

Names of elements must not contain spaces

Element names can start with letters xml

An underscore can be used to start an element name

125. Which is not part of HTML5 API

AnsHTML Geolocation

HTML application cache

HTML Drag and Drop

HTML Geography

126. In javascript, which of the following code is valid to get an html element by name? 

Ansdocument.getElementsByName

document.getElementByName

document.getElementsByNames

document.getElementByNames

127. Which of the following options in UNIX can be used for printing the calendar for December 

2019?

Ans-

$ cal 12 2019

$ cal dec 2019

$ cal December 2019

$ calendar 2019

128. Kernel of UNIX operating system is written using ______

AnsC

C++

VC++

JAVA

129. Predict the output

Ans – Compile time error

130. Which option can be used to perform a forward search of string in the vi editor

Ans-

/string

/find

?find

?string

131. Unix executables are stored in which path?

Ans-

/dev

/bin

/usr

/tmp

132. Which command can be used for navigating 5 pages forward in vi editor

Ans5 ctrl + f

5 ctrl +b

5 ctrl + a 20 times

5 ctrl +c 20 times

133. 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 _____

AnsBest case

Worst case

Average case

Null case

134. Constraints ensures _______ and _________ of the data in the database

AnsCorrectness

Reliability

Reuse

Redundancy

135. Predict the output

Ans- Hello John

136. Select the abilities given by Polymorphism to the programming language

AnsStatic polymorphism is achieved by varying the input parameters

Parent class methods can be overridden by the child class

Static class is given as-a part of relationship

Gives a stronger form of aggregation and composition

137. Sam 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 

AnsBoth their changes get committed to the server 

First person change gets committed while for the second one the server notices life differences 

Both the project gets rolled back 

Second project gets overwritten by the first one

138. The following code snippets belong to _________

AnsLinear search

Binary search

Merge search

Quick search

139. With respect to the Java code given below identify the number of references and number of 

objects

Ans4 objects and 3 references

3 objects and 4 references

2 objects and 3 references

3 objects and 3 references

140. What is the output expected for the below code?

Ans- Won’t compile because of Line=6, constructor can’t be static

141. What will be the output of the following Java code?

Ans- “Hello” will be displayed 3 times

142. Consider the following Java code

With respect to Employee class identify where empNo and num are stored int the memeory?

AnsempNo and num both are stored in heap

empNo and num both are stored in stack

empNo is stored in heap and num is stored in stack

empNo is stored in stack and num is stored in heap

143. What will be the output of the following code?

Ans- default

144. Consider the following Java code

If you want to access empName of Employee class in all the sub classes of Employee class in the 

same package as well as sub classes is in some other package; which access specifier will you use?

AnsPublic

Private

Protected

Default

145. Which of the following are inline HTML elements

<i>, <h6>, <a>

Ans- <i> and <a>

146. Consider the javascript code given below. What would be the print values from line 1 and line 

2 on execution?

Ans- 40 40

147. What is the output of the program?

Ans- 15 (20)

148. Consider table Event(EventId, dateOfEvent) has following records 

Event id DateOfEvent

_______ __________

E1 12-JAN-2018

E2

E3 13-JUN-2018

Identify the appropriate SQL statement to retrieve the eventid for which there is no date available

AnsSelect eventide from event where dateOfEvent IS NULL;

Select eventide from event where dateOfEvent = NULL;

Select eventide from event where dateOfEvent LIKE “NULL”;

Select eventide from event where dateOfEvent IS “NULL”;

149. Consider table Department(deptId, deptname) Which of the following query is used to 

display the department details whose dept_name has second letter as ‘a’ and second last letter as 

’e’?

AnsSelect * from department where deptname LIKE ‘_a%e_’;

Select * from department where deptname LIKE ‘a%e_’;

Select * from department where deptname LIKE ‘%a%e_’;

Select * from department where deptname LIKE ‘a%e%’;

150. Consider table Product(prodId, price) Identify the appropriate SQL statement to display all 

the product details whose price range is 2500 and 5000 (exclusive 2500 and 5000) choose two 

most appropriate option

AnsSelect * from product where price BETWEEN 2500 and 5000;

Select * from product where price>2500 and price<5000;

Select * from product where price>=2500 and price<=5000;

Select * from product where price BETWEEN 2501 and 4999;

151. What will be the output of the following Java code?

Ans- GFT will be displayed 4 times

152. Consider the table Item( ItemCode, ItemName, Price, Category). Which is the correct sql 

query to display minimum price for categories ‘A’,’C’? Choose most ppropriate option

Ans- review

Select Category, MIN(Price) from Item where Category IN (‘A’,’C’);

Select Category, MIN(Price) from Item group by category where Category IN (‘A’,’C’);

Select MIN(Price) from Item group by Price having Category IN (‘A’,’C’);

Select Category, MIN(Price) from Item where Category IN (‘A’,’C’) Group by Category;

153. What would be the output of the SQL statement given below? 

SELECT TRANSLATE(‘aAB-Cb-abc’, ‘abc-‘,’123*’) from DUAL;

Ans- 1AB*C2*123

154. Consider table Account(accId, acctype, balance). Identify the appropriate SQL statement to 

display account details in the ascending order of balance and in the descending order of accid if 

the balance is same. Choose most appropriate one

AnsSelect * from account order by balance, accId DESC;

Select * from account order by balance ASC,accId;

Select * from account order by accId DESC, balance ASC;

Select * from Account Order by accId DESC,balance;

155. Consider table Students (sid NUMBER (3), sname VARCHAR2 (10), scontact NUMBER (10)) is 

already created in the database. It is required to change the data type of the column “scontact” to 

VARCHAR2 (15). Which of the following is Correct for the above requirement?

Note: sid column is primary key

Choose most appropriate option

AnsTo change the data type of a column, it is important to ensure that the corresponding column is 

not having data for any of the record

There are no criteria to be followed. We can change the datatype of the column irrespective of the 

data.

Data type can be changed only for primary key column

It is not possible to change the data type of a column

156. Identify the correct statements with respect to constraints

(i) A table can have only one FOREIGN KEY

(ii) A column with UNIQUE constraint cannot have NULL value

AnsOnly (i)

Only (ii)

Both (i) and (ii)

Neither (i) and (ii)

157.What will be displayed in alert box while executing the below code

Ans- 100100

158. Refer the HTML code given below. How many cells will be displayed when the page is 

displayed on the browser?

Ans- 8

159. Assume below code present in the HEAD tag of a HTML page.

<style> #myclass{backgound-color: lightgrey; color:blue;}</style>

Identify the appropriate HTML code to USE the style given Above 

Ans-

<h1 id=”myclass”> Welcome to My Homepage</h1>

<h1 style=”myclass”> Welcome to My Homepage</h1>

<h1 class=”myclass”> Welcome to My Homepage</h1>

<h1 id=”.myclass”> Welcome to My Homepage</h1>

160. What would be the color of the text “Bengaluru” and “India” while executing the below html 

and css code? Assume that “Black” is the default color if there is no style applied

Ans-Bengaluru – Red, India- Green

161. What would be the output of the java script code given below?

Ans- 12

162. Consider the java code given below. How many times will the Grandfather class constructor 

be called?

Ans- (2 times)

Grandfather

Father

Child

Grandfather

Father

163. Which of the following is TRUE about the final keyword?

1. Final variables cannot be modified once initialized

2. Final methods can be overridden 

3. Final classes cannot be inherited

AnsOnly 1

Both 1 and 2

Only 2

Both 1 and 3

164. Which of the following statements is/are FALSE?

a. JVM is platform dependent

b. Byte code is platform dependent

AnsOnly a is false

Both a and b are false

Only b is false

Both a and b are true

165. What will be the output of the following Java code?

Ans- 0

166. What will be printed in alert box in line 1

Ans- 106

167. What would be the output of the javascript code given below

Ans- number

168. Which of the following are Correct statement

a. onClick() and onFocus() are DOM events

b. In javascript a browser is represented by an implicit object called Document

c. Java script is used server-side validation

AnsA and c

Only a

B and c

A and b

169. What would be the output of the java script code given below

Ans- 210

170. What will be the output of the following code?

Ans- hi 10

171. Which code should be inserted at line #4 to get the below output – 2 4 6 8 10

Ansfor(int i=0; i<=evenNumbers.length;i++)

for(int i=0; i<evenNumbers.length-1;i++)

for(int i=0; i<evenNumbers.length;i++)

for(int i=0; i<evenNumbers.length-2;i++)

172. Consider table Book (booId, bookName, copies) has following records

bookId bookName copied

______ _________ ______

B1 JAVA 0

B2 4

B3 ORACLE 2

Identify the output of the given sql statement 

SELECT COUNT (bookName) FROM Book WHERE copies>0;

Ans- 1

173. Consider table Employee (empId, empname, jobband). Choose the correct sql statement to 

retrieve all employee ids along with their job band. If job band is not assigned to an employee, 

then it should display ‘NA’ as job band (note: Data type of column jobBand is VARCHAR2)

AnsSELECT empId, NVL(jobband),’NA’ FROM Employee;

SELECT empId, NVL(jobband,NULL,’NA’) FROM Employee;

SELECT empId, NVL(NULL,’NA’,jobband) FROM Employee;

SELECT empId, NVL(jobband,’NA’) FROM Employee;

174. Refer the following Java code

When the above code is executed how many time/times “Hello” will be printed on the console?

Ans- 1 time

175. Consider table Students(studentId,branchId). Identify the correct sql statement to retrieve 

the branches which has more than 3 students.

AnsSELECT branched FROM Students WHERE COUNT(*)>3 GROUP BY branched;

SELECT branched FROM Students HAVING COUNT(*)>3;

SELECT branched FROM Students GROUP BY studentid HAVING COUNT(*)>3;

SELECT branchid FROM Students GROUP BY branchid HAVING COUNT(*)>3;

176. With respect to the java code given below identifythe relationship that exists between class 

account and SavingsAccount

AnsAggregation

Composition

There is no relationship between class Account and class SavingsAccount

Inheritance

177. Which of the following statement/s is/are TRUE?

1. Abstract method can have body

2. Abstract class cannot be instantiated

3. Abstract class can have constructor

AnsBoth 1 and 2 are true

Both 2 and 3 are true

Both 1 and 3 are true

Only 2 is true

178. Given the following declaration which expression returns the size of the array, assuming the 

array has been initialized?

Int[] array;

AnsArray[].length();

Array.length();

Array.length;

Array[].size();

179. What will be the output of the following java code?

Ans- Lower Case Letter

180. Identify how many variables/object will be in stack and heap residency?

Ans3 in stack 1 in heap

2 in stack 2 in heap

4 in stack 0 in heap

0 in stack 4 in heap

181. Refer to the below code and predict the output

How many String objects are created in the above code? 

Ans2

3

1

4

182. Consider the Employee class given below

If you do not want all the subclasses of Employee class to override the computeSalary() method, 

what modification will you do for computeSalary() method?

AnsMake computeSalary() method as abstract

Make computeSalary() method as final

Make computeSalary() method as static

183. Choose most appropriate option

Ans- 50 40 50 40

184. Identify the relationship that exists between class Student and class Faculty.

AnsComposition

Inheritance

No relationship

Aggregation

185. Which is the correct CSS code to display the text “Accenture” in light grey background? 

Choose most appropriate option

Ans-

<h2 style = “background-color : lightgrey”> Accenture </h2>

<h2 background-color : lightgrey> Accenture </h2>

<h2 style = “background-color(lightgrey)”> Accenture </h2>

<h2 style = “background-color = lightgrey”> Accenture </h2>

186. Which of the following are the CSS selectors?

a. Element selector

b. form selector 

c. class selector

AnsA and b

A and c

B and c

A, b and c

187. Consider the java code given below and determine how many references are used in the java 

code. Assume the student is a valid java class

Ans2 objects and 4 references

4 objects and 2 references

2 objects and 2 references

3 objects and 4 references

188. Predict the output of the following code

Ans- Welcome hello

189. Predict the output

AnsCompilation error: illegal modifier for the constructor in type Employee

190. What would be the output of the below java script code?

Ans- false—false

191. You have three packages p1,p2,p3 what is the expected output of compiling and running file 

tester in p3 package?

AnsAccount CurrentAccount

Compilation error at line6 in package p3 Constructor ‘Account’ is not visible

Compilation error at line3 in package p3 cannot import CurrentAccount class

192. What will be the output of the following java code

Ans10000

0

Null

Compilation error at Line-1 : Implicit super constructor: Employee() is undefined Must explicitly 

invoke another constructor

193. Refer to the below code and predict the output

Ans- 2

194. Consider table Item(itemId, category, unitprice). Identify the appropriate SQL statement to 

display the category and count of items in each category in the ascending order of item count. It 

should display the item details only if the count of item is greater than 1

AnsSELECT category, count(itemId) FROM item WHERE Count(itemId)>1 GROUP BY category ORDER BY 

COUNT (itemId);

SELECt category, count(itemId) FROM item GROUP BY category HAVING Count(itemId)>1 ORDER 

BY COUNT(itemId);

SELECT category,count(itemId) FROM item HAVING Count(itemId)>1 ORDER BY COUNT(itemId);

195. Consider table Item(itemId, category, unitprice). Identify the appropriate SQL statement to 

display Item id, and discount in the ascending order of discount

AnsSelect itemid, discount=unitprice*0.1 from Item order by discount;

Select itemId, unitprice*0.1 as discount from Item order by discount;

Select itemid, discount from item order by discount;

Select itemId, unitprice*0.1 as discount from item order by itemId;

196. You are suppose to create a table “ExamResult” with the following descripton. studentId 

NUMBER(4), courseid VARCHAR(10), mark NUMBER(3). There should not be duplicate 

combination of studentId, and courseid in any record. Identify the correct DDL statement to create 

ExamResult table

AnsCREATE TABLE ExamResult( studentId NUMBER(4), courseid VARCHAR2(10), mark NUMBER(3), 

CONSTRAINT er_pk PRIMARY KEY(studentId, courseid));

197. Kevin is a java programmer. He writes a Java code and compiles his code. What type of file 

Kevin will get as a result of compiling his Java code?

AnsJava file

.exe file

.class file

Obj file

198. Ram is a Developer; he receives a defect list from the testing team for the code which he 

developed. He fixes the defects and assigns it back to the test manager/tester. What should be the 

status of the defect now?

AnsOpen

Fixed

Closed

New

199. Software Configuration Management, ________ concept is used to control the changes

AnsBaseline

Process

Procedure

Audit

200. Consider the given array:

E A F B D C

E A F B D C 

A E F B D C

A E B F D C

A E B D F C

A E B D C F…. so on

After all consecutive iterations, the array is sorted

Which sorting technique compares the adjacent data elements and swaps each pair of elements?

AnsQuick sort

Bubble sort

Merge sort

Heap sort

201. Difficult Unit test performed on the post office savings schemes module. Assume that the 

minimum deposit amount is Rs. 1000 and the maximum deposit amount is Rs. 10000. Based on the 

Boundary Value Analysis choose the correct test cases to perform this unit test.

Ans999,1000,10000,10001

800,6000,15000

999,1001,5000,9999,10001

1000,5000,10000

202. John is a poker card player in a casino. The way he arranges his cards as he picks them up one 

by one is a real time example of which sorting technique?

AnsBubble sort

Merge sort

Insertion sort

Selection sort

203. In many situations, it would be necessary to make a decision before arriving at a conclusion 

or to go on to the next step of processing. Which of the following suits the given description?

AnsConditional statement

All of the options

Iterative statement

Sequential statement

204. which of the following program has the lowest run-time complexity?

AnsTower of Hanoi

Sum of n Digits

Find even or odd

Fibonacci series

205. Manual execution of steps in an algorithm is called as ________.

AnsDry run

Flowchart

Quick run

Pseudocode

206. In case of Banking application, customers are the only stakeholders State true or false

Ans-0

207. Dave has to store data in a nonlinear data type to represent hierarchical relationship 

between elements. Which data structure should he use for it?

AnsLinked List

Stack

Queue

Tree

208. The names in a telephone directory were not in order. It took a long time to look for the 

telephone number of a particular person. Which algorithm would be the best to resolve this issue.

AnsBinary Search

Linear Search

Deletion Algorithm

Sorting Algorithm

209. Roshan is a beginner in the learning path of Data Structure. Assume a singly linked list of 

length n is given. In a worst-case scenario, he wants to find out the maximum number of 

computations required to search for a given element. Help Roshan to find out the best option

AnsLog 2 n

N

Log 2n+1

Log 2n-1

210. A Professor class uses the Scheduler class to display the scheduled classes of the professor for 

a week. What will be the relationship between the Professor and the Schedule class?

AnsInheritance

Aggregation

Composition

Dependency

211. A system administrator needs to identify different types of files in the UNIX system. Help by 

matching the correct symbols used to identify the file type

1. - 2. l 3.b 4.c

With

a. Regular file b. Link file c. Block device file d. Character device file

Ans1-A, 2-B, 3-C, 4-D

1-D, 2-A, 3-B, 4-C

1-D, 2-B, 3-C, 4-A

1-D, 2-C, 3-B, 4-A

212. Choose the executable query to display contact_details by concatenating mail_id and the 

phone number of employees (multiple answers possible)

Example: table name- employee

Mail-id phone_number 

123@gmail.com 9755367343

Sample output: 123@gmail.com,9755367343

AnsSELECT concat(mail_id, phone_number) as contact_details FROM employee;

SELECT mail_id, (‘,’), phone_number as contact_details FROM employee;

SELECT concat(concat(mail_id,’,’),phone_number) as contact_details FROM employee;

SELECT || mail_id || ‘,’ || phone_number as contact_details FROM employee;

213. Zara marketing company wants to keep track of the attendance of its employees in all of their 

branches so that the salary calculation can be done from the Central office located at Bangalore. 

The head office has delegated the work to the branch offices so that they can keep track of the 

attendance in any manner, be it manual or biometric or swipe cards etc.

For the above scenario, identify the correct statements from the given options.

AnsHead office is an abstract class

Branch office is an abstract class

Head office is a concrete class

Branch office is a concrete class

Both head office and branch office are abstract classes

214. Which of the following statements are true in regard to the object-oriented programming 

technique?

1. object is a blueprint or template for a class

2. class is a blueprint or template for an object

3. object is an instance of a class

4. class is an instance of an object

Ans1 2 only

1 4 only

2 3 only

3 4 only

215. Assume a class Student with the attributes id, name, grade and collegeName. The value for 

collegeName is “Trindy” which is same for all the objects of the Student class. What type of 

variable is collegeName?

AnsStatic variable

Instance variable possessed by each object

Local variable for the class

Public variable

216. Predict the output

Ans- 10

217. What does an action flow represents in an Activity Diagram?

Ans-

Transition from one action state to another

Passing of data from activity to another

Trigger events

Flow of priority flows

218. Which of these is used to prevent the error ‘ORA-00937’ not a single group group function?

AnsUse group by clause

Use where clause

Use order by clause

Use having clause

219. Which key can be used to change the mode from input mode to command mode?

AnsEsc

Esc + i

Esc + a

Esc + l

220. Match the following

1. Tables 2. Index 3. Views 4. Synonyms 5. Sequences

a. store all the data in database 

b. indicate where data is stored in another table 

c. modify the user’s view of data to only certain rows and columns in a table

d. definable label for a table 

e. generate unique integers that can be assigned primary keys of tables

Ans1-A, 2-B, 3-C, 4-D, 5-E

1-E, 2-A, 3-B, 4-C, 5-D

1-D, 2-E, 3-C, 4-A, 5-B

1-D, 2-C, 3-E, 4-A, 5-B

221. Choose an DDL command which delete all rows from the table and where the deleted data 

cannot be rolled back (hint: Table structure should not get deleted)?

AnsDROP

TRUNCATE

DELETE

None of the above

222. Match the following data command with the correct output

Consider today’s date is 22nd April 2020

1. date +%b 2. data +%D 3. date +%F 4. date +%H

With

a. Apr b. 04/22/20 c. 20-04-22 d.05

Ans1-A, 2-B, 3-C, 4-D

1-D, 2-A, 3-B, 4-C

1-D, 2-B, 3-C, 4-A

1-D, 2-C, 3-B, 4-A

223. predict the output for the given pseudocode snippet

SET count = 1

WHILE count less than or equal to 5

 Print “Hello world”

 Count = count+1

END WHILE

AnsPrints “Hello world” 5 times

Prints “Hello world” 6 times

Loop goes on infinitely

Prints “Hello world” 4 times

224. Predict the output

Ans- 3

225. Match the metacharacters with the respective types

1. ?”[][!] 2. > >> < << 3. ,() & && || 4. $1 to $9

a. Positional parameters b. Filename substitution c. I/O Redirection d. Process Execution 

Ans1-A, 2-B, 3-C, 4-D

1-D, 2-A, 3-B, 4-C

1-D, 2-B, 3-C, 4-A

1-D, 2-C, 3-B, 4-A

226. the standard output of one program can be redirected as standard input to another program 

using _________

Ans-

|

||

>

<

227. Consider the query 

Start program

DELETE FROM departments WHERE department_id=50;

ERROR 1: ORA-02292: integrity constraint (HR.EMP_DEPT_FK) violated – child record found

End program.

What does the error convey?

AnsYou cannot delete a row, if the row’s primary key column holds a input that is present as a foreign 

key in another table

You cannot delete a row when it has column level constraints

You cannot delete a row when it has table level constraints

None of the options

228. Which of the following

a. int number();

b. float average

c. double[] marks;

d. counter int[];

Ans229. Consider the following code snippet and predict the output

Ans- Compilation error at Line-1 : The blank final field ‘x’ may not have been initialized

230. What will be the output of the following Java code

Ans- 1003

231. What is the output of the following Java code

Ans- Compilation error

232. Predict the output

Ans- ONE TWO THREE

233. Consider the table Product (pid, pname, pcost) Identify the appropriate SQL statement to 

rename the table to ProductsInfo.

AnsALTER TABLE Products RENAME TO ProductInfo;

234. Consider the table Account (accId, balance, accountType). The following constraints to be 

enforced

1. AccId should be unique and NOT NULL

2. Account type should be ‘C’ or ‘S’. Balance should be greater than 1000 and 3000 for account 

type ‘C’ and ‘S’ respectively.

Identify the CORRECT SQL statement to create the Account table with the above mentioned 

constraints.

AnsCREATE TABLE account (accid NUMBER (2) CONSTRAINT acc_pk PRIMARY KEY, balance NUMBER 

(4), accountType CHAR , CONSTRAINT acc_chk CHECK (accountType=’S’ AND balance>3000) OR 

(accountType=’C’ AND balance>1000));

235. 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

236. Display the contents present inside <h1> tag in uppercase. Which of the following options will 

suit the requirement?

Ans- h1{text-transform: uppercase;}

237. __________ is an unparsed character data that can’t be parsed be the parser.

Ans- CDATA

238. In a CSS script, each property of an element is separated by a ______

Ans – semicolon (;)

239. In CSS script, which of the following style is used to print a table with double border?

Ans- border-style: double;

240. An external Java script file can be included in an HTML code using the ______ attribute in a 

script tag

Ans – src

241. Predict the output

Ans- Run time exception

242. Which of the following tag is not supported in HTML5 but used in HTML4?

Ans- <hr>

243. which OOP principle is the ranking or ordering of abstraction

Ans- hierarchy

244. The object which is used to fetch the input from an element for processing is ______

Ans- document

Form

navigate

245. Predict the output

Ans- [One, 1, null, 3.4, null]

246. in which of the following statements can sub queries used?

Ans –

SELECT statement and UPDATE statement

Alter statement

DELETE statement

All of the above

247. Match the appropriate options to move cursors in the vi editor

1. l 2. k 3. h 4. b

With

a. move cursor down one line

b. move cursor up one line 

c. move cursor left one line

d. move cursor to beginning of next word

Ans1-A, 2-B. 3-C, 4-D 

248. For a logically cohesive module, there are some activities to be experimented. These activities 

are preferred from inside the module itself

Is the above given statement true? If not, choose the correct option to make it true.

Ansthe activities are selected from outside the module

the activities are selected in a random manner

the activities are selected in a sorted manner

the given statement is true

249. Which of the given pseudocodes finds the perimeter (circumference) of the circle radius

AnsBEGIN

NUMBER radius, circumference

INPUT radius

Circumference=2*3.14*radius

OUTPUT circumference

END

250. which of the given statements are true with respect to hierarchy principle of OOP

AnsGeneralization represents “IS A” relationship between classes

251. Predict the output

Ans- Run time exception

252. Predict the output

Ans – 1 3 8

253. Predict the output

Which of the following statement has to be uncommented in order to compile the above code 

without any errors?

AnsReturn new ArrayList<TempEmp<();

254. which of the following is a well formed XML document?

AnsStartprogram

<employee>

<empname>ravi</employeename>

<address location=”north”>nehrunagar</laddress>

 <phone>23251545</phone>

</employee>

Endprogram

255. Which of the following java script code helps to change the content of the anchor tag?

Startprogram

<script>

function func(){

// insert the appropriate code from the given options

}

</script>

<a href=”#” id=”hid1” onclick=”func()”> click here </a>

End program

Ans=

Document.getElementById(“hid1”).innerHTML=”clicked”

256. which of the following jQuery script is valid to hide the first occurred paragraph with the class 

name as hideMe

Ans – review

$(“p.hideMe:hide(first)”);

257. consider the table Project (ProjectId, ProjectName, ProjectType) is created without any 

constraint and has the records as per attachment

ProjectId ProjectName ProjectType

P1 FIN A1

P2 SALE A2

P1 FIN A1

Identify the ALTER statement which executes successfully on project table.

AnsALTER TABLE Project ADD CONSTRAINT proj_pk PRIMARY KEY(ProjectId);

ALTER TABLE Project ADD CONSTRAINT proj_uk UNIQUE(ProjectName);

ALTER TABLE Project ADD CONSTRAINT proj_no NOT NULL(ProjectType);

ALTER TABLE Project ADD CONSTRAINT proj_chk CHECK(ProjectType IN(“A1”,”A2”));

258. Consider table Player(PlayerId, PlayerName, Rating) has records as shown below.

PlayerId PlayerName Rating

P1 Sachin 5

P2 ABD 4.3

P3 Virat 4.6

P4 Watson 4.3

P5 Butler 4.6

Identify the appropriate SQL statement to display the player details whose rating is equal to 

Virat’s rating or Watson’s rating (note: Result can have Virat’s and Watson’s record as well)

AnsSELECT * FROM Player where Rating IN (SELECT Rating FROM Player WHERE PlayerName = “Virat” 

or PlayerName= “Watson”);

259. What access specifier can be used for computeSalary() method in Employee class so that code 

in Line-1 will execute without any error?

Ans- Either public or protected or default

260. Consider the tables given below

Customer (customerId, customerName)

Book (bookId, bookName)

Purchase (purchaseId, bookId, customerId)

bookId and customerId in purchase table are foreign keys referring to Book and Customer book 

tables respectively. Which is the CORRECT SQL statement to retrieve name and book name for all 

books purchased by customers?

AnsSELECT c.customerName, b.bookName FROM customer c INNER JOIN purchase p ON 

c.customerId=p.customerId INNER JOIN book b ON b.bookId=p.bookId;

261. Which command can be used in vi editor to delete 10 lines?

Ans – 10 dd

262. What operator is used to present the error “ORA-01427: single row sub query returns more 

than one row?

Ans – Use the IN operator

263. a company wants to create a Leave Management System software for its employees. Find the 

classes for Employee Leave Management software. The company wants to maintain its 

employee’s leave information.

Ans- (some chose company also)

Employee

Leave

Company

Project

264. Choose an SQL query to find name of all the employees whose name contain the word 

“kumar” example kumaran, arun kumar (kumar will be at any place)

AnsSELECT * FROM employees where lower(name) like “%kumar%”;

265. the element to specify a list of predefined options for input controls is

Ans- <datalist>

266. Given the following XML document

<studentname>

<first>raveena</first>

<last>dantan</last>

</studentname>

What is a correct schema structure for it?

AnsStartprogram

<xsd:schema xmlns:xsd=”http://www.w3.org2001/XMLSchema”>

<xsd:element name=”studentname”>

<xsd:complexType>

<xsd:sequence>

<xsd:element ref=”first />

<xsd:element ref=”last />

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

Endprogram

267. Predict the output

Ans- IndexOutOfBoundException

268. Predict the output

Ans – CTE

269. Consider the following java code

Identify the CORRECT Java code which will help you to create an instance of Software Engineer

Ans- SoftwareEngineer engineer = new SoftwareEngineer(“Dave”,1007);

270. Given two executable queries

a.) select name, address from users where user_id not in(select user_id from bookingdetails where 

lower(name)=’city union bank’) order by name;

b.) select name, address from users where user_id in (select user_id from bookingdetails where 

lower(name) != “city union bank”) order by name;

will both queries produce the same output?

Ans- True

271. State True or False

A sequence diagram can represent object interactions arranged in a time sequence. It will 

represent only a sequence of the flow but aspects like branching, looping cannot be represented in 

the sequence diagram

Ans- False

272. Mrs, Nancy has a Pan Card

What is the cardinality relationship between the entities: Person and Pan card

Ans- One to One

273. In the City Library when a member needs to return a book, the librarian will collect the 

penalty from the member if the book is returned later than the due date. When this is represented 

in a use case diagram, what is the relationship between the use cases “Return Book” and 

“Calculate Penalty”?

Ans- extend

Include

Exclude

Generalization

realization

274. which of the following statements are true with respect to “a query with join operation”?

AnsYou must refer to all the columns from both tables with ….

You must refer to the columns that are common to 2 tab…

You must have the column common to 2 tables in the….

You can sort your result by a column which is not p…..

275. which of these have higher precedence: the AND operator or the NOT operator?

AnsAND

NOT

Both have equal precedence

None of the above

276. Which of the following statements is true with respect to given Oracle query 

Start program

Create table AQI_DELHI_1 as Select * from AQI_DELHI;

End program

AnsTable “AQI_DELHI_1” is created with same structure as that of “AQI_DELHI” table – with 

AQI_DELHI table’s data

The query is erogenous

Table “AQI_DELHI_1” is created with same structure as that of “AQI_DELHI” table – without

AQI_DELHI table’s data

277. Which jQuery is syntactically wrong?

Ans-

<script>$(document).ready(function(){$(“#flow”).click(function

$(“#box”).slideDown(“slow”);});});</script>

278. what is the syntax for representing the minimum of an element in XMLSchema?

Ans-

<xsd:element ref=”note” minOccurs=”0” />

<xsd:element ref=”note” mins=”0” />

<xsd:elements ref=”note” minOccur=”0” />

<xsd:elements ref=”note” minOccur=”0” />

279. what is a lifeline in a Sequence Diagram?

AnsObjects’s life time

Actor’s life time

System’s life time

Modelling life time

280. what is the use of a DTD in XML development?

AnsIt is required for validating XML documents

For displaying a particular section of XML code

For avoiding name collisions

For giving more control over structure and content of XML document

281. Consider the given problem statement

You have to input 100 numbers and find the sum of the 100 numbers and display the process of 

the sum.

Identify which of the given pseudo code snippets would achieve the desired result.

Ans- (pls understand I’m not gonna type all snippets :D) All of the option

282. Predict the output

Ans- (Map=IDIB1001,map=IDIB1000)

1 / 48

Arumalla

a.jyothi.priyanka@accenture.com Finish State: Normal

Test Taken on: January 31, 2019 02:36:16 PM IST

0

hr

44

min

Registration Details

Overall Summary

MARKS SCORED

Score Percentile Percentage

Section #1 42 / 50 89 84

Total 42 / 50 89 84

Percentile is among 1473 candidate(s) who've taken this test.

SUMMARY OF ATTEMPTS TIME TAKEN

Available time: 1 hr 20 min

TOTAL QUESTIONS

50

GF Mock 2

Email

Address:

a.jyothi.priyanka@accenture.com First Name: Arumalla

42 Correct

(Scored 42/42)

8 Incorrect

(Scored 0/8)

2 / 48

Question 1: Time: 21 Sec Marks: 1/ 1

Question 2: Time: 17 Sec Marks: 1/ 1

Question-wise Details

Section #1

Which of the following statement(s) is/are TRUE?

1) JavaScript is case sensitive

2) JavaScript can be placed only in head tag

3) JavaScript can be placed both in head tag and body tag

4) JavaScript is used for client side validations

Options Response Answer

3 and 4 only

1,3 and 4 only

2,3 and 4 only

1,2,3 and 4

3 / 48

Question 3: Time: 56 Sec Marks: 1/ 1

Refer the Incomplete JavaScript code given below:

<script>

var gVar='This is global value';

function aFun(){

var gVar='Local Data1';

//Line1

}

</script>

<button onclick='aFun()'>Click</button>

Identify the CORRECT option which if placed at Line1 will display the alert message 'This is global value'

Options Response Answer

alert(gVar)

alert(global.gVar)

alert(document.gVar)

alert(window.gVar)

4 / 48

Question 4: Time: 59 Sec Marks: 0/ 1

What will be the output of the following Java code?

public class ApplicationTester {

public static void main(String[] args){

int data1=10, data2=10;

if (data1 > data2){

System.out.println("1");

} else {

System.out.println("2");

}

}

}

Choose the most appropriate option.

Options Response Answer

1

2

The code will display both 1 and 2

Compilation error: Invalid use of ‘if’

5 / 48

Question 5: Time: 2 Min 4 Sec Marks: 0/ 1

What will be the output of the following Java code?

class Person {

public void work() {

System.out.println(”Person Work's”);

}

}

public class Employee extends Person {

public void work() {

System.out.println(”Employee Work's”);

}

public static void main(String[] args) {

Employee employee=new Employee();

Person p=employee;

p.work();

}

}

Choose the most appropriate option.

Options Response Answer

Employee Work's

Person Work's

Employee Work's

Compilation Error : work method in

Employee cannot have same signature

as that of it's parent Person

Person Work's

6 / 48

Question 6: Time: 56 Sec Marks: 0/ 1

What will be the output of the following Java code?

public class ApplicationTester {

public static void main(String[] args) {

char letterArray[]={'a','A','h','h','m','m'};

for(int index=0;index<letterArray.length;index++){

if(letterArray[index] == letterArray[index+1]){

break;

}

System.out.print(index + " ");

}

}

}

Choose the most appropriate option.

Options Response Answer

0 1 2

0 1

0 1 2 3

0 1 2 3 4

7 / 48

Question 7: Time: 7 Sec Marks: 1/ 1

What will be the output of the following Java code?

interface A{

void display(); // Line X

}

class B implements A{

void display(){ // Line Y

System.out.println("B");

}

}

public class Demo{

public static void main(String[] args) {

A a=new B(); // Line Z

a.display();

}

}

Choose the most appropriate option.

Options Response Answer

Compilation error at Line Z: Invalid

reference type

B

Compilation error at Line X: missing

‘abstract’ keyword

Compilation error at Line Y: cannot

reduce the visibility of the method

An end to end testing of application by client users is known as ----------

Choose the most appropriate option.

8 / 48

Question 8: Time: 31 Sec Marks: 1/ 1

Question 9: Time: 25 Sec Marks: 1/ 1

Options Response Answer

Acceptance Testing

Unit Testing

Product Testing

Performance Testing

Consider the Java code given below:

public class Student{

//Attributes of Student class

//getter and setter methods

}

public class ApplicationTester{

public static void main(String[] args){

Student stu1=new Student();

Student stu2=new Student(12345,"Rama");

Student stu3;

stu3=stu1;

}

}

With respect to the above code, how many Student objects and references are created in main method?

Choose the most appropriate option.

Options Response Answer

3 Objects, 3 References

3 Objects , 2 References

2 Objects, 3 References

2 Objects, 2 References

9 / 48

Question 10: Time: 14 Sec Marks: 1/ 1

Question 11: Time: 2 Min 21 Sec Marks: 0/ 1

Which of the following is/are TRUE with respect to method overloading?

a. Method name should be the same

b. Return type of the methods should be the same

c. Number of parameter and sequence of parameter must be different

Choose the most appropriate option.

Options Response Answer

Both (b) and (c ) are TRUE

Only (a) is TRUE

Both (a) and (b) are TRUE

Both (a) and (c ) are TRUE

What are the benifits of ADM?

(1) Project standardization and customization

(2) Common project management framework

Choose the most appropriate option.

Options Response Answer

Both (1) and (2)

Only (1)

Neither (1) Nor (2)

Only (2)

10 / 48

Question 12: Time: 1 Min 53 Sec Marks: 0/ 1

Assume that table Event is created using the below script.

CREATE TABLE Event(

EventId VARCHAR2(5) CONSTRAINT Event_PK PRIMARY KEY,

EventName VARCHAR2(20) CONSTRAINT Event_NN NOT NULL,

StageNumber NUMBER(2) DEFAULT 1,

NumberOfParticipants NUMBER(2));

Identify the correct insert statements which can be applied on Event table

a) INSERT INTO Event VALUES('E1','Dance',NULL,2);

b) INSERT INTO Event VALUES('E1','Speech',1);

c) INSERT INTO Event(EventId,EventName) VALUES('E3','Drama');

d) INSERT INTO Event(EventId,StageNumber,NumberOfParticipants) VALUES('E4',4,7)

Options Response Answer

a and c

a and d

a and b

b and c

11 / 48

Consider the below tables.

Customer(customerId,customerName) - customerId is primary key

Account(accountId,accountType,balance,customerId) - accountId is primary key and customerId is foreign key

Which is the CORRECT SQL statement to retrieve customerId, customerName, accountId and balance for all customers. It

should also display the details of the customers who are not having any account.

Options Response Answer

SELECT c.customerId,c.customerNam

e,a.accountId,a.balance

FROM account a RIGHT OUTER JOIN

customer c

ON c.customerId=a.customerId;

SELECT c.customerId,c.customerNam

e,a.accountId,a.balance

FROM customer c RIGHT OUTER

JOIN account a

ON c.customerId=a.customerId;

SELECT c.customerId,c.customerNam

e,a.accountId,a.balance

FROM customer c INNER JOIN

account a

ON c.customerId=a.customerId;

SELECT c.customerId,c.customerNam

e,a.accountId,a.balance

FROM account a LEFT OUTER JOIN

customer c

ON c.customerId=a.customerId;

12 / 48

Question 13: Time: 33 Sec Marks: 0/ 1

Question 14: Time: 1 Min 41 Sec Marks: 1/ 1

Consider the following Java code. Identify the relationship between class Employee and class PartTimeEmployee.

public class Employee {

private int empId;

private String empName;

}

public class PartTimeEmployee extends Employee {

private float noOfHours;

}

Choose the most appropriate option.

Options Response Answer

Composition

Aggregation

Realization

Generalization

13 / 48

Consider the following tables:

Account(AccountNumber, AccountOpeningDate, Balance). Here AccountNumber is

the primary key.

Transaction(TransactionId, AccountNumber, DateOfTransaction, Amount, TransactionType);

Here TransactionId is the primary key and AccountNumber is the foreign key

referencing AccountNumber in Account table.

Which is the CORRECT query to display AccountNumber and balance of accounts on which NO transaction was done after '31-

Dec-2015';

Options Response Answer

SELECT AccountNumber,Balance

FROM Account

WHERE AccountNumber NOT IN

(SELECT AccountNumber FROM

Transaction);

SELECT AccountNumber,Balance

FROM Account

WHERE AccountNumber NOT IN

(SELECT AccountNumber FROM

Transaction

WHERE DateOfTransaction = '31-Dec2015');

14 / 48

Question 15: Time: 1 Min 20 Sec Marks: 1/ 1

SELECT AccountNumber,Balance

FROM Account

WHERE AccountNumber IN

(SELECT AccountNumber FROM

Transaction

WHERE DateOfTransaction > '31-Dec2015');

SELECT AccountNumber,Balance

FROM Account

WHERE AccountNumber NOT IN

(SELECT AccountNumber FROM

Transaction

WHERE DateOfTransaction > '31-Dec2015');

15 / 48

What will be the output of the following Java code?

Policy.java

public class Policy {

private void readPolicy(){

System.out.println("Policy - readPolicy()");

}

public void writePolicy(){

System.out.println("Policy - writePolicy()");

}

}

MoneyBackPolicy.java

public class MoneyBackPolicy extends Policy{

public void readPolicy(){

System.out.println("MoneyBackPolicy - readPolicy()");

}

public void writePolicy(){

System.out.println("MoneyBackPolicy - writePolicy()");

}

}

DynamicBindingTester.java

public class DynamicBindingTester {

public static void main(String[] args){

Policy policy = new MoneyBackPolicy();

policy.readPolicy();

}

}

Choose the most appropriate option.

Options Response Answer

MoneyBackPolicy - readPolicy()

Compilation error: The method

readPolicy() from the type Policy is not

visible

There is no error in the code, but the

code will not display any output.

Policy - readPolicy()

16 / 48

Question 16: Time: 31 Sec Marks: 1/ 1

Question 17: Time: 12 Sec Marks: 1/ 1

What will be the output of the following Java code?

package x;

public class Student{

void display(){ // Line 1

System.out.println("Hello");

}

}

package y;

import x.Student; // Line 2

public class TestFinalClass {

public static void main(String[] args) {

Student s = new Student();

s.display(); // Line 3

}

}

Choose the most appropriate option.

Options Response Answer

The code will print Hello

Compilation error at Line 2 : Cannot

import class Student from package x

Compilation error at Line 3 : The

method display from type Student is not

visible

Compilation error at Line 1 : No access

specifier defined for method display

17 / 48

Refer the JavaScript code given below.

<html>

<head>

<script>

function aFun(){

var num1=111;

var num2="111";

alert(num1==num2) //Line1

alert(num1===num2) //Line2

}

</script>

</head>

<button onclick='aFun()'>Click</button>

</html>

When the above code is executed, what will be the output produced by Line1 and Line2?

18 / 48

Question 18: Time: 2 Min 19 Sec Marks: 1/ 1

Options Response Answer

Output from Line1: true, Output from

Line2: true

Output from Line1: false, Output from

Line2: true

JavaScript will show a compilation error

as "===" is not defined

Output from Line1: true, Output from

Line2: false

19 / 48

Assume that table Customer has some records as shown below.

CUSTOMERID ACCOUNTNUMBER BALANCE

1 100 2000

2 100 500

3 101 2500

4 101 1000

Identify the CORRECT SQL statement to display the output as shown below.

CUSTOMERID ACCOUNTNUMBER BALANCE

4 101 1000

3 101 2500

2 100 500

1 100 1000

20 / 48

Question 19: Time: 31 Sec Marks: 1/ 1

Options Response Answer

select * from customer order by

balance;

select * from customer order by

accountnumber, balance ;

select * from customer order by

accountnumber desc,balance desc;

select * from customer order by

accountnumber desc,balance;

Assume that table Player has the following records.

PlayerId Salary PlayerAverage

P1 25000 75.5

P2 20000 70

P3 22000 70.5

How many row(s) will be deleted after executing the SQL statement given below?

DELETE FROM Player WHERE Salary>20000 OR PlayerAverage<=70;

21 / 48

Question 20: Time: 16 Sec Marks: 1/ 1

Options Response Answer

0

3

1

2

Assume that table Employee has following records.

EmpId JobBand DeptId

1001 A 10

1002 B 30

1003 A 20

1004 A 10

Which is the CORRECT SQL statement to display the output as show below.

JobBand DeptId

A 10

A 20

B 30

22 / 48

Question 21: Time: 27 Sec Marks: 1/ 1

Options Response Answer

SELECT DISTINCT jobBand,DeptId

from Employee;

SELECT DISTINCT

jobBand,DISTINCT DeptId from

Employee;

SELECT DISTINCT jobBand,DeptId

from Employee WHERE jobBand='A'

AND jobBand='B';

SELECT DISTINCT

jobBand,DISTINCT DeptId from

Employee WHERE jobBand='A' AND

jobBand='B';

Which of the following code inserted in Line #3 prints the below output?

3 6 9 12 15 18

1. public class ForLoopTester {

2. public static void main(String[] args) {

3. // Code to be inserted

4. }

5. }

Choose the most appropriate option.

23 / 48

Question 22: Time: 57 Sec Marks: 1/ 1

Options Response Answer

for(int number = 3; number < 20;

number++){

System.out.print(number + " ");

}

for(int number = 0; number < 20;

number+3){

System.out.print(number + " ");

}

for(int number = 3; number < 20;

number+=3){

System.out.print(number + " ");

}

for(int number = 0; number < 20;

number+=3){

System.out.print(number + " ");

}

What will be the output of the following Java code?

public class StringTester{

public static void main(String[] args) {

String s1=new String("Accenture");

String s2=new String("India Limited");

s1.concat(s2);

System.out.println(s1);

}

}

Choose the most appropriate option.

24 / 48

Question 23: Time: 23 Sec Marks: 1/ 1

Question 24: Time: 15 Sec Marks: 1/ 1

Options Response Answer

Accenture

Accenture India Limited

India Limited

Accenture India

Refer the class declarations given below:

class A{ }

class B extends A{ }

class C extends B{ }

class D extends C{ }

Identify the INCORRECT statement.

Choose the most appropriate option.

Options Response Answer

A a = new D();

C c=new B();

B b=new D();

C c=new C();

25 / 48

Question 25: Time: 29 Sec Marks: 1/ 1

Which of the following actions should be performed to ensure cyber safety at a user level?

(i) Automatic downloads from the websites should be enabled

(ii) Automatic security updates should be installed

(iii) Firewall should be turned off if the system has the latest security update

Choose the most appropriate option

Options Response Answer

Both (i) and (iii)

Both (i) and (ii)

Both (ii) and (iii)

Only (ii)

Only (iii)

Consider the Java code given below.

public class DemoArray {

public static void main(String args[]){

int array[]={2,4,6,8};

int sum=0;

//insert here

System.out.println(sum);

}

}

Which of the following line inserted independently in the above code will result in sum of array elelments?

Choose the most appropriate option.

26 / 48

Question 26: Time: 17 Sec Marks: 1/ 1

Options Response Answer

sum=array[0]+array[1]+array[2]+array[3

]+array[4];

sum=array[1]+array[2]+array[3]+array[4

];

for(int i=0;i<array.length;i++) {

sum=sum+array[i]; }

for(int i=1;i<array.length;i++) {

sum=sum+array[i]; }

Refer the HTMLcode given below.

<html>

<body>

<table border="1">

<tr><th>A</th> <th colspan="2">B</th>

<tr> <th rowspan="3">C</th> <th>D</th> <th>E</th> </tr>

<tr> <th>A</th> <th rowspan="2">B</th></tr>

<tr> <th>D</th>

</table>

</body>

</html>

How many cells will be displayed when the page is displayed on the browser?

27 / 48

Question 27: Time: 14 Sec Marks: 1/ 1

Question 28: Time: 21 Sec Marks: 1/ 1

Options Response Answer

8

7

10

9

Performance feedback allows which of the following actions?

(1) To take action to improve your skills and performance so you are effective in your current and future roles

(2) To have your say about how you think your colleagues are performing

Choose the most appropriate option.

Options Response Answer

Only (2)

Only (1)

Both (1) and (2)

Neither (1) Nor (2)

28 / 48

Question 29: Time: 34 Sec Marks: 1/ 1

Which of the following statement(s) are FALSE regarding Java Architecture?

(i) Byte code or .class file is platform independent

(ii) JVM is platform independent

Choose the most appropriate option.

Options Response Answer

Only (i) is FALSE

Both (i) and (ii) are FALSE

Only (ii) is FALSE

Both (i) and (ii) are TRUE

In HTML, Which is the CORRRECT code to display a hyper link "Click"?

[Note: While clicking on "Click" it should direct to accenture portal]

29 / 48

Question 30: Time: 1 Min 2 Sec Marks: 1/ 1

Options Response Answer

<a ref="https://portal.accenture.com">

Click </a>

<a href="https://portal.accenture.com",

Click </a>

<a href="https://portal.accenture.com">

Click </a>

<a href="Click">

https://portal.accenture.com </a>

Consider the table Project(projectId, projectType,budget).

Which is the CORRECT SQL statement to retrieve the projectType(s) which has more than 10 projects?

Options Response Answer

SELECT projectType FROM project

WHERE COUNT(projectId)>10

GROUP BY projectId;

SELECT projectType FROM project

GROUP BY projectType

HAVING COUNT(projectId)>10;

SELECT projectType FROM project

WHERE COUNT(projectId)>10

GROUP BY projectType;

SELECT projectType FROM project

GROUP BY projectId

HAVING COUNT(projectId)>10;

30 / 48

Question 31: Time: 25 Sec Marks: 1/ 1

Question 32: Time: 2 Min 23 Sec Marks: 1/ 1

Consider table Employee(EmployeeId, EmployeeName,DeptCode) .

Which is the CORRECT SQL query to display the EmployeeId and EmployeeName of employees who are working in DeptCode

10 OR 20?

(i) SELECT EmployeeId,EmployeeName FROM Employee WHERE DeptCode IN (10,20);

(ii) SELECT EmployeeId,EmployeeName FROM Employee WHERE DeptCode = 10 OR DeptCode = 20;

Options Response Answer

Both (i) and (ii)

Neither (i) nor (ii)

Only (i)

Only (ii)

Consider the below tables.

Publisher(PublisherCode, PublisherName, Address, Email). Here PublisherCode is the primary key;

Book (ISBN, Title, Author, Price, PublisherCode). Here ISBN is the Primary Key and PublisherCode is the foreign key

referencing the PublisherCode in Publisher table.

Which is the CORRECT SQL query to display ISBN, Title, Author, PublisherCode and PublisherName for all the books.

31 / 48

Question 33: Time: 3 Min 26 Sec Marks: 0/ 1

Options Response Answer

SELECT Book.ISBN, Book.Title,

Book.Author, Book.PublisherCode,

Publisher.PublisherName

FROM Book INNER JOIN Publisher

ON Book.PublisherCode =

Publisher.PublisherCode;

SELECT

ISBN,Title,Author,PublisherCode,Publis

herName

FROM Book INNER JOIN Publisher

ON PublisherCode = PublisherCode;

SELECT Book.ISBN, Book.Title,

Book.Author, Book.PublisherCode,

Publisher.PublisherName

FROM Book,Publisher;

SELECT Book.ISBN, Book.Title,

Book.Author, Book.PublisherCode,

Publisher.PublisherName

FROM Book SELF JOIN Publisher

ON Book.PublisherCode =

Publisher.PublisherCode;

32 / 48

Question 34: Time: 42 Sec Marks: 1/ 1

Refer the code given below:

Employee emp = new Employee();

Employee emp1 = new Employee();

Employee emp2 = emp;

Employee emp3;

emp=null;

emp3=emp;

//Line1

Assume that class Employee is a valid Java class.

How many objects are eligible for garbage collection at Line1?

Choose the most appropriate option.

Options Response Answer

2

1

3

0

There is a requirement to create a web page with a text box. The page should be loaded with a value "Hello" in the text box.

Which is the CORRECT html code to meet the above requirement?

33 / 48

Question 35: Time: 39 Sec Marks: 1/ 1

Options Response Answer

<html>

<input type="text" id="Hello"/>

</html>

<html>

<input type="text" name="Hello"/>

</html>

<html>

<input type="text" onLoad="Hello"/>

</html>

<html>

<input type="text" value="Hello"/>

</html>

Assume that Table Customer is created in database using the create statement given below.

CREATE TABLE Customer(

CustomerId NUMBER(5) CONSTRAINT cust_pk PRIMARY KEY,

CustomerName VARCHAR2(20) CONSTRAINT cust_nn NOT NULL);

Choose the appropriate ALTER statement to drop primary key constraint of table Customer.

34 / 48

Question 36: Time: 23 Sec Marks: 1/ 1

Question 37: Time: 9 Sec Marks: 1/ 1

Options Response Answer

ALTER TABLE Customer DROP

cust_pk;

ALTER TABLE Customer DROP

CONSTRAINT cust_pk;

ALTER TABLE Customer DROP

PRIMARY KEY CONSTRAINT;

ALTER TABLE Customer DROP

PRIMARY KEY CONSTRAINT

cust_pk;

Which of the following statement/s is/are TRUE with respect to Agile?

(1) Focuses on an iterative, incremental, and flexible approach to software development

(2) Development of software takes place in sequential phases

Choose the most appropriate option

Options Response Answer

Both (1) and (2) are FALSE

Only (1) is TRUE

Only (2) is TRUE

Both (1) and (2) are TRUE

35 / 48

What will be the output of the following Java code?

public abstract class Bank {

protected double amount;

public Bank(){

this.amount = 1000.0;

}

public abstract void createAccount();

public double getAmount(){

return this.amount;

}

}

public class MyBank extends Bank{

public MyBank(){

this.amount = 2000.0;

}

public void createAccount(){

System.out.println("Account created");

}

}

public class ApplicationTester {

public static void main(String[] args){

Bank b = new MyBank();

b.createAccount();

System.out.println(b.getAmount());

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

36 / 48

Question 38: Time: 30 Sec Marks: 1/ 1

Options Response Answer

Account created

1000.0

Compilation error at Line 4: Cannot

have constructor in abstract class

'Bank'

Compilation error at Line 24: Cannot

have a reference of type 'Bank'

Account created

2000.0

Assume that below code is present in the head tag of a HTML page.

<style>

.myclass{

background-color: lightgrey;

color:blue;

}

</style>

Which is the CORRECT way of using this style?

Options Response Answer

<h1 id="myclass">Welcome to My

Homepage</h1>

<h1 style="myclass">Welcome to My

Homepage</h1>

<h1 class="myclass">Welcome to My

Homepage</h1>

<h1 class=".myclass">Welcome to My

Homepage</h1>

37 / 48

Question 39: Time: 2 Min 48 Sec Marks: 1/ 1

Consider table Project(projectId, projectType, budget).

Which is the CORRECT SQL statement to display projectId, projectType and budget of project which is having minimum budget

in each project type?

38 / 48

Options Response Answer

SELECT p1.projectId,

p1.projectType,p1.budget FROM

project p1

WHERE p1.budget IN(

SELECT MIN(p2.budget) FROM

project p2

WHERE

p1.projectType=p2.projectType);

SELECT p1.projectId,

p1.projectType,p1.budget FROM

project p1

WHERE p1.budget IN(

SELECT MIN(p2.budget) FROM

project p2);

SELECT p1.projectId,

p1.projectType,p1.budget FROM

project p1

WHERE MIN(p1.budget)IN(

SELECT MIN(p2.budget) FROM

project p2

WHERE

p1.projectType=p2.projectType);

SELECT p1.projectId,

p1.projectType,p1.budget FROM

project p1

WHERE p1.budget IN(

SELECT MIN(p2.budget) FROM

project p2

WHERE p1.budget=p2.budget);

39 / 48

Question 40: Time: 2 Min 24 Sec Marks: 0/ 1

What will be the output of the following Java code?

MyInterface1.java

public interface MyInterface1 {

public void method1();

}

MyInterface2.java

public interface MyInterface2 {

void method2();

}

MyClass.java

public class MyClass implements MyInterface1, MyInterface2{

public void method1(){

System.out.print ("1 ");

}

void method2(){

System.out.print ("2");

}

}

InterfaceTester.java

public class InterfaceTester {

public static void main(String[] args){

MyClass reference = new MyClass();

reference.method1();

reference.method2();

}

}

Choose the most appropriate option.

40 / 48

Question 41: Time: 28 Sec Marks: 1/ 1

Question 42: Time: 6 Sec Marks: 1/ 1

Options Response Answer

Compilation error: MyClass cannot

implement more than one interface

Compilation error: method2 in

MyInterface2 must be defined with

public access specifier

Compilation error: Cannot reduce the

visibility of the inherited method from

MyInterface2

1 2

What will be the output of the following Java code?

public class ApplicationTester {

public static void main(String[] args) {

switch(10/2){

default: System.out.print (" Action ");

case 2 : System.out.print (" Cut ");

break;

case 10 : System.out.print (" Start ");

}

}

}

Choose the most appropriate option.

Options Response Answer

Action Cut Start

Action Cut

Start

Action

41 / 48

Question 43: Time: 19 Sec Marks: 1/ 1

Question 44: Time: 24 Sec Marks: 1/ 1

Which among the following are DevOps Principle?

(i) Automate Everything

(ii) Test early and often

(iii) Strong source control

Choose the most appropriate option.

Options Response Answer

Only (i) and (ii)

Only (i) and (iii)

Ony (ii) and (iii)

All (i), (ii) and (iii)

Which of the following statment/s is/are TRUE with respect to Community Cloud?

(1) Exclusively owned and operated by a single organization

(2) Available for use by a shared community consisting of several organizations

Choose the most appropriate option.

Options Response Answer

Neither (1) Nor (2)

Only (1)

Both (1) and (2)

Only (2)

42 / 48

Question 45: Time: 43 Sec Marks: 1/ 1

What will be the output of the following Java code?

public class ApplicationTester {

public static void main(String[] args){

int data = 20;

switch(data){

case 20:

System.out.print(" Twenty ");

case 10:

System.out.print(" Ten ");

case 0:

System.out.print(" Zero ");

}

}

}

Choose the most appropriate option.

Options Response Answer

Program will display “Twenty Ten

Zero”

Program will display “Twenty”

Program will display “Twenty Ten”

Program will display “Ten Zero”

43 / 48

Question 46: Time: 1 Min 50 Sec Marks: 1/ 1

What will be the output of the following Java code?

package mypackage1;

public class Parent {

public Parent(){

System.out.print(" 1 ");

}

}

package mypackage1;

public class Child extends Parent{

protected Child(){

System.out.println(" 2 ");

}

}

package mypackage2;

public class ApplicationTester{

public static void main(String[] args){

mypackage1.Child child = new mypackage1.Child();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

Options Response Answer

1 2

2 1

Compilation error at Line 12: Invalid

access specifier 'protected' for the

constructor 'Child()'

Compilation error at Line 21: The

constructor Child() is not visible

44 / 48

Question 47: Time: 59 Sec Marks: 1/ 1

What will be the output of the following Java code?

public class StaticTester{

private static int count;

public static void main(String[] args) {

count++;

new StaticTester().count++;

StaticTester.count--;

StaticTester s = new StaticTester();

s.count = s.count + 5;

StaticTester staticTester = new StaticTester();

System.out.println("Count is " +staticTester.count);

}

}

Choose the most appropriate option.

Options Response Answer

Count is 1

Count is 6

Count is 0

Count is 5

45 / 48

Assume that table Customer has the following records.

Cid Cname

10 James

11 Jack

12 HARY

13 MARK

Identify the CORRECT SQL statement to display the output as follows.

Cname

James

Jack

Options Response Answer

SELECT cname FROM customer

WHERE cname LIKE'_a%' OR cname

LIKE '%k';

SELECT cname FROM customer

WHERE cname ='_a%' AND cname

='%k';

SELECT cname FROM customer

WHERE cname LIKE '_a%' AND

cname LIKE '%k';

SELECT cname FROM customer

WHERE cname ='_a%' OR cname

='%k';

46 / 48

Question 48: Time: 13 Sec Marks: 1/ 1

Question 49: Time: 2 Min 15 Sec Marks: 1/ 1

Arrange the following stages of Project Lifecycle according to SDLC.

(1) Planning

(2) Initiation

(3) Closing

(4) Execution

Choose the most appropriate option.

Options Response Answer

(1) - (2) - (4) - (3)

(2) - (1) - (4) - (3)

(1) - (2) - (3) - (4)

(2) - (1) - (3) - (4)

47 / 48

What will be the output of the following Java code?

Vehicle.java

public class Vehicle {

private float enginePower;

public Vehicle(float enginePower){

this.enginePower = enginePower;

}

public float getEnginePower(){

return enginePower;

}

}

FourWheeler.java

public class FourWheeler extends Vehicle{

private String type;

public FourWheeler(){

this.type = "LMV";

}

public FourWheeler(String type, float enginePower){

this.type = type;

}

public String getType(){

return type;

}

}

InheritanceTester.java

public class InheritanceTester {

public static void main(String[] args){

FourWheeler vehicle = new FourWheeler("HMV", 3.5F);

System.out.println(vehicle.getType() + " " + vehicle.getEnginePower());

}

}

Choose the most appropriate option.

48 / 48

Question 50: Time: 16 Sec Marks: 1/ 1

Options Response Answer

LMV 0.0

Error in the code: Implicit super

constructor Vehicle() is undefined. Must

explicitly invoke another constructor

null 3.5

HMV 3.5

Assume that my_style.css is an existing and a valid css file. Which is the CORRECT way to refer this external style sheet?

Options Response Answer

<style rel="stylesheet" type="text/css"

href= "my_style.css" />

<stylesheet type="text/css" href=

"my_style.css" />

<link rel="stylesheet" type="text/css"

href= "my_style.css" />

<link> href= "my_style.css" </link>

1 / 49

kamal.g.sharma

kamal.g.sharma@accenture.com Finish State: Normal

Test Taken on: February 28, 2019 03:05:43 PM IST

0

hr

53

min

Registration Details

Overall Summary

MARKS SCORED

Score Percentile Percentage

Section #1 30 / 50 24 60

Total 30 / 50 24 60

Percentile is among 2152 candidate(s) who've taken this test.

SUMMARY OF ATTEMPTS TIME TAKEN

Available time: 1 hr 20 min

TOTAL QUESTIONS

50

GF Mock 2

Email

Address:

kamal.g.sharma@accenture.com First Name: kamal.g.sharma

30 Correct

(Scored 30/30)

20 Incorrect

(Scored 0/20)

2 / 49

Question 1: Time: 1 Min 33 Sec Marks: 1/ 1

Question-wise Details

Section #1

What will be the output of the following Java code?

Policy.java

public class Policy {

private void readPolicy(){

System.out.println("Policy - readPolicy()");

}

public void writePolicy(){

System.out.println("Policy - writePolicy()");

}

}

MoneyBackPolicy.java

public class MoneyBackPolicy extends Policy{

public void readPolicy(){

System.out.println("MoneyBackPolicy - readPolicy()");

}

public void writePolicy(){

System.out.println("MoneyBackPolicy - writePolicy()");

}

}

DynamicBindingTester.java

public class DynamicBindingTester {

public static void main(String[] args){

Policy policy = new MoneyBackPolicy();

policy.readPolicy();

}

}

Choose the most appropriate option.

3 / 49

Question 2: Time: 39 Sec Marks: 1/ 1

Question 3: Time: 3 Min 49 Sec Marks: 1/ 1

Options Response Answer

There is no error in the code, but the

code will not display any output.

Compilation error: The method

readPolicy() from the type Policy is not

visible

Policy - readPolicy()

MoneyBackPolicy - readPolicy()

Consider the Java code given below. When the code is executed, how many times "1" will be printed?

public class Tester{

public static void main(String[] args){

for(int i=0; i < 5; i++){

if(i > 2){

continue;

}

System.out.print(" 1 ");

}

}

}

Choose the most appropriate option.

Options Response Answer

5 times

6 times

3 times

2 times

4 / 49

Refer the code given below:

public class Vehicle {

private int vehicleId;

private String vehicleName;

public Vehicle(int vehicleId, String vehicleName) {

this.vehicleId = vehicleId;

this.vehicleName = vehicleName;

}

// Assume Getters and Setters are coded

}

public class Car extends Vehicle {

private String carModel;

private double average;

//Line1

// Assume getters and Setters are already coded...

}

Choose a valid Constructor implementation to be inserted at Line1 to make the above code compile successfully

Choose the most appropriate option.

5 / 49

Question 4: Time: 41 Sec Marks: 1/ 1

Options Response Answer

public Car(int vehicleId, String

vehicleName, String carModel,double

average) {

//Java code to initialize carModel and

average

super(vehicleId, vehicleName);

}

public Car(int vehicleId, String

vehicleName, String carModel,double

average) {

this.carModel = carModel;

this.average = average;

}

public Car(int vehicleId, String

vehicleName, String carModel,double

average) {

super(vehicleId, vehicleName);

//Java code to initialize carModel and

average

}

public void Car(int vehicleId, String

vehicleName, String carModel,double

average) {

super(vehicleId, vehicleName);

//Java code to initialize carModel and

average

}

6 / 49

Question 5: Time: 1 Min 16 Sec Marks: 1/ 1

What will be the output of the following Java code?

class Employee {

public Employee() {

System.out.println("From Constructor of Employee");

}

}

public class Tester {

public static void main(String[] args) {

Employee[] employee = new Employee[5];

employee[0] = new Employee(); //Line2

}

}

Choose the most appropriate option.

Options Response Answer

Compilation error at Line2: Invalid

assignment operation

Prints the "From Constructor of

Employee" 1 times

Prints the "From Constructor of

Employee" 5 times

Prints the "From Constructor of

Employee" 6 times

7 / 49

Refer the code given below:

class Employee{

public void printDetails(){

Printer printer = new Printer();

printer.print("Test Print");

}

}

class Printer{

public void print(String str){

System.out.println("Priting Details: "+str);

}

}

Choose from below a valid option that represents the relationship in between the classes Employee and Printer

Choose the most appropriate option.

Options Response Answer

Generalization

Composition

Specialization

Aggregation

8 / 49

Question 6: Time: 14 Sec Marks: 1/ 1

Question 7: Time: 40 Sec Marks: 0/ 1

Which of the following statement(s) is/are TRUE?

1) GET method is the default form submission method

2) Check box is a multi select control

Options Response Answer

Both 1 and 2

Neither 1 nor 2

Only 1

Only 2

Consider the below tables.

Actor(actorId,actorName) - actorId is primary key

Event(eventId,eventName) - eventId is primary key

Registration(registrationId,actorId,eventId) - actorId and eventId are foreign keys

Which is the CORRECT SQL statement to retrieve actorId, actorName and eventId for all actors who has registered for an

event. If any actor is not registered for any event, still the actor details should be displayed.

9 / 49

Question 8: Time: 49 Sec Marks: 0/ 1

Options Response Answer

SELECT

a.actorId,a.actorName,r.eventId

FROM Actor a LEFT OUTER JOIN

Registration r

ON a.actorid=r.actorid;

SELECT

a.actorId,a.actorName,r.eventId

FROM Actor a CROSS JOIN

Registration r

ON a.actorid=r.actorid;

SELECT

a.actorId,a.actorName,r.eventId

FROM Actor a RIGHT OUTER JOIN

Registration r

ON a.actorid=r.actorid;

SELECT

a.actorId,a.actorName,r.eventId

FROM Actor a INNER JOIN

Registration r

ON a.actorid=r.actorid;

Consider the table Student(StudentId, StudentName, Email, PercentageOfMarks).

Which is the CORRECT query to display the details in the decreasing order (highest to lowest) of PercentageOfMarks and in

the alphabetical order (A-Z) of StudentName in case PercentageOfMarks is the same.

10 / 49

Question 9: Time: 46 Sec Marks: 1/ 1

Options Response Answer

SELECT StudentId, StudentName,

Email, PercentageOfmarks

FROM Student ORDER BY

StudentName, PercentageOfMarks

DESC;

SELECT StudentId, StudentName,

Email, PercentageOfmarks

FROM Student ORDER BY

PercentageOfMarks DESC,

StudentName;

SELECT StudentId, StudentName,

Email, PercentageOfmarks

FROM Student ORDER BY

PercentageOfMarks, StudentName;

SELECT StudentId, StudentName,

Email, PercentageOfMarks

FROM Student ORDER BY

PercentageOfMarks DESC,

StudentName DESC;

Which is the correct CSS code to display the text "Accenture" in light grey back ground?

11 / 49

Question 10: Time: 2 Min 35 Sec Marks: 0/ 1

Options Response Answer

<h2 backgroundcolor:lightgrey>Accenture</h2>

<h2 style="backgroundcolor=lightgrey">Accenture</h2>

<h2 style="backgroundcolor:lightgrey">Accenture</h2>

<h2 style="backgroundcolor(lightgrey)">Accenture</h2>

12 / 49

Consider the following CREATE TABLE STATEMENT which successfully creates the table Student. Assume that University

table already exists with University Codes 'VTU', 'STU', and 'CMU'.

CREATE TABLE Student (StudentId Number(5) CONSTRAINT Student_PKey PRIMARY KEY,

Name Varchar2(30) CONSTRAINT Student_Null NOT NULL,

Email Varchar2(30) CONSTRAINT Student_Unique UNIQUE,

UniversityCode Varchar2(10)

CONSTRAINT Student_Fkey REFERENCES University(UniversityCode));

Currently student table contains only one row as shown below.

(1001,'Jack','jack@gmail.com','STU');

Which of the following INSERT statement would successfully insert the row into "Student" table?

Options Response Answer

INSERT INTO Student

VALUES(1005,'Joe','joe@gmail.com','N

IT');

INSERT INTO Student

VALUES(1001,'James','james@gmail.c

om','CMU');

INSERT INTO Student

VALUES(1003,'Mary','jack@gmail.com'

,'vtu');

INSERT INTO Student

VALUES(1003,'Scott','scott@gmail.co

m','VTU');

13 / 49

Question 11: Time: 34 Sec Marks: 1/ 1

Question 12: Time: 1 Min 9 Sec Marks: 1/ 1

Assume that table Event is having the following records. Identify the correct query to retrieve all event records which has got a

stage number.

EVENTID EVENTNAME STAGENUMBER

E1 Drama

E2 Dance 2

E3 Speech 1

Options Response Answer

SELECT * FROM Event WHERE

StageNumber IS NOT EQUAL TO

NULL;

SELECT * FROM Event WHERE

StageNumber <> NULL

SELECT * FROM Event WHERE

StageNumber IS NOT NULL

SELECT * FROM Event WHERE

StageNumber != NULL

14 / 49

What will be the output of the following Java code?

public abstract class Bank {

protected double amount;

public Bank(){

this.amount = 1000.0;

}

public abstract void createAccount();

public double getAmount(){

return this.amount;

}

}

public class MyBank extends Bank{

public MyBank(){

this.amount = 2000.0;

}

public void createAccount(){

System.out.println("Account created");

}

}

public class ApplicationTester {

public static void main(String[] args){

Bank b = new MyBank();

b.createAccount();

System.out.println(b.getAmount());

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

15 / 49

Question 13: Time: 2 Min 24 Sec Marks: 1/ 1

Options Response Answer

Account created

1000.0

Compilation error at Line 24: Cannot

have a reference of type 'Bank'

Account created

2000.0

Compilation error at Line 4: Cannot

have constructor in abstract class

'Bank'

Consider the table Project(projectId, projectType,budget).

Which is the CORRECT SQL statement to retrieve the count of projects which is of type 'FIN' or' SALE'? It should count for 'FIN'

and 'SALE' separately.

16 / 49

Question 14: Time: 1 Min 0 Sec Marks: 0/ 1

Options Response Answer

SELECT

projectType,COUNT(projectId)

FROM project

WHERE projectType IN('FIN','SALE')

GROUP BY projectType;

SELECT

projectType,COUNT(projectId)

FROM project

WHERE projectType IN('FIN','SALE')

GROUP BY projectId;

SELECT

projectType,COUNT(projectId)

FROM project

WHERE projectType IN('FIN','SALE');

SELECT

projectType,COUNT(projectId)

FROM project

GROUP BY projectId

HAVING projectType IN('FIN','SALE');

17 / 49

Question 15: Time: 32 Sec Marks: 1/ 1

What will be the output of the following Java code?

class Person {

public void work() {

System.out.println(”Person Work's”);

}

}

public class Employee extends Person {

public void work() {

System.out.println(”Employee Work's”);

}

public static void main(String[] args) {

Employee employee=new Employee();

Person p=employee;

p.work();

}

}

Choose the most appropriate option.

Options Response Answer

Employee Work's

Person Work's

Employee Work's

Compilation Error : work method in

Employee cannot have same signature

as that of it's parent Person

Person Work's

Which testing technique tests the functionality of the application without looking at the internal structure of the code?

i. Black Box Testing

ii. Assembly Testing

iii. Product Testing

iv. White Box Testing

Choose the most appropriate option.

18 / 49

Question 16: Time: 42 Sec Marks: 1/ 1

Question 17: Time: 49 Sec Marks: 1/ 1

Options Response Answer

Product Testing

White Box Testing

Black Box Testing

Assembly Testing

Which of the following statement(s) are FALSE regarding Java Architecture?

(i) Byte code or .class file is platform independent

(ii) JVM is platform independent

Choose the most appropriate option.

Options Response Answer

Only (ii) is FALSE

Both (i) and (ii) are FALSE

Only (i) is FALSE

Both (i) and (ii) are TRUE

19 / 49

Question 18: Time: 2 Min 29 Sec Marks: 1/ 1

Assume that table Player has following records.

PlayerId Salary PlayerAverage

P1 25000 75.5

P2 20000 70

P3 22000 70.5

How many row(s) will be deleted after executing the SQL statement given below?

DELETE FROM Player WHERE Salary>=20000 AND PlayerAverage<70;

Options Response Answer

1

ERROR: No matching record in Player

table.

0

2

20 / 49

Consider the below tables are created and has some records.

Account(accountId,balance) - account id is primary key

Transaction(transactionId,accountId,transactionType,amount) - AccountId is foreign key referring to accountId of account table

Assume that Transaction table has records for more than one accountId. Which is the CORRECT SQL statement to retrieve all

accountId(s) for which there is no transactions are recorded?

Options Response Answer

SELECT accountid FROM account

WHERE accountid NOT IN(

SELECT accountid FROM transaction);

SELECT accountid FROM account

WHERE accountid IN(

SELECT accountid FROM transaction);

SELECT accountid FROM account

WHERE accountid NOT IN(

SELECT * FROM transaction);

SELECT accountid FROM account

WHERE accountid !=

(SELECT accountid FROM

transaction);

21 / 49

Question 19: Time: 28 Sec Marks: 1/ 1

Question 20: Time: 1 Min 36 Sec Marks: 0/ 1

Consider the table Employee(empId,empName,jobBand).

Which is the CORRECT SQL statement to retrieve all unique jobBand from Employee table ?

Options Response Answer

SELECT DISTINCT jobBand,empId

from Employee;

SELECT jobBand DISTINCT from

Employee;

SELECT jobBand from Employee

DISTINCT;

SELECT DISTINCT jobBand from

Employee;

22 / 49

What will be the output of the following Java code?

Vehicle.java

public class Vehicle {

private float enginePower;

public Vehicle(float enginePower){

this.enginePower = enginePower;

}

public float getEnginePower(){

return enginePower;

}

}

FourWheeler.java

public class FourWheeler extends Vehicle{

private String type;

public FourWheeler(){

this.type = "LMV";

}

public FourWheeler(String type, float enginePower){

this.type = type;

}

public String getType(){

return type;

}

}

InheritanceTester.java

public class InheritanceTester {

public static void main(String[] args){

FourWheeler vehicle = new FourWheeler("HMV", 3.5F);

System.out.println(vehicle.getType() + " " + vehicle.getEnginePower());

}

}

Choose the most appropriate option.

23 / 49

Question 21: Time: 1 Min 11 Sec Marks: 0/ 1

Question 22: Time: 1 Min 38 Sec Marks: 0/ 1

Options Response Answer

null 3.5

Error in the code: Implicit super

constructor Vehicle() is undefined. Must

explicitly invoke another constructor

LMV 0.0

HMV 3.5

Consider table Account(customerid, accountid, accounttype,balance) has been created with customerid as primary key.

Identify ALTER statement which executes successfully on account table. [Note: Table has no records]

Options Response Answer

ALTER TABLE Account ADD

CONSTRAINT acc_chek

CHECK(accounttype IN('C','S'));

ALTER TABLE Account DROP

Balance;

ALTER TABLE Account ADD

CONSTRAINT PRIMARY

KEY(customerid, accountid);

ALTER TABLE Account ADD

CONSTRAINT acc_null NOT

NULL(accounttype);

24 / 49

Consider the below tables.

Publisher(PublisherCode, PublisherName, Address, Email). Here PublisherCode is the primary key;

Book (ISBN, Title, Author, Price, PublisherCode). Here ISBN is the Primary Key and PublisherCode is the foreign key

referencing the PublisherCode in Publisher table.

Which is the CORRECT SQL query to display ISBN, Title, Author, PublisherCode and PublisherName for all the books.

25 / 49

Question 23: Time: 21 Sec Marks: 1/ 1

Options Response Answer

SELECT Book.ISBN, Book.Title,

Book.Author, Book.PublisherCode,

Publisher.PublisherName

FROM Book,Publisher;

SELECT

ISBN,Title,Author,PublisherCode,Publis

herName

FROM Book INNER JOIN Publisher

ON PublisherCode = PublisherCode;

SELECT Book.ISBN, Book.Title,

Book.Author, Book.PublisherCode,

Publisher.PublisherName

FROM Book INNER JOIN Publisher

ON Book.PublisherCode =

Publisher.PublisherCode;

SELECT Book.ISBN, Book.Title,

Book.Author, Book.PublisherCode,

Publisher.PublisherName

FROM Book SELF JOIN Publisher

ON Book.PublisherCode =

Publisher.PublisherCode;

26 / 49

Question 24: Time: 1 Min 50 Sec Marks: 0/ 1

What will be the output of the following Java code?

public class ApplicationTester {

public static void main(String[] args){

String company = new String("Accenture Solutions Pvt Ltd");

String[] tokens = company.split(" ");

System.out.println(tokens.length);

}

}

Choose the most appropriate option.

Options Response Answer

4

1

0

3

27 / 49

Question 25: Time: 2 Min 5 Sec Marks: 0/ 1

What will be the output of the following Java code?

package mypackage1;

public class Parent {

public Parent(){

System.out.print("1 ");

}

protected void parentMethod(){

System.out.println(" 3 ");

}

}

package mypackage2;

import mypackage1.Parent;

public class Child extends Parent{

public Child(){

System.out.println("2");

}

}

package mypackage2;

public class ApplicationTester{

public static void main(String[] args){

Child child = new Child();

child.parentMethod();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

Options Response Answer

Compilation error at Line 27: The

method parentMethod() from the type

Parent is not visible

1 2

Compilation error at Line 7:

'parentMethod' cannot be 'protected'

1 2 3

28 / 49

Consider the table Employee (EmployeeId, Name, CareerLevel, Salary).

Which is the CORRECT SQL query to display EmployeeId, Name, CareerLevel and Salary of employees who are getting the

maximum salary in each career level?

Options Response Answer

SELECT EmployeeId, Name,

CareerLevel, Salary

FROM Employee E1 WHERE Salary

IN(

SELECT max(Salary) FROM Employee

E2

WHERE E2.salary = E1.salary);

SELECT EmployeeId, Name,

CareerLevel, Salary

FROM Employee E1 WHERE

max(Salary) IN

(SELECT max(Salary) FROM

Employee E2

WHERE E2.CareerLevel =

E1.CareerLevel);

SELECT EmployeeId, Name,

CareerLevel, Salary

FROM Employee E1 WHERE Salary IN

(SELECT max(Salary) FROM

Employee E2);

29 / 49

Question 26: Time: 4 Min 27 Sec Marks: 1/ 1

SELECT EmployeeId, Name,

CareerLevel, Salary

FROM Employee E1 WHERE Salary IN

(SELECT max(Salary) FROM

Employee E2

WHERE E2.CareerLevel =

E1.CareerLevel);

Identify the CORRECT method which can be added in to class MyClass

public class MyClass {

public int display(int num1,float num2){

return 0;

}

public double display(String name, int salary) {

return 0.0;

}

}

Choose the most appropriate option.

30 / 49

Question 27: Time: 1 Min 9 Sec Marks: 1/ 1

Options Response Answer

public String display(String name, int

salary{

return "success";

}

public float display(int num1,float

num2){

return 0.0f;

}

public void display(int num1,String

num2){ }

public double display(String empName,

int empId){

return 0.0;

}

What will be the output of the following Java code?

public class MyClass{

public MyClass() {

System.out.println("Inside constructor");

}

static {

System.out.println("Inside static block 1");

}

static {

System.out.println("Inside static block 2");

}

public static void main(String[] args) {

System.out.println("Inside main method");

}

}

Choose the most appropriate option.

31 / 49

Question 28: Time: 17 Sec Marks: 1/ 1

Question 29: Time: 24 Sec Marks: 1/ 1

Options Response Answer

Inside main method

Inside static block 1

Inside static block 2

Inside static block 1

Inside static block 2

Inside main method

Inside main method

Inside main method

Inside constructor

Inside static block 1

Inside static block 2

Arrange the following stages of Project Lifecycle according to SDLC.

(1) Planning

(2) Initiation

(3) Closing

(4) Execution

Choose the most appropriate option.

Options Response Answer

(1) - (2) - (4) - (3)

(1) - (2) - (3) - (4)

(2) - (1) - (3) - (4)

(2) - (1) - (4) - (3)

32 / 49

Question 30: Time: 1 Min 2 Sec Marks: 0/ 1

What are the benifits of ADM?

(1) Project standardization and customization

(2) Common project management framework

Choose the most appropriate option.

Options Response Answer

Both (1) and (2)

Neither (1) Nor (2)

Only (1)

Only (2)

What will be the output of the following Java code?

public class ApplicationTester {

public static void main(String[] args){

int[] array = {-23,-1,-15,-11,-8};

int max = 0;

for(int i=0; i < array.length; i++){

if( array[i] > max){

max = array[i];

}

}

System.out.println(max);

}

}

Choose the most appropriate option.

Options Response Answer

-8

-23

-1

0

33 / 49

Question 31: Time: 43 Sec Marks: 0/ 1

Question 32: Time: 52 Sec Marks: 1/ 1

What will be the output of the following Java code?

public class MyClass {

public static void main(String args[]) {

int i=0;

while(i++>0) {

System.out.println("the value of i is "+i);

}

System.out.println("End of Program");

}

}

Choose the most appropriate option.

Options Response Answer

the value of i is 0

End of Program

the value of i is 1

End of Program

The code enters into an infinite loop

which prints the value of i from 1 and

keep on incrementing it by 1

End of Program

34 / 49

Question 33: Time: 23 Sec Marks: 0/ 1

What will be the output of the following Java code?

interface Message {

void writeContent();

}

class Email implements Message {

public void writeContent() {

System.out.println("Email message");

}

}

class SMS implements Message {

public void writeContent() {

System.out.println("SMS message");

}

}

public class ApplicationTester{

public static void main(String[] args) {

Message message = new Email(); //Line-1

message.writeContent();

}

}

Choose the most appropriate option.

Options Response Answer

null

Email message

Compilation error at Line-1: Cannot

have a reference of interface type

SMS message

35 / 49

Question 34: Time: 8 Sec Marks: 1/ 1

Refer the HTML code given below.

<html>

<body>

<table border="1">

<tr><th>A</th> <th colspan="2">B</th>

<tr> <th rowspan="3">C</th> <th>D</th> <th>E</th> </tr>

<tr> <th>A</th> <th>B</th></tr>

<tr> <th>D</th> <th>E</th></tr>

</table>

</body>

</html>

How many cells will be displayed when the page is displayed on the browser?

Options Response Answer

8

11

10

9

36 / 49

Question 35: Time: 1 Min 10 Sec Marks: 0/ 1

Which of the following is/are DevOps Principle?

(1) Continuous improvement

(2) Test early and often

Choose the most appropriate option.

Options Response Answer

Both (1) and (2)

Only (1)

Neither (1) Nor (2)

Only (2)

37 / 49

Question 36: Time: 13 Sec Marks: 0/ 1

What will be the output of the following Java code?

public interface MyInterface1 {

public void method1();

}

public interface MyInterface2 {

public void method2();

}

public class MyClass implements MyInterface1, MyInterface2{

public void method1(){

System.out.println("method1");

}

public void method2(){

System.out.println("method2");

}

}

public class ApplicationTester {

public static void main(String[] args){

MyInterface1 ref = new MyClass();

ref.method2();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

Options Response Answer

Compilation error at Line 21: The

method method2() is undefined for the

type MyInterface1

Compilation error at Line 9: MyCLass

cannot implement two interfaces

method2

Compilation error at Line 20: Cannot

have a reference of type 'MyInterface1'

38 / 49

Question 37: Time: 9 Sec Marks: 1/ 1

Question 38: Time: 26 Sec Marks: 1/ 1

Which of the following are characteristics of Agile?

a. Deliver working software frequently, from a couple of weeks to a couple of months

b. Working software is the primary measure of progress

c. Comprehensive documentation

Choose the most appropriate option.

Options Response Answer

Both (a) and (c )

Both (a) and (b)

Both (b) and (c )

All (a), (b) and (c )

In HTML, which is the CORRECT character entity to display ">" symbol?

Options Response Answer

&gt;

gt;

#gt;

&#gt;

Assume that my_style.css is an existing and a valid css file. Which is the CORRECT way to refer this external style sheet?

39 / 49

Question 39: Time: 21 Sec Marks: 1/ 1

Question 40: Time: 2 Min 3 Sec Marks: 0/ 1

Options Response Answer

<link rel="stylesheet" type="text/css"

href= "my_style.css" />

<stylesheet type="text/css" href=

"my_style.css" />

<style rel="stylesheet" type="text/css"

href= "my_style.css" />

<link> href= "my_style.css" </link>

Which of the following statment/s is/are TRUE with respect to Community Cloud?

(1) Exclusively owned and operated by a single organization

(2) Available for use by a shared community consisting of several organizations

Choose the most appropriate option.

Options Response Answer

Both (1) and (2)

Only (1)

Neither (1) Nor (2)

Only (2)

40 / 49

Question 41: Time: 59 Sec Marks: 1/ 1

What will be the output of the following Java code?

public class BreakTester {

public static void main(String[] args){

int i = 1;

for(i = 1; i <= 10; i++){

if(i == 5){

break;

}

}

System.out.println("Value of i outside the loop: " + i);

}

}

Choose the most appropriate option.

Options Response Answer

Value of i outside the loop: 10

Value of i outside the loop: 0

Value of i outside the loop: 5

Value of i outside the loop: 11

41 / 49

Question 42: Time: 1 Min 44 Sec Marks: 0/ 1

What will be the output of the following Java code?

public class Tester{

public static void main(String[] args){

int num = 12;

switch (num % 2) {

default:

System.out.println("Default");

case 0:

System.out.println("Even");

case 1:

System.out.println("Odd");

break;

}

}

}

Choose the most appropriate option.

Options Response Answer

Compilation error as default cannot be

the first case among all the cases

Default Even Odd

Default

Even Odd

42 / 49

Assume that table Customer has the following records.

Cid Cname

10 James

11 Jack

12 HARY

13 MARK

Identify the CORRECT SQL statement to display the output as follows.

Cname

James

Jack

Options Response Answer

SELECT cname FROM customer

WHERE cname LIKE'_a%' OR cname

LIKE '%k';

SELECT cname FROM customer

WHERE cname ='_a%' OR cname

='%k';

SELECT cname FROM customer

WHERE cname ='_a%' AND cname

='%k';

SELECT cname FROM customer

WHERE cname LIKE '_a%' AND

cname LIKE '%k';

43 / 49

Question 43: Time: 19 Sec Marks: 0/ 1

Question 44: Time: 47 Sec Marks: 0/ 1

Performance feedback allows which of the following actions?

(1) To take action to improve your skills and performance so you are effective in your current and future roles

(2) To have your say about how you think your colleagues are performing

Choose the most appropriate option.

Options Response Answer

Only (1)

Both (1) and (2)

Neither (1) Nor (2)

Only (2)

Refer the code given below:

Employee emp = new Employee();

Employee emp1 = new Employee();

emp = new Employee();

Employee emp2=new Employee();

emp=null;

emp2=emp;

//Line1

Assume class Employee is a valid Java class.

How many objects are eligible for garbage collection at Line1.

Choose the most appropriate option.

44 / 49

Question 45: Time: 52 Sec Marks: 0/ 1

Question 46: Time: 30 Sec Marks: 1/ 1

Options Response Answer

3

1

2

4

Which of the folwwing are CORRECT statement?

a) onClick() and onFocus() are DOM events

b) The DOM method getElementByTagName(“name”) retrieves an array of all elements having the given tag name

c) In Java Script, a browser is represented by an implicit object called Document

Options Response Answer

a and b only

a and c only

b and c only

a, b and c

45 / 49

Refer the JavaScript code given below.

<html>

<head>

<script>

function aFun(){

var num1=111;

var num2="111";

alert(num1==num2) //Line1

alert(num1===num2) //Line2

}

</script>

</head>

<button onclick='aFun()'>Click</button>

</html>

When the above code is executed, what will be the output produced by Line1 and Line2?

46 / 49

Question 47: Time: 27 Sec Marks: 1/ 1

Question 48: Time: 29 Sec Marks: 0/ 1

Options Response Answer

Output from Line1: true, Output from

Line2: true

Output from Line1: false, Output from

Line2: true

JavaScript will show a compilation error

as "===" is not defined

Output from Line1: true, Output from

Line2: false

Which of the following actions should be performed to ensure cyber safety at a user level?

(i) Automatic downloads from the websites should be enabled

(ii) Automatic security updates should be installed

(iii) Firewall should be turned off if the system has the latest security update

Choose the most appropriate option

Options Response Answer

Both (i) and (iii)

Both (ii) and (iii)

Both (i) and (ii)

Only (iii)

Only (ii)

47 / 49

Question 49: Time: 38 Sec Marks: 1/ 1

Refer the below variable declarations done in JavaScript.

1) x=10;

2) int x=10;

3) var x="10";

4) Integer x=10;

Which of the variable declarations are CORRECT?

Options Response Answer

1 and 2 only

1,2 and 3 only

1 and 3 only

2 and 4 only

48 / 49

Question 50: Time: 1 Min 30 Sec Marks: 1/ 1

What will be the output of the following Java code?

package mypackage1;

public class Parent {

protected Parent(){

System.out.print("1 ");

}

}

package mypackage2;

import mypackage1.Parent;

public class Child extends Parent{

protected Child(){

System.out.println("2");

}

}

package mypackage2;

public class ApplicationTester {

public static void main(String[] args){

Child child = new Child();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

Options Response Answer

2

Compilation error at Line 13: 'Child'

constructor cannot be 'protected'

Compilation error at Line 4: 'Parent'

constructor cannot be 'protected'

1 2

49 / 49

Consider the Java code given below.

public class Rectangle {

private int length;

private int width;

public static void main(String[] args) {

Rectangle rectangle1 = new Rectangle();

rectangle1.length=10;

rectangle1.width=5;

Rectangle rectangle2 = rectangle1;

System.out.println("Length : "+rectangle2.length);

System.out.println("Width : "+rectangle2.width);

}

}

With respect to the above code, identify where the instnace variables 'length' and 'width' will be stored in the memory? And

where 'rectangle1' will be stored in the memory?

Choose the most appropriate option.

Options Response Answer

length', 'width' and 'rectangle1' will be

stored in heap

length' and 'width' will be stored in

stack, 'rectangle1' will be stored in

heap

length', 'width' and 'rectangle1' will be

stored in stack

length' and 'width' will be stored in

heap, 'rectangle1' will be stored in

stack

2 / 18

Question 1: Time: 51 Sec Marks: 0/ 1

Question 2: Time: 33 Sec Marks: 1/ 1

Question-wise Details

Section #1

Consider the table Employee(empId,empName,jobBand). Which is the CORRECT SQL statement to retrieve all UNIQUE

jobBand from Employee table ? Choose most appropriate option.

Options Response Answer

SELECT jobBand DISTINCT from

Employee;

SELECT DISTINCT jobBand,empId

from Employee;

SELECT DISTINCT(jobBand) from

Employee;

SELECT DISTINCT jobBand from

Employee;

Consider table Department(deptId,deptName). Which of the following query is used to display the department details whose

deptname has second letter as 'a' and second last letter as 'e'? Choose most appropriate option.

Options Response Answer

SELECT * FROM department WHERE

deptname LIKE '_a%e_';

SELECT * FROM department WHERE

deptname LIKE 'a%e_';

SELECT * FROM department WHERE

deptname LIKE '%a%e_';

SELECT * FROM department WHERE

deptname LIKE 'a%e%';

Shout4Education

Shout4Education

Shout4Education

3 / 18

Question 3: Time: 48 Sec Marks: 0/ 1

Question 4: Time: 47 Sec Marks: 0/ 1

Question 5: Time: 34 Sec Marks: 0/ 1

Consider the table Products(pid,pname,pcost). Identify the appropriate SQL statement to rename the table to ProductsInfo .

Choose most appropriate option.

Options Response Answer

ALTER TABLE Products RENAME

ProductsInfo;

ALTER TABLE Products UPDATE TO

ProductsInfo;

ALTER TABLE RENAME Products TO

ProductsInfo;

ALTER TABLE Products RENAME TO

ProductsInfo;

Consider the table Employee(empid,jobBand).

Which is the CORRECT DML statement to update the job band of all employees to NULL? Choose most appropriate option.

Options Response Answer

UPDATE TABLE employee SET

jobBand is NULL;

UPDATE employee SET jobBand =

NULL;

UPDATE TABLE employee SET

jobBand = NULL;

UPDATE employee SET jobBand is

NULL;

Shout4Education

Shout4Education

Shout4Education

4 / 18

Question 6: Time: 35 Sec Marks: 1/ 1

Identify the CORRECT statements with respect to constraints.

(i) A table can have only one FOREIGN KEY

(ii) A column with UNIQUE constraint cannot have NULL value

choose most appropriate option.

Options Response Answer

only (i)

only (ii)

both (i) and (ii)

neither (i) nor (ii)

Identify the CORRECT statement(s)

(a) A column with UNIQUE constraint can have NULL values

(b) FOREIGN KEY column can have NULL values

(c) A TABLE can have more than one PRIMARY KEY column

(d) FOREIGN KEY column can refer to PRIMARY KEY column of same table only

Choose most appropriate option.

Shout4Education

Shout4Education

Shout4Education

5 / 18

Question 7: Time: 26 Sec Marks: 1/ 1

Options Response Answer

a and b

a and d

b and c

a, b and d

Consider the table Project(ProjectId, ProjectName, ProjectType) is created without any constraint and has the records as per

the attachment.

Identify the ALTER statement which executes successfully on project table. Choose most appropriate option.

Shout4Education

Shout4Education

Shout4Education

6 / 18

Question 8: Time: 1 Min 28 Sec Marks: 0/ 1

Question 9: Time: 3 Min 0 Sec Marks: 0/ 1

Options Response Answer

ALTER TABLE Project ADD

CONSTRAINT proj_pk PRIMARY

KEY(ProjectId);

ALTER TABLE Project ADD

CONSTRAINT proj_uq

UNIQUE(ProjectName);

ALTER TABLE Project ADD

CONSTRAINT proj_nn NOT

NULL(ProjectType);

ALTER TABLE Project ADD

CONSTRAINT proj_chk

CHECK(ProjectType IN('A1','A2'));

Consider table Students(studentId, branchid). Identify the CORRECT SQL statement to retrieve the branches which has more

than 3 students. Choose most appropriate option.

Options Response Answer

SELECT branchid FROM Students

WHERE COUNT(*) > 3 GROUP BY

branchid;

SELECT branchid FROM Students

HAVING COUNT(*) > 3;

SELECT branchid FROM Students

GROUP BY studentId HAVING

COUNT(*) > 3;

SELECT branchid FROM Students

GROUP BY branchid HAVING

COUNT(*) > 3;

Shout4Education

Shout4Education

Shout4Education

7 / 18

Consider the table Account (accid, balance, accountType). The following constraints to be enforced.

1. Accid should be unique and Not Null

2. Account type should be 'C' or 'S'. Balance should be greater than 1000 and 3000 for account type 'C' and 'S' respectively

Identify the CORRECT SQL statement to create the Account table with the above mentioned constraints. Choose most

appropriate option.

Shout4Education

Shout4Education

Shout4Education

8 / 18

Question 10: Time: 1 Min 23 Sec Marks: 1/ 1

Options Response Answer

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk

PRIMARY KEY, balance NUMBER(4),

accountType CHAR, CONSTRAINT

acc_chk CHECK (accountType='S'

AND balance>3000) AND

(accountType='C' AND balance

>1000)) );

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk1

PRIMARY KEY, balance NUMBER(4)

CONSTRAINT acc_chk

CHECK(balance>1000 OR balance

>3000), accountType CHAR

CONSTRAINT acc_chk CHECK

(accountType='S' OR accounTtype='C')

);

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk

PRIMARY KEY, balance NUMBER(4),

accountType CHAR, CONSTRAINT

acc_chk1 CHECK (accountType='S'

AND balance>3000), CONSTRAINT

acc_chk2 CHECK (accountType='C'

AND balance >1000) );

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk

PRIMARY KEY, balance NUMBER(4),

accountType CHAR, CONSTRAINT

acc_chk CHECK ( (accountType='S'

AND balance>3000) OR

(accountType='C' AND balance

>1000)) );

Shout4Education

Shout4Education

Shout4Education

9 / 18

Question 11: Time: 1 Min 29 Sec Marks: 0/ 1

You are suppose to create a table "ExamResult" with the following description. studentId NUMBER(4), courseId

VARCHAR2(10), mark NUMBER(3) There should not be duplicate combination of studentId and courseId in any record. Identify

the correct DDL statement to create ExamResult table. Choose the most apprpriate option.

Options Response Answer

CREATE TABLE ExamResult(

studentId NUMBER(4), courseId

VARCHAR2(10), mark NUMBER(3),

CONSTRAINT er_pk PRIMARY

KEY(studentId, courseId));

CREATE TABLE ExamResult(

studentId NUMBER(4) CONSTRAINT

stud_pk PRIMARY KEY, courseId

VARCHAR2(10) CONSTRAINT cid_pk

PRIMARY KEY, mark NUMBER(3));

CREATE TABLE ExamResult(

(studentId NUMBER(4), courseId

VARCHAR2(10) ) CONSTRAINT er_pk

PRIMARY KEY), mark NUMBER(3));

CREATE TABLE ExamResult(

studentId NUMBER(4), courseId

VARCHAR2(10), mark NUMBER(3),

CONSTRAINT er_pk COMPOSITE

PRIMARY KEY(studentId, courseId));

Consider table player(playerid, playername, runs_scored, playergroup). Identify the CORRECT SQL statement to retrieve the

details of players who have scored runs which is greater than the average of runs scored by all players in his player group.

Choose most appropriate option.

Shout4Education

Shout4Education

Shout4Education

10 / 18

Question 12: Time: 44 Sec Marks: 0/ 1

Options Response Answer

SELECT p1.playerid, p1.playername,

p1.runs_scored FROM player p1

WHERE AVG(p1.runs_scored)>(

SELECT AVG(p2.runs_scored) FROM

player p2 WHERE

p1.playergroup=p2.playergroup);

SELECT playerid, playername,

runs_scored FROM player WHERE

runs_scored>( SELECT

AVG(runs_scored) FROM player);

SELECT p1.playerid, p1.playername,

p1.runs_scored FROM player p1

WHERE p1.runs_scored>( SELECT

p2.runs_scored FROM player p2

GROUP BY p2.playergroup HAVING

p2.runs_scored>AVG(p2.runs_scored))

;

SELECT p1.playerid, p1.playername,

p1.runs_scored FROM player p1

WHERE p1.runs_scored>( SELECT

AVG(p2.runs_scored) FROM player p2

WHERE

p1.playergroup=p2.playergroup);

Shout4Education

Shout4Education

Shout4Education

11 / 18

Consider the Tables given below:

Product(productId,productName)

ProductOrder(orderId,productId,quantity)

productId column of ProductOrder is a Foreign key reffering to Product Table. Identify the appropriate SQL statement which will

fetch the ProductId,ProductName,OrderId for all the Product ordered and display 'Yet to be Ordered' if a product has not been

ordered till now.

Choose most appropriate option.

Options Response Answer

SELECT

p1.productId,p1.productName,NVL(p2.

orderId,'Yet to be Ordered') FROM

Product p1 INNER JOIN ProductOrder

p2 ON p1.productId=p2.productId;

SELECT

p1.productId,p1.productName,NVL(p2.

orderId,'Yet to be Ordered') FROM

Product p1 LEFT OUTER JOIN

ProductOrder p2 ON

p1.productId=p2.productId;

SELECT

p1.productId,p1.productName,NVL(p2.

orderId,'Yet to be Ordered') FROM

Product p1 RIGHT OUTER JOIN

ProductOrder p2 ON

p1.productId=p2.productId;

SELECT

p1.productId,p1.productName,NVL('Yet

to be Ordered',p2.orderId) FROM

Product p1 LEFT OUTER JOIN

ProductOrder p2 ON

p1.productId=p2.productId;

Shout4Education

Shout4Education

Shout4Education

12 / 18

Question 13: Time: 18 Sec Marks: 1/ 1

Question 14: Time: 10 Sec Marks: 1/ 1

<!DOCTYPE html>

<html>

<body>

<script>

var x = (3 + 3) + 4 + "6";

alert(x); //line 1

</script>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

What will be printed in alert box in line 1? Choose most appropriate option.

Options Response Answer

3346

646

106

16

What would be the ouput of the javascript code given below?

<html>

<head>

<script>

var data=10;

document.write(typeof(data));

</script>

</head>

</html>

1

2

3

4

5

6

7

8

9

Shout4Education

Shout4Education

Shout4Education

13 / 18

Question 15: Time: 12 Sec Marks: 1/ 1

Question 16: Time: 31 Sec Marks: 1/ 1

Options Response Answer

int

number

integer

numberType

Which of the following is the correct html form element to create the checkbox in a web page? Choose most appropriate option.

Options Response Answer

<checkbox>

<input=checkbox>

<input type="checkbox">

<input checkbox>

Which is the correct CSS code to display the text "Accenture" in light grey back ground? Choose most appropriate option.

Options Response Answer

<h2 style = "background-color :

lightgrey">Accenture</h2>

<h2 background-color :

lightgrey>Accenture</h2>

<h2 style = "backgroundcolor(lightgrey)">Accenture</h2>

<h2 style = "background-color =

lightgrey">Accenture</h2>

Shout4Education

Shout4Education

Shout4Education

14 / 18

Question 17: Time: 2 Min 4 Sec Marks: 0/ 1

Question 18: Time: 19 Sec Marks: 1/ 1

What would be the output of the java script code given below?

<html>

<head>

<script>

var data1=100;

function test()

{

var data1=200;

window.data1=data1+10;

}

test();

document.write(data1);

</script>

</head>

<body>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

Choose most appropriate option.

Options Response Answer

100

200

210

110

Shout4Education

Shout4Education

Shout4Education

15 / 18

Question 19: Time: 19 Sec Marks: 1/ 1

Which of the following are CSS selectors?

(i) Element Selector

(ii) Class Selector

(iii) Style Selector

Options Response Answer

(i) and (ii) only

(ii) and (iii) only

(i) and (iii) only

(i), (ii) and (iii)

Shout4Education

Shout4Education

Shout4Education

16 / 18

Question 20: Time: 33 Sec Marks: 1/ 1

Refer the HTML code given below.

<html>

<body>

<table border="1">

<tr>

<th>A</th>

<th colspan="2">B</th>

</tr>

<tr>

<th rowspan="3">C</th>

<th>D</th>

<th>E</th>

</tr>

<tr>

<th>A</th>

<th>B</th>

</tr>

<tr>

<th>D</th>

<th>E</th>

</tr>

</table>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

How many cells will be displayed when the page is displayed on the browser? Choose most appropriate option.

Options Response Answer

8

11

10

9

Shout4Education

Shout4Education

Shout4Education

17 / 18

Refer the HTMLcode given below.

<html> <body>

<table border="1">

<tr><th>A</th>

<th colspan="2">B</th>

</tr>

<tr> <th rowspan="3">C</th>

<th>D</th>

<th>E</th>

</tr>

<tr>

<th>A</th>

<th rowspan="2">B</th>

</tr>

<tr>

<th>D</th>

</tr>

</table>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

How many cells will be displayed when the page is displayed on the browser? Choose most appropriate option.

Options Response Answer

7

10

9

8

Shout4Education

Shout4Education

Shout4Education

18 / 18

Shout4Education

Shout4Education

Shout4Education

2 / 19

Question 1: Time: 29 Sec Marks: 0/ 1

Question 2: Time: 29 Sec Marks: 1/ 1

Question-wise Details

Section #1

Consider the table Employee(empid,jobBand).

Which is the CORRECT DML statement to update the job band of all employees to NULL? Choose most appropriate option.

Options Response Answer

UPDATE TABLE employee SET

jobBand is NULL;

UPDATE employee SET jobBand =

NULL;

UPDATE TABLE employee SET

jobBand = NULL;

UPDATE employee SET jobBand is

NULL;

Consider the table Employee(empId,empName,jobBand). Which is the CORRECT SQL statement to retrieve all UNIQUE

jobBand from Employee table ? Choose most appropriate option.

Options Response Answer

SELECT jobBand DISTINCT from

Employee;

SELECT DISTINCT jobBand,empId

from Employee;

SELECT DISTINCT(jobBand) from

Employee;

SELECT DISTINCT jobBand from

Employee;

Shout4Education

Shout4Education

Shout4Education

3 / 19

Question 3: Time: 25 Sec Marks: 1/ 1

Question 4: Time: 30 Sec Marks: 1/ 1

Question 5: Time: 55 Sec Marks: 1/ 1

Consider the table Products(pid,pname,pcost). Identify the appropriate SQL statement to rename the table to ProductsInfo .

Choose most appropriate option.

Options Response Answer

ALTER TABLE Products RENAME

ProductsInfo;

ALTER TABLE Products UPDATE TO

ProductsInfo;

ALTER TABLE RENAME Products TO

ProductsInfo;

ALTER TABLE Products RENAME TO

ProductsInfo;

Consider table Department(deptId,deptName). Which of the following query is used to display the department details whose

deptname has second letter as 'a' and second last letter as 'e'? Choose most appropriate option.

Options Response Answer

SELECT * FROM department WHERE

deptname LIKE '_a%e_';

SELECT * FROM department WHERE

deptname LIKE 'a%e_';

SELECT * FROM department WHERE

deptname LIKE '%a%e_';

SELECT * FROM department WHERE

deptname LIKE 'a%e%';

Shout4Education

Shout4Education

Shout4Education

4 / 19

Question 6: Time: 45 Sec Marks: 1/ 1

Question 7: Time: 1 Min 34 Sec Marks: 1/ 1

Consider table Account(accId, acctype, balance). Identify the appropriate SQL statement to display account details in the

ascending order of balance and in the descending order of accId if the balance is same. choose most appropriate option.

Options Response Answer

SELECT * FROM Account ORDER BY

balance, accId DESC;

SELECT * FROM Account ORDER BY

balance ASC, accId;

SELECT * FROM Account ORDER BY

accId DESC, balance ASC;

SELECT * FROM Account ORDER BY

accId DESC, balance;

Consider table Employee(empid, empname, jobband). Choose the CORRECT SQL statement to retrieve all employee ids along

with their job band. If job band is not assigned to an employee, then it should display 'NA' as job band(Note: Data type of

column jobBand is VARCHAR2). Choose most appropriate option.

Options Response Answer

SELECT empid, NVL(jobband),'NA'

FROM Employee;

SELECT empid,

NVL(jobband,NULL,'NA') FROM

Employee;

SELECT empid,

NVL(NULL,'NA',jobband)FROM

Employee;

SELECT empid, NVL(jobband,'NA')

FROM Employee;

Shout4Education

Shout4Education

Shout4Education

5 / 19

Question 8: Time: 1 Min 20 Sec Marks: 1/ 1

Consider table Students(sid NUMBER(3), sname VARCHAR2(10), scontact NUMBER(10) ) is already created in the database.

It is required to change the data type of the column "scontact" to VARCHAR2(15). Which of the following is Correct for the

above requirement?

Note: sid column is primary key.

Choose most appropriate option.

Options Response Answer

To change the data type of a column, it

is important to ensure that the

corresponding column is not having

data for any of the record

There are no criteria to be followed. We

can change the datatype of the column

irrespective of the data

Data type can be changed only for

primary key column

It is not possible to change the data

type of a column

Shout4Education

Shout4Education

Shout4Education

6 / 19

Consider table Player(playerId NUMBER(4), playerType NUMBER(1)) has following records.

PlayerId PlayerType

----------- ------------------

555 1

666

777 2

888 1

Identify the appropriate SQL statement to display player details. If there is no value for player type, then it should display "No

Type".

Choose most appropriate option.

Options Response Answer

SELECT playerId,

NVL(TO_CHAR(playerType), 'No

Type') FROM Player;

SELECT playerId, NVL(playerType, 'No

Type') FROM Player;

SELECT playerId, NVL(playerType) AS

"No Type" FROM Player;

SELECT playerId,

NVL(TO_CHAR(playerType) AS "No

Type" FROM Player;

Shout4Education

Shout4Education

Shout4Education

7 / 19

Question 9: Time: 3 Min 3 Sec Marks: 1/ 1

Consider the table Account (accid, balance, accountType). The following constraints to be enforced.

1. Accid should be unique and Not Null

2. Account type should be 'C' or 'S'. Balance should be greater than 1000 and 3000 for account type 'C' and 'S' respectively

Identify the CORRECT SQL statement to create the Account table with the above mentioned constraints. Choose most

appropriate option.

Shout4Education

Shout4Education

Shout4Education

8 / 19

Question 10: Time: 2 Min 22 Sec Marks: 1/ 1

Options Response Answer

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk

PRIMARY KEY, balance NUMBER(4),

accountType CHAR, CONSTRAINT

acc_chk CHECK (accountType='S'

AND balance>3000) AND

(accountType='C' AND balance

>1000)) );

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk1

PRIMARY KEY, balance NUMBER(4)

CONSTRAINT acc_chk

CHECK(balance>1000 OR balance

>3000), accountType CHAR

CONSTRAINT acc_chk CHECK

(accountType='S' OR accounTtype='C')

);

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk

PRIMARY KEY, balance NUMBER(4),

accountType CHAR, CONSTRAINT

acc_chk1 CHECK (accountType='S'

AND balance>3000), CONSTRAINT

acc_chk2 CHECK (accountType='C'

AND balance >1000) );

CREATE TABLE account( accid

NUMBER(2) CONSTRAINT acc_pk

PRIMARY KEY, balance NUMBER(4),

accountType CHAR, CONSTRAINT

acc_chk CHECK ( (accountType='S'

AND balance>3000) OR

(accountType='C' AND balance

>1000)) );

Shout4Education

Shout4Education

Shout4Education

9 / 19

Question 11: Time: 1 Min 22 Sec Marks: 1/ 1

Consider the below tables.

Customer(customerId,customerName) - customerId is primary key Account(accountId,accountType,balance,customerId) -

accountId is primary key and customerId is foreign key.

Which is the CORRECT SQL statement to retrieve customerId, customerName, accountId and balance for all customers. It

should also display the details of the customers who are not having any account.

Choose most appropriate option.

Options Response Answer

SELECT

c.customerId,c.customerName,a.accou

ntId,a.balance FROM customer c

RIGHT OUTER JOIN account a ON

c.customerId=a.customerId;

SELECT

c.customerId,c.customerName,a.accou

ntId,a.balance FROM account a LEFT

OUTER JOIN customer c ON

c.customerId=a.customerId;

SELECT

c.customerId,c.customerName,a.accou

ntId,a.balance FROM customer c

INNER JOIN account a ON

c.customerId=a.customerId;

SELECT

c.customerId,c.customerName,a.accou

ntId,a.balance FROM account a RIGHT

OUTER JOIN customer c ON

c.customerId=a.customerId;

Shout4Education

Shout4Education

Shout4Education

10 / 19

Question 12: Time: 1 Min 40 Sec Marks: 1/ 1

Consider table player(playerid, playername, runs_scored, playergroup). Identify the CORRECT SQL statement to retrieve the

details of players who have scored runs which is greater than the average of runs scored by all players in his player group.

Choose most appropriate option.

Options Response Answer

SELECT p1.playerid, p1.playername,

p1.runs_scored FROM player p1

WHERE AVG(p1.runs_scored)>(

SELECT AVG(p2.runs_scored) FROM

player p2 WHERE

p1.playergroup=p2.playergroup);

SELECT playerid, playername,

runs_scored FROM player WHERE

runs_scored>( SELECT

AVG(runs_scored) FROM player);

SELECT p1.playerid, p1.playername,

p1.runs_scored FROM player p1

WHERE p1.runs_scored>( SELECT

p2.runs_scored FROM player p2

GROUP BY p2.playergroup HAVING

p2.runs_scored>AVG(p2.runs_scored))

;

SELECT p1.playerid, p1.playername,

p1.runs_scored FROM player p1

WHERE p1.runs_scored>( SELECT

AVG(p2.runs_scored) FROM player p2

WHERE

p1.playergroup=p2.playergroup);

Consider table Employee(EmpId, EmpName,salary,deptNo). Which is the CORRECT SQL statement to list employees whose

salary is more than their department's average salary? The result should be in ascending order of department number. Choose

most appropriate option.

Shout4Education

Shout4Education

Shout4Education

11 / 19

Question 13: Time: 24 Sec Marks: 1/ 1

Options Response Answer

SELECT e1.empId, e1.empName,

e1.salary,e1.deptNo FROM employee

e1 WHERE e1.salary > (SELECT

avg(e2.salary) FROM employee e2)

ORDER BY e1.deptNo;

SELECT e1.empId, e1.empName,

e1.salary,e1.deptNo FROM employee

e1 ORDER BY e1.deptNo WHERE

e1.salary > (SELECT avg(e2.salary)

FROM employee e2 WHERE

e2.deptNo = e1.deptNo);

SELECT e1.empId, e1.empName,

e1.salary,e1.deptNo FROM employee

e1 WHERE avg(e1.salary) > (SELECT

e2.salary FROM employee e2 WHERE

e2.deptNo = e1.deptNo) ORDER BY

e1.deptNo;

SELECT e1.empId, e1.empName,

e1.salary,e1.deptNo FROM employee

e1 WHERE e1.salary > (SELECT

avg(e2.salary) FROM employee e2

WHERE e2.deptNo = e1.deptNo)

ORDER BY e1.deptNo;

What would be the ouput of the javascript code given below?

<html>

<head>

<script>

var data=10;

document.write(typeof(data));

</script>

</head>

</html>

1

2

3

4

5

6

7

8

9

Shout4Education

Shout4Education

Shout4Education

12 / 19

Question 14: Time: 8 Sec Marks: 1/ 1

Question 15: Time: 11 Sec Marks: 1/ 1

Options Response Answer

int

number

integer

numberType

Which of the following are the CSS selectors?

a) Element Selector

b) Form Selector

c) Class Selector

Choose most appropriate option.

Options Response Answer

a and b

a and c

b and c

a, b and c

Shout4Education

Shout4Education

Shout4Education

13 / 19

Question 16: Time: 54 Sec Marks: 1/ 1

Which of the following is/are the inline html elements?

(i) <i>

(ii) <h6>

(iii) <a>

Choose most appropriate option.

Options Response Answer

(i) and (iii)

(ii) and (iii)

only (i)

(i), (ii) and (iii)

Shout4Education

Shout4Education

Shout4Education

14 / 19

Question 17: Time: 12 Sec Marks: 1/ 1

Refer the incomplete HTML Code given below

<html>

<body>

<form action="abc.html" _____> <!--Line1-->

First Name: <input type="text" name="f1"/>

<br/>

Last Name: <input type="text" name="l1"/>

<br/>

Password: <input type="password" name="p1"/>

<br/>

<input type="submit" value="Submit"/> </form>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

13

Assume abc.html is existing and a valid HTML page. Identify the appropriate option to be placed at Line1 so that values entered

in the text boxes are not appended to URL while submitting to abc.html . Choose most appropriate option.

Options Response Answer

method="GET"

method="POST"

submit="GET"

submit="POST"

Shout4Education

Shout4Education

Shout4Education

15 / 19

Question 18: Time: 47 Sec Marks: 1/ 1

What would be the Output of the below java script Code?

<html>

<body>

<script>

var x = 5;

var d = (x != "5");

document.write(d +"--");

d = (x === "5");

document.write(d);

</script>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

Choose most appropriate option.

Options Response Answer

false--false

false--true

true--false

true--true

Shout4Education

Shout4Education

Shout4Education

16 / 19

Question 19: Time: 7 Sec Marks: 1/ 1

What would be the output of the java script code given below?

<html>

<head>

<script>

function print()

{

var value1=1;

var value2="2";

var value3=2;

if(value2===value3)

{

alert(value1+value3);

}

else

{

alert(value1+value2);

}

}

print();

</script>

</head>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

Choose most appropriate option.

Options Response Answer

3

12

122

32

Shout4Education

Shout4Education

Shout4Education

17 / 19

Question 20: Time: 32 Sec Marks: 1/ 1

Condsider the javascript code given below. What would be the print values from line 1 and line 2 on execution?

<html>

<body>

<p id="id1"></p><!-- line 1-->

<p id="id2"></p><!-- line 2-->

<script>

var y=10;

myFunction();

document.getElementById("id1").innerHTML = y;

document.getElementById("id2").innerHTML = window.y;

function myFunction()

{

y=20;

y=y+window.y

}

</script>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

Choose most appropriate option.

Options Response Answer

10 30

10 40

10 10

40 40

Shout4Education

Shout4Education

Shout4Education

18 / 19

Refer the HTML code given below.

<html>

<body>

<table border="1">

<tr>

<th>A</th>

<th colspan="2">B</th>

</tr>

<tr>

<th rowspan="3">C</th>

<th>D</th>

<th>E</th>

</tr>

<tr>

<th>A</th>

<th>B</th>

</tr>

<tr>

<th>D</th>

<th>E</th>

</tr>

</table>

</body>

</html>

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

How many cells will be displayed when the page is displayed on the browser? Choose most appropriate option.

Options Response Answer

8

11

10

9

Shout4Education

Shout4Education

Shout4Education

19 / 19

Shout4Education

Shout4Education

Shout4Education

2 / 23

Question 1: Time: 11 Sec Marks: 1/ 1

Question 2: Time: 14 Sec Marks: 1/ 1

Question-wise Details

Section #1

Consider the Java code given below and determine how many objects and how many references are used in the Java code.

Assume that Student is a valid Java class.

public class StudentTester{

public static void main(String[] args)

{

Student s1=new Student();

Student s2=new Student();

Student s3=s1;

Student s4=s1;

}

}

1

2

3

4

5

6

7

8

9

10

Choose the most appropriate option.

Options Response Answer

2 Objects and 4 references

4 Objects and 2 references

2 Objects and 2 references

3 Objects and 4 references

Shout4Education

Shout4Education

Shout4Education

3 / 23

Question 3: Time: 28 Sec Marks: 1/ 1

Which of the following statements are valid array declaration?

(A) int number();

(B) float average[];

(C) double[] marks;

(D) counter int[];

Choose most appropriate option.

Options Response Answer

(A)

(A) &

(C)

(D)

(B) &

(C)

Shout4Education

Shout4Education

Shout4Education

4 / 23

What will be the output of the following Java code?

public class ApplicationTester

{

public static void main(String[] args)

{

int[] array = new int[10];

System.out.println(array.length);

array[0] = 11;

array[1] = 22;

array[2] = 33;

System.out.println(array.length);

}

}

Choose the most appropriate option.

Shout4Education

Shout4Education

Shout4Education

5 / 23

Question 4: Time: 18 Sec Marks: 1/ 1

Options Response Answer

Program will display 0 and 3

Program will display 10 and 10

Program will display 10 and 3

Program will display null and 3

Shout4Education

Shout4Education

Shout4Education

6 / 23

Consider the Java code given below and determine how many objects and how many references are used in the Java code.

Assume that Student is a valid Java class.

public class StudentTester

{

public static void main(String[] args)

{

Student s1 = new Student();

Student s2 = new Student();

Student s3 = s1;

Student s4 = s1;

}

}

Choose the most appropriate option.

Shout4Education

Shout4Education

Shout4Education

7 / 23

Question 5: Time: 19 Sec Marks: 1/ 1

Question 6: Time: 24 Sec Marks: 1/ 1

Options Response Answer

2 Objects and 2 references

4 Objects and 2 references

2 Objects and 4 references

3 Objects and 4 references

Which of the following statement/s is/are TRUE?

(1) Java supports multilevel inheritance

(2) Super keyword is used to invoke methods from the parent class

Choose the most appropriate option.

Options Response Answer

Only (1) is TRUE

Only (2) is TRUE

Both (1) and (2) are TRUE

Neither (1) Nor (2) are TRUE

Shout4Education

Shout4Education

Shout4Education

8 / 23

Question 7: Time: 34 Sec Marks: 1/ 1

What will be the output of the following Java code?

public class ApplicationTester

{

public static void main(String[] args)

{

char ch='4';

switch(ch)

{

case'2': System.out.println("Hello");

break;

default: System.out.println("Hello");

case'1': System.out.println("Hello");

case'3': System.out.println("Hello");

break;

}

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

Choose the most appropriate option.

Options Response Answer

"Hello" will be displayed once

"Hello" will be displayed 3 times

Compilation error: Invalid use of 'switch'

statement

"Hello" will be displayed 2 times

Which of the following is a VALID declaration of an abstract method? Choose the most appropriate option.

Options Response Answer

public void drive();

public abstract void drive();

public abstract void drive() {}

public abstract drive(){}

Shout4Education

Shout4Education

Shout4Education

9 / 23

Question 8: Time: 1 Min 21 Sec Marks: 1/ 1

Question 9: Time: 56 Sec Marks: 1/ 1

Consider the following code snippet and predict the output:

public interface I

{

int x; //Line-1

public void display();

}

public class C implements I //Line-2

{

public void display()

{

System.out.println("Hello");

}

}

public class TestInterface{

public static void main(String[] args)

{

I i=new C();//Line-3

i.display();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

Choose the most appropriate option.

Options Response Answer

Compilation error at Line-1 : The blank

final field 'x' may not have been

initialized

Compilation error at Line-2 : class C

cannot implement interface I

Compilation error at Line-3 : Cannot

have a reference of interface type I

It will print : Hello

Shout4Education

Shout4Education

Shout4Education

10 / 23

Question 10: Time: 1 Min 7 Sec Marks: 0/ 1

What will be the output of the following Java code?

public abstract class Employee

{

public abstract Employee()

{

System.out.print(" 1 ");

}

}

public class ProjectManager extends Employee

{

public ProjectManager()

{

System.out.print(" 2 ");

}

}

public class ApplicationTester

{

public static void main(String[] args)

{

Employee emp=new ProjectManager();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

Choose the most appropriate option.

Options Response Answer

2

Compilation Error: Illegal modifier for

the constructor in type Employee

1

1 2

Shout4Education

Shout4Education

Shout4Education

11 / 23

Question 11: Time: 1 Min 9 Sec Marks: 0/ 1

Consider the following Java code:

public class Employee

{

int empNo;

public void setEmpNo(int num)

{

this.empNo=num;

}

public int getEmpNo()

{

return this.empNo;

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

With respect to Employee class identify where empNo and num are stored in the memory? Choose the most appropriate option.

Options Response Answer

empNo' and 'num' both are stored in

heap

empNo' and 'num' both are stored in

stack

'empNo' is stored in heap and 'num' is

stored in stack

empNo' is stored in stack and 'num' is

stored in heap

Shout4Education

Shout4Education

Shout4Education

12 / 23

Question 12: Time: 2 Min 13 Sec Marks: 1/ 1

Refer to the below code and predict the output.

public class Test

{

public static void main(String[] args)

{

String x=new String("xyz");

String y="abc";

x=x+y;

}

}

1

2

3

4

5

6

7

8

9

10

How many String objects are created in the above code? Choose the most appropriate option

Options Response Answer

2

3

1

4

What is the output expected for the below code ?

public class ConstructorTest

{

private ConstructorTest(int w)

{

System.out.println(w);

}

public static ConstructorTest(){ //Line-6

System.out.println(10);

}

public static void main(String args[])

{

ConstructorTest obj=new ConstructorTest(50);

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

Choose most appropriate option.

Shout4Education

Shout4Education

Shout4Education

13 / 23

Question 13: Time: 1 Min 46 Sec Marks: 1/ 1

Options Response Answer

10

10 50

50

Won't compile because of Line-6,

constructor can't be static

You have three packages, p1,p2 and p3, What is the expected output of compiling and running file Tester in p3 package?

package p1;

public class Account

{

protected Account(){ //line3

System.out.println("Account");

}

}

package p2;

import p1.Account;

public class CurrentAccount extends Account

{

public CurrentAccount()

{

System.out.println("CurrentAccount");

}

}

package p3;

import p1.Account;

import p2.CurrentAccount;//line3

public class Tester

{

public static void main(String[] args)

{

Account c=new Account();//line6

CurrentAccount ca=new CurrentAccount();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

Choose most appropriate option.

Shout4Education

Shout4Education

Shout4Education

14 / 23

Question 14: Time: 30 Sec Marks: 1/ 1

Options Response Answer

Account CurrentAccount

Compilation error at line3 in package

p1: Invalid access specifier ‘protected’

for ‘Account’

Compilation error at line3 in package

p3: Cannot import ‘CurrentAccount’

class

Compilation error at line6 in package

p3: Constructor ‘Account’ is not visible

Consider the following Java code:

public class Student

{

private String name;

private int rollNumber;

//getterandsettermethods

}

public class Faculty

{

private String name;

private Student student;

public void setStudent(Student student)

{

this.student=student;

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

Identify the relationship that exists between class Student and class Faculty. Choose the most appropriate option.

Shout4Education

Shout4Education

Shout4Education

15 / 23

Question 15: Time: 1 Min 8 Sec Marks: 1/ 1

Options Response Answer

Composition

Inheritance

There is no relationship between the

given two classes

Aggregation

Consider the following Java code:

public class ApplicationTester

{

public static void main(String[] args)

{

int i=1;

while(i<=5)

{

if(i==2)

{

i++;

continue;

}

if(i==3)

{

break;

}

i++;

System.out.println("Hello");

}

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

When the above code is executed, how many time/times "Hello" will be printed on the console? Choose the most appropriate

option.

Shout4Education

Shout4Education

Shout4Education

16 / 23

Question 16: Time: 34 Sec Marks: 1/ 1

Options Response Answer

1 time

2 times

3 times

5 times

Refer to the below code and predict the output

interface A

{

public void method1();

}

class Demo implements A

{

public void method1()

{

System.out.println("1");

}

}

class ParentTest extends Demo

{

public void method1()

{

System.out.println("2");

}

}

public class Test extends ParentTest

{

public static void main(String[] args)

{

A a=new ParentTest();

a.method1();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

Choose the most appropriate Option:

Shout4Education

Shout4Education

Shout4Education

17 / 23

Question 17: Time: 43 Sec Marks: 1/ 1

Options Response Answer

2

1

1,2

2,1

Consider the Java code given below and predict what will be the output?

package x;

public class Student

{

void display(){ //Line-1

System.out.println("Hello");

}

}

package y;

import x.Student;//Line-2

public class TestFinalClass

{

public static void main(String[] args)

{

Student s=new Student();

s.display();//Line-3

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

Choose the most appropriate option.

Options Response Answer

Compilation error at Line-3 : The

method display from type Student is not

visible

Compilation error at Line-2 : Cannot

import class Student from package x

It will print Hello

Compilation error at Line-1 : No access

specifier defined for method display

Shout4Education

Shout4Education

Shout4Education

18 / 23

Question 18: Time: 1 Min 2 Sec Marks: 1/ 1

Question 19: Time: 38 Sec Marks: 1/ 1

Consider the following Java code (Assume that Employee is a valid Java class):

public class ApplicationTester{

public static void main(String[] args)

{

Employee emp1=newEmployee();

Employee emp2=newEmployee();

Employee emp3=newEmployee();

Employee emp4=emp1;

emp1=emp3;

emp4=null;

emp2=emp4;//Line-1

//some valid Java code

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

With respect to the above code, how many object/objects will be eligible for garbage collection after Line-1? Choose the most

appropriate option.

Options Response Answer

1

2

3

0

Shout4Education

Shout4Education

Shout4Education

19 / 23

Question 20: Time: 35 Sec Marks: 1/ 1

Refer to the below code and predict the output.

public class Test

{

public static void main(String[] args)

{

int i=10;

boolean b=false;

if((b==true) && ((i+=10)==20))

{

System.out.println("We are equal "+i);

}

else

{

System.out.println("Not equal! "+i);

}

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

Choose the most appropriate option

Options Response Answer

Not equal! 10

We are equal! 10

Not equal! 20

We are equal! 20

What is output obtained on executing the following Java code?

Shout4Education

Shout4Education

Shout4Education

20 / 23

package pack1;

public class A

{

private int i;

private int j;

protected A()

{

i=10;

j=20;

}

public int getI()

{

return i;

}

public void setI(int i)

{

this.i=i;

}

public int getJ()

{

return j;

}

public void setJ(int j)

{

this.j=j;

}

public void disp()

{

System.out.println(i+" "+j);

}

}

package pack2;

import pack1.A;

public class B extends A

{

public B()

{

//line1

}

void display()

{

}

}

package pack2;

import pack1.A;

public class MyMain

{

public static void main(String[] args)

{

A obj1=new B();

obj1.setI(30);

obj1.setJ(40);

A obj2=obj1;

obj2.setI(50);

obj1.disp();

obj2.disp();

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

Choose most appropriate option.

Shout4Education

Shout4Education

Shout4Education

21 / 23

Question 21: Time: 17 Sec Marks: 1/ 1

Options Response Answer

30 40 50 40

50 40 50 40

Compilation error in line 1: Implicit

super constructor A() is not visible.

Must explicitly invoke another

constructor

30 40 50 20

What will be the output of the following Java code?

public class ApplicationTester

{

public static void main(String[] args)

{

for(int i=1;i<=3;i++)

{

if(i==2)

{

continue;

}

for(int j=1;j<=3;j++)

{

if(j==2)

{

continue;

}

System.out.println("GFT");

}

}

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

Choose the most appropriate option.

Shout4Education

Shout4Education

Shout4Education

22 / 23

Question 22: Time: 37 Sec Marks: 0/ 1

Options Response Answer

"GFT" will be displayed 9 times

"GFT" will be displayed 8 times

"GFT" will be displayed 6 times

"GFT" will be displayed 4 times

Consider the following Java code:

package myPackage;

public class Employee

{

private int empNo;

private double salary;

//getter and setter methods

void computeSalary()

{

//logic to compute salary

}

}

package myPackage;

public class PackageTester

{

public static void main(String[] args)

{

Employee emp=new Employee();

//valid Java code

emp.computeSalary();//Line-1

}

}

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

What access specifier can be used for computeSalary() method in Employee class, so that code in Line-1 will execute without

any error? Choose the most appropriate option.

Shout4Education

Shout4Education

Shout4Education

23 / 23

Options Response Answer

Only public

Only private

Either public or protected or default

Only default

Shout4Education

Shout4Education

Shout4Education

 Dashboard / Nobels Mock 3 - Quiz / Quiz / Quiz

Question

1

Correct

Mark 1.00 out of

1.00

Question

2

Correct

Mark 1.00 out of

1.00

Question

3

Correct

Mark 1.00 out of

1.00

Question

4

Correct

Mark 1.00 out of

1.00

Started on Friday, 19 June 2020, 5:07 PM

State Finished

Completed on Friday, 19 June 2020, 6:04 PM

Time taken 57 mins 5 secs

Grade 43.00 out of 50.00 (86%)

What is the approach of OO ?

Select one:

a. bundle data only for security

b. bundle data and method 

c. bundle method seperated from data

d. bundle data seperated from method

The correct answer is: bundle data and method

What is the term used to define the values that are common across all instances of a class ?

Select one:

a. Static 

b. Property

c. Interface

d. Attribute

The correct answer is: Static

Select the benefits of OOP ?

Select one or more:

a. Resuability 

b. Testing

c. code deployment

d. Ease of design 

The correct answers are: Ease of design, Resuability

Which of the below terms represents the levels of hierarchy ?

Select one or more:

a. Multi-Level

b. Generalization 

c. Aggregation 

d. Compound

The correct answers are: Generalization, Aggregation

 sai Sampath Ghantasala .

Question

5

Not answered

Marked out of

1.00

Question

6

Incorrect

Mark 0.00 out of

1.00

Question

7

Correct

Mark 1.00 out of

1.00

Question

8

Correct

Mark 1.00 out of

1.00

Question

9

Correct

Mark 1.00 out of

1.00

Select the true statements about Use Case diagram ? 

Select one or more:

a. Depicts the boundry of the system

b. Captures users of the system

c. Captures attributes and methods

d. Captures dynamic aspects of the system

The correct answers are: Depicts the boundry of the system, Captures users of the system, Captures dynamic aspects of the

system

Select the principle that best describes the given scenario. An air-condition can be operated using the button or remote

control.

Select one:

a. Encapsulation

b. Polymorphism

c. Hierarchy

d. Abstraction 

The correct answer is: Encapsulation

_________ is not the exact code for solving the problem but it would give us an idea of how the problem is going to be solved.

Select one:

a. object code

b. Pseudocode 

c. Structure code

d. Programming code

Your answer is correct.

The correct answer is: Pseudocode

State true or false.

 Configuration management is important only during the coding phase

Select one:

True

False 

The correct answer is 'False'.

Enhancements made to the developed software is called as ………………

Select one:

a. Design

b. Testing

 sai Sampath Ghantasala .

Question

10

Correct

Mark 1.00 out of

1.00

Question

11

Incorrect

Mark 0.00 out of

1.00

Question

12

Correct

Mark 1.00 out of

1.00

Question

13

Correct

Mark 1.00 out of

1.00

Question

14

c. Analysis

d. Maintenance 

The correct answer is: Maintenance

State true or false. Black box testers can proceed with generating the test cases immediately after the SRS is freezed in the

analysis phase

Select one:

True 

False

The correct answer is 'True'.

ERD Example: Consider the given scenario. ZEE public school Library. A Library has many books. Each Book has many

chapters. Identify the cardinality between Chapter and Book

Select one:

a. m..1

b. 0..0

c. m..m 

d. 0..m

The correct answer is: m..1

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 

The correct answer is: Spiral

Which of the following is not a feature of UNIX?

Select one:

a. Multiuser

b. Portability

c. Multitasking

d. User friendly 

The correct answer is: User friendly

Unix Terminals are called Dummy terminals as they do not have _____________ capability.

Select one:

 sai Sampath Ghantasala .

Correct

Mark 1.00 out of

1.00

Question

15

Correct

Mark 1.00 out of

1.00

Question

16

Correct

Mark 1.00 out of

1.00

Question

17

Correct

Mark 1.00 out of

1.00

Question

18

Correct

Mark 1.00 out of

1.00

Select one:

a. Output

b. Input

c. Processing 

d. Display

The correct answer is: Processing

Consider the sample.txt file and predict the output 

Unix is an operating system. 

Unix is open source.

 Linux is also a powerful OS. 

What is the output of grep -c "Unix" sample.txt command?

Select one:

a. 0

b. 3

c. 2 

d. 4

The correct answer is: 2

What does the below Unix command accomplish? 

$ sed 's/ABC/ZYX/' file.txt 

Select one:

a. Only matches and displays the occurrence of the pattern

b. Replaces only first occurrence of ‘ABC’ with 'ZYX'

c. Replaces all occurrences 'ABC' with 'ZYX'

d. Replaces first occurrence in every line ‘ABC’ with 'ZYX' 

The correct answer is: Replaces first occurrence in every line ‘ABC’ with 'ZYX'

Which of the following should be used to print lines containing ‘manager’ in emp.lst?

Select one:

a. awk ‘manager { print }’ emp.lst

b. awk ‘/manager { print }’ emp.lst

c. awk ‘/manager/ { print }’ emp.lst 

d. awk ‘/manager/ { print } emp.lst

The correct answer is: awk ‘/manager/ { print }’ emp.lst

which of the following option can be used ,in order to quit vi editor without saving the work done ?

Select one:

a. :q! 

b. :w

c. :q

d

 sai Sampath Ghantasala .

Question

19

Correct

Mark 1.00 out of

1.00

Question

20

Correct

Mark 1.00 out of

1.00

Question

21

Correct

Mark 1.00 out of

1.00

Question

22

Correct

Mark 1.00 out of

1.00

d. :c

The correct answer is: :q!

What does DTD stand for?

Select one:

a. Direct Type Definition

b. Dynamic Type Definition

c. Document Type Definition 

d. Dynamic Transfer Definition

The correct answer is: Document Type Definition

Which of the following fragments of XML are well-formed

Select one:

a. <?xml?>

b. <?xml encoding="Master"?>

c. <?xml encoding="JIS" version="File1"?>

d. <?xml version="1.0"?> 

The correct answer is: <?xml version="1.0"?>

Which of the following xml prolog is according to syntax of XML

Select one:

a. <?xml version="1.0" encoding="UTF-18"?>

b. <?xml version="1.0" encoding="UTF-8"?> 

c. <?xml version="1.0" version="UTF-8"?>

d. <?xml version="1.0" encoding="UTF-8">

The correct answer is: <?xml version="1.0" encoding="UTF-8"?>

Identify the well-formed XML code

Select one:

a. <bookstore> 

     <book category="children">

     <title>Harry Potter</title> 

     <author>J K. Rowling</author> 

     <year>2005</year> 

     <price>29.99 </book> 

 </bookstore>

b. <bookstore> 

     <book category="children"> 

     <title>Harry Potter</title> 

     <author>J K. Rowling</author> 

     <year>2005</year> 

     <price>29.99</price> 

    </book> 

 </bookstore> 

 sai Sampath Ghantasala .

Question

23

Correct

Mark 1.00 out of

1.00

Question

24

Correct

Mark 1.00 out of

1.00

Question

c. <bookstore> 

     <book category=children> 

     <title>Harry Potter</title> 

    <author>J K. Rowling</author> 

    <year>2005</year> 

    <price>29.99</price> 

   </book> 

 </bookstore>

d. <bookstore>

   <book category="children"> 

    <title>Harry Potter</title> 

    <author>J K. Rowling</author> 

    <year>2005</year> 

   <price>29.99</price>

 </bookstore>

The correct answer is: <bookstore> 

     <book category="children"> 

     <title>Harry Potter</title> 

     <author>J K. Rowling</author> 

     <year>2005</year> 

     <price>29.99</price> 

    </book> 

 </bookstore>

Consider the Java code given below. How many times ";Hello "; will be printed when the code is executed?

 public class ApplicationTester 

 { 

 public static void main(String[] args)

 {

 int i = 0; 

 do

 { 

 System.out.println("Hello");

 i++; 

 } while(i <= 1); 

 } 

 }

Choose the most appropriate option. 

Select one:

a. Nothing will be printed

b. 2 times 

c. 3 times

d. 1 time

The correct answer is: 2 times

which of the following represents correct order from the most to least restrictive? Choose most appropriate option.

Select one:

a. private,default,proctected,public 

b. private,protected,default,public

c. protected,private,default,public

d. public,protected,default,private

The correct answer is: private,default,proctected,public

Consider the Java code given below How many times "Accenture" will be printed when the code is executed?

 sai Sampath Ghantasala .

Quest o

25

Correct

Mark 1.00 out of

1.00

Question

26

Correct

Mark 1.00 out of

1.00

Question

27

Consider the Java code given below. How many times Accenture will be printed when the code is executed?

public class Tester 

 public static void main(String[] args)

 { 

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

 { 

 System.out.println("Accenture"); 

 i++; 

 } 

 }

Choose the most appropriate option. 

Select one:

a. 2 times

b. 3 times 

c. 1 time

d. 4 times

The correct answer is: 3 times

What will be the output of the following Java code?

 public class Vehicle 

{

 protected String enginePower;

 public Vehicle()

 { 

 this.enginePower = "100CC";

 } 

 public String getEnginePower()

 { 

 return this.enginePower; 

 } 

public class PassengerVehicle extends Vehicle

private int capacity; 

public PassengerVehicle()

this.capacity = 50; 

this.enginePower = "150CC"; 

public int getCapacity()

return this.capacity; 

}

public class ApplicationTester 

 public static void main(String[] args)

 { 

 Vehicle vehicle = new PassengerVehicle(); 

 System.out.println(vehicle.getEnginePower());

 } 

}

Choose the most appropriate option. 

Select one:

a. 100CC

b. null

c. 100CC150CC

d. 150CC 

The correct answer is: 150CC

What will be the output of the following Java code?

 sai Sampath Ghantasala .

27

Correct

Mark 1.00 out of

1.00

Question

28

Correct

Mark 1.00 out of

1.00

Question

29

Correct

Mark 1.00 out of

1.00

public class MyClass 

 private static int count; 

 static

 { 

 MyClass.count = 100;

 //Line-1 

 int count = 100; 

 //Line-2 

 } 

 public MyClass()

 { 

 count++ ; 

 } 

 public static int getCount()

 { 

 return count; 

 } 

public class StaticTester 

 public static void main(String[] args)

 { 

 MyClass ref1 = new MyClass();

 MyClass ref2 = new MyClass(); 

 System.out.println(ref1.getCount()); 

 } 

}

Choose the most appropriate option. 

Select one:

a. 2

b. 102 

c. Compilation error at Line-2: Duplicate variable 'count'

d. Compilation error at Line-1: Invalid variable reference 'MyClass.count'

The correct answer is: 102

Which of the following statement/statements is/are FALSE?

(i) 'package ' statement can appear any where in the Java code

(ii) In a Java code, one can write only one 'import ' statement

Choose the most appropriate option.

Select one:

a. Both (i) and (ii) are TRUE

b. Only (i) is FALSE

c. Both (i) and (ii) are FALSE 

d. Only (ii) is FALSE

The correct answer is: Both (i) and (ii) are FALSE

What will be the output of the following Java code?

public class ApplicationTester 

 { 

 public static void main(String[] args)

 { 

 int[] array = {-9,-11-8,-100,-78}; 

 int minimum = 0; 

 for(int index=0; index < array.length; index++)

 { 

 if(minimum < array[index])

 { minimum = array[index]; 

 }

 }

System out println(minimum);

 sai Sampath Ghantasala .

Question

30

Correct

Mark 1.00 out of

1.00

Question

31

Correct

Mark 1.00 out of

1.00

 System.out.println(minimum); 

 } 

 }

Choose the most appropriate option. 

Select one:

a. -100

b. null

c. 0 

d. -8

The correct answer is: 0

What will be the output of the following Java code?

public class ApplicationTester {

           public static void main(String[] args) {

                 int [] array1 = {10,20,30,40,50};

                 int [] array2 = array1;

                 for(int index1=0,index2=3; index2<array2.length&&index1<array1.length; index1++,++index2)

                   {

                                array1[index1]++;

                                System.out.print(array2[index2]+” ”);

                   }

         }

}

Select one:

a. 41 51

b. Array Index Out Of Bounds Exception

c. 0 0

d. 40 50 

The correct answer is: 40 50

What will be the output of the following Java code?

public class ApplicationTester 

 public static void main(String[] args)

 { 

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

 { 

 if(i>6)

 break;

 }

 System.out.println(i); //Line-1 

 } 

}

Choose most appropriate option. 

Select one:

a. null

b. 5

c. Compilation error at Line-1: i cannot be resolved to a variable 

d. 6

 sai Sampath Ghantasala .

Question

32

Correct

Mark 1.00 out of

1.00

Question

33

Correct

Mark 1.00 out of

1.00

Question

34

Correct

Mark 1.00 out of

1.00

The correct answer is: Compilation error at Line-1: i cannot be resolved to a variable

The employee tables contains EmployeeId,EmployeeName and DeptCode Columns. Which is the CORRECT SQL query to

display the EmployeeId and EmployeeName of employees who are working in DeptCode 10 OR 20?

(i) SELECT EmployeeId,EmployeeName FROM Employee WHERE DeptCode IN (10,20);

(ii) SELECT EmployeeId,EmployeeName FROM Employee WHERE DeptCode = 10 OR DeptCode = 20;

Choose most appropriate option.

Select one:

a. Only (i)

b. Neither (i) nor (ii)

c. Both (i) and (ii) 

d. Only (ii)

The correct answer is: Both (i) and (ii)

Consider the following tables: 

                      Vendor (VendorId, VendorName, PhoneNumber). 

                                 Here VendorId is the primary key. 

                      Item (ItemCode, UnitPrice, QuantityOnHand, VendorId) 

                                Here ItemCode is the primary key and VendorId is the foreign key referencing the VendorId in                           

                Vendor Table. 

Which is the CORRECT SQL query to display ItemCode, UnitPrice, VendorName for all Items. It should also display the details

of the Item which is not having any vendor?

 Choose most appropriate option

Select one:

a. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item, Vendor WHERE Item.VendorId =

Vendor.VendorId;

b. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item LEFT OUTER JOIN Vendor ON Item.VendorId =

Vendor.VendorId; 

c. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item INNER JOIN Vendor ON Item.VendorId =

Vendor.VendorId;

d. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item INNER JOIN Vendor ON Item.VendorId =

Vendor.VendorId AND Item.VendorId IS NULL;

The correct answer is: SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item LEFT OUTER JOIN Vendor ON

Item.VendorId = Vendor.VendorId;

Identify the CORRECT SQL statement(s) to remove ONLY the data from "Employee" table?

(i) DROP TABLE Employee;

(ii) DELETE FROM Employee;

(iii) TRUNCATE TABLE Employee;

Choose most appropriate option.

Select one:

a. (i), (ii) and (iii)

b. Both (i) and (ii)

c. Both (ii) and (iii) 

d. Both (i) and (iii)

 sai Sampath Ghantasala .

Question

35

Correct

Mark 1.00 out of

1.00

Question

36

Correct

Mark 1.00 out of

1.00

Question

37

Incorrect

Mark 0.00 out of

1.00

Question

38

C t

The correct answer is: Both (ii) and (iii)

The following statement is True/False?

Is it mandatory for foreign key column to have the same data type of primary key in case of writing the querry of join to fetch

data from multiple tables. 

Select one:

a. False

b. True 

The correct answer is: True

Consider the following tables:

Vendor (VendorId, VendorName, PhoneNumber). Here VendorId is the primary key.

Item (ItemCode, UnitPrice, QuantityOnHand, VendorId) Here ItemCode is the primary key and VendorId is the foreign key

referencing the VendorId in Vendor Table.

Which is the CORRECT SQL query to display ItemCode, UnitPrice, VendorName for all Items. It should also display the details

of the Item which is not having any vendor?

Choose most appropriate option

Select one:

a. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item INNER JOIN Vendor ON Item.VendorId =

Vendor.VendorId;

b. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item INNER JOIN Vendor ON Item.VendorId =

Vendor.VendorId AND Item.VendorId IS NULL;

c. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item, Vendor WHERE Item.VendorId =

Vendor.VendorId;

d. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item LEFT OUTER JOIN Vendor ON Item.VendorId =

Vendor.VendorId; 

Your answer is correct.

The correct answer is: SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item LEFT OUTER JOIN Vendor ON

Item.VendorId = Vendor.VendorId;

Identify the CORRECT SQL statement to create a Account table with composite primary key (AccountNumber, CustomerId).

Choose most appropriate option

Select one:

a. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey COMPOSITE PRIMARY KEY (AccountNumber,CustomerId)); 

b. CREATE TABLE Account (AccountNumber Number(5) CONSTRAINT Acc_Pkey1 PRIMARY KEY, CustomerId Number(10)

CONSTRAINT Acc_Pkey2 PRIMARY KEY, OpeningDate Date, Balance Number(10,2));

c. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10) CONSTRAINT Acc_Pkey2 PRIMARY KEY

(AccountNumber,CustomerId), OpeningDate Date, Balance Number(10,2));

d. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId));

Your answer is incorrect.

The correct answer is: CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date,

Balance Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId));

Assume abc.html is existing and a valid HTML page. Refer the code below:

<form action="abc.html">

First Name: <input type="text"/><br/>

 sai Sampath Ghantasala .

Correct

Mark 1.00 out of

1.00

Question

39

Incorrect

Mark 0.00 out of

1.00

Question

40

Correct

Mark 1.00 out of

1.00

Question

41

Correct

Mark 1.00 out of

1.00

 First Name: <input type text /><br/>

 Last Name: <input type="text"/><br/>

 Password: <input type="hidden"/><br/> 

<input type="submit" value="Submit"/> 

<form>

How many HTML controls will be displayed on the browser, when the above page is run on browser? Choose most appropriate

option

Select one:

a. 3 

b. 4

c. 5

d. 7

The correct answer is: 3

Which of the following CSS code is the correct one to apply style to tag 'p'? Choose most appropriate option.

Select one:

a. p ( color:red; text-align:center; )

b. p { color:red, text-align:center; }

c. p { color=red; text-align=center; } 

d. p { color:red; text-align:center; }

Your answer is incorrect.

The correct answer is: p { color:red; text-align:center; }

In HTML, Which of the following is used to merge columns in a table? Choose most appropriate option.

Select one:

a. columnspan

b. cspan

c. colspan 

d. columns-span

The correct answer is: colspan

Identify the CORRECT HTML code to define the state of the hyperlink. The requirement is to display the hyperlink "Click" in RED

color if user has already visited "https://portal.accenture.com". Choose most appropriate option.

Select one:

a. <html>

 <body> 

 <a href="https://portal.accenture.com/" link="red"> Click </a>

 </body> 

 </html>

b. <html> 

 <body vlink="red" > 

<a href="https://portal.accenture.com/">Click </a> 

 </body>

 </html> 

c. <html> 

<body link="red" > 

<a href="https://portal.accenture.com/"> Click </a> 

</body> 

</html>

 sai Sampath Ghantasala .

Question

42

Correct

Mark 1.00 out of

1.00

Question

43

Correct

Mark 1.00 out of

1.00

d. <html> 

 <body> 

 <a href="https://portal.accenture.com/" vlink="red"> Click </a> 

 </body> 

 </html>

The correct answer is: <html> 

 <body vlink="red" > 

<a href="https://portal.accenture.com/">Click </a> 

 </body>

 </html>

Which method is used to remove focus from the specified object? Choose most appropriate option.

Select one:

a. onclick()

b. onfocus()

c. onblur() 

d. onsubmit()

The correct answer is: onblur()

Consider the HTML code given below.

<html>

  <head>

    <script>

      var key=10;

      function add(){

        var key=20; 

        window.key=key+1; 

        document.write(key);

        document.write(" "); 

        print();

      }

      function print(){ 

        document.write(key);

      }

    </script>

  </head>

  <body>

    <form>

      <input type="s

Select one:

a. 21 21

b. 20 21 

c. 11 11

d. 11 10

Your answer is correct.

The correct answer is: 20 21

 sai Sampath Ghantasala .

Question

44

Correct

Mark 1.00 out of

1.00

Question

45

Correct

Mark 1.00 out of

1.00

Question

46

Correct

Mark 1.00 out of

1.00

SPOT THE ERROR:

Observe the below algorithm to find the average of three numbers. 

Step1: Start

Step2: Get num1, num2, num3

Step3: Add num1, num2, num3 and store it in Sum

Step4: Average=sum%3

Step5: Display Sum and Average

Step6: Stop

Identify the incorrect step(if any)

Select one:

a. No error

b.  Step 4 

c.  Step 5

d. Step 2

Your answer is correct.

The correct answer is:  Step 4

Order the range of coupling from high to low

a. control coupling

b. stamp coupling

c. content coupling

d. uncoupled

e. common coupling

f. data coupling

Select one:

a. 

c , e , a, b, f, d 

b. 

d, c , e , a, b, f

c. 

c  , a, b, f, e, d

d. 

c , e , a, f , b, d

Your answer is correct.

The correct answer is: 

c , e , a, b, f, d

Carefully read the question and answer accordingly. What operation is processed for each element in the list

Select one:

a. Merging

b. Inserting

c. Traversal 

d. Sorting

 sai Sampath Ghantasala .

Question

47

Correct

Mark 1.00 out of

1.00

Question

48

Correct

Mark 1.00 out of

1.00

Question

49

Not answered

Marked out of

1.00

Question

50

Not answered

Marked out of

1.00

The correct answer is: Traversal

Carefully read the question and answer accordingly. Which data structure is said to be linear data structure?

Select one:

a. Graphs

b. None of the listed options

c. Tree

d. Arrays 

The correct answer is: Arrays

Time complexity of an algorithm signifies the total time required by the algorithm to complete its execution with provided

resources. State True or False.

Select one:

True 

False

The correct answer is 'True'.

What is the time complexity of find_count()?

int find_count(int i)

{

int c=0;

for(int m=0;m<I;m++)

       for(int n=m;n>0;n--)

             c=c+1;

return c;

}

Select one:

a. theta(nlognlogn)

b. theta(n)

c. theta(n2)

d. theta(n*logn)

The correct answer is: theta(n2)

What is the time complexity of these functions? 

 int fact(int i)

 { 

if(i<=1)

return i; 

 return 2*fact(i-1);

 }

 int fact2(int i) 

{

 if(i<=1) 

return i; 

 sai Sampath Ghantasala .

 return fact2(i-1) + fact2(i-1);

 } 

Select one:

a. O(2^n) for both fact() and fact2()

b. O(n) for fact() and O(2^n) for fact2()

c. O(n) for both fact() and fact2()

d. O(2^n) for fact() and O(n) for fact2()

The correct answer is: O(n) for fact() and O(2^n) for fact2()

 sai Sampath Ghantasala .

 Dashboard / Nobles Mock 2 - Quiz / Quiz / Quiz

Question

1

Correct

Mark 1 out of 1

Question

2

Correct

Mark 1 out of 1

Question

3

Incorrect

Mark 0 out of 1

Started on Friday, 12 June 2020, 5:40 PM

State Finished

Completed on Friday, 12 June 2020, 6:35 PM

Time taken 54 mins 32 secs

Grade 41 out of 50 (81%)

Consider the table Student(StudentId, StudentName, Email, PercentageOfMarks). Which is the CORRECT query to display the

details in the ascending order (lowest to highest) of PercentageOfMarks and in the descending order of StudentId in case

PercentageOfMarks is the same. Choose most appropriate option

Select one:

a. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY PercentageOfMarks DESC,

StudentId DESC;

b. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY PercentageOfMarks DESC,

StudentId;

c. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY PercentageOfMarks, StudentId

DESC; 

d. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY StudentId DESC,

PercentageOfMarks;

The correct answer is: SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY

PercentageOfMarks, StudentId DESC;

Which is the CORRECT SQL statement to add the new column "DateOfJoining" to an existing table "Employee"? Choose most

appropriate option.

Select one:

a. CREATE TABLE Employee ADD DateOfJoining DATE;

b. ALTER TABLE Employee MODIFY DateOfJoining DATE;

c. ALTER TABLE Employee UPDATE DateOfJoining DATE;

d. ALTER TABLE Employee ADD DateOfJoining DATE; 

The correct answer is: ALTER TABLE Employee ADD DateOfJoining DATE;

Which of the following statement(s) is/are TRUE?

(i) In a non-correlated(independent) subquery, the subquery is always executed only once.

(ii) In a non-correlated(independent) subquery, the inner query (sub query) references the column from the outer query (main

query).

Choose most appropriate option

Select one:

a. Neither (i) nor (ii)

b. Only (ii)

c. Both (i) and (ii) 

d. Only (i)

The correct answer is: Only (i)

 sai Sampath Ghantasala .

Question

4

Incorrect

Mark 0 out of 1

Question

5

Correct

Mark 1 out of 1

Question

6

Correct

Mark 1 out of 1

Question

7

Correct

Mark 1 out of 1

Question

8

Correct

Mark 1 out of 1

Which is the CORRECT SQL Query to display names of employees which has only 3 letters that starts with 'A' and ends with 'e'?

Choose most appropriate option.

Select one:

a. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE 'A%e'; 

b. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE '__e';

c. SELECT EmployeeName FROM Employee WHERE EmployeeName = 'A_e';

d. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE 'A_e';

The correct answer is: SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE 'A_e';

Which of the following is CORRECT about DELETE command?

a) It can delete single or multiple columns from a table

b) It can delete single or multiple records from a table

c) Records deleted can be roll backed.

Choose most appropriate option.

Select one:

a. b and c 

b. a and c

c. a and b

d. a only

The correct answer is: b and c

What is the SQL query for finding the total number of rows in a given table 'emp'? Choose most appropriate option.

Select one:

a. SELECT SUM(*) FROM EMP;

b. SELECT COUNT FROM EMP;

c. SELECT SUM FROM EMP;

d. SELECT COUNT(*) FROM EMP; 

The correct answer is: SELECT COUNT(*) FROM EMP;

Which of the following SQL commands is used to remove table "EMPLOYEE" present in the database? Choose most

appropriate option.

Select one:

a. TRUNCATE TABLE EMPLOYEE;

b. DROP TABLE EMPLOYEE; 

c. REMOVE TABLE EMPLOYEE;

d. DELETE TABLE EMPLOYEE;

The correct answer is: DROP TABLE EMPLOYEE;

Consider table Item(itemId, category, unitprice). Identify the appropriate SQL statement to display item id and discount in the

ascending order of discount. [Note: Discount should be 10% of unitprice] Choose most appropriate option.

Select one:

 sai Sampath Ghantasala .

Mark 1 out of 1

Question

9

Correct

Mark 1 out of 1

Question

10

Correct

Mark 1 out of 1

Question

11

Partially correct

Mark 1 out of 1

Question

12

Correct

Mark 1 out of 1

a. select itemId, unitprice*0.1 as discount from Item order by itemId;

b. select itemId, unitprice*0.1 as discount from Item order by discount; 

c. select itemId, discount from Item order by discount;

d. select itemId, discount=unitprice*0.1 from Item order by discount;

The correct answer is: select itemId, unitprice*0.1 as discount from Item order by discount;

Which of the following about DELETE command in SQL is FALSE? Choose most appropriate option.

Select one:

a. Used for deleting a single column value in a record 

b. Is a DML statement and has to be manually committed

c. Throws constraint violation error when deleting a parent record, for which child records exists

d. Used for deleting multiple records in a table

The correct answer is: Used for deleting a single column value in a record

Consider the table Employee(empid, empname, designation). Identify the appropriate SQL statement to retrieve all employees

whose designation is either 'S or 'A'. Choose most appropriate option.

Select one:

a. SELECT * FROM Employee WHERE designation IN('S' OR 'A');

b. SELECT * FROM Employee WHERE designation =('S' , 'A');

c. SELECT * FROM Employee WHERE designation =('S' OR 'A');

d. SELECT * FROM Employee WHERE designation IN('S' , 'A'); 

The correct answer is: SELECT * FROM Employee WHERE designation IN('S' , 'A');

Assume that table Project is created using the DDL statement given below and has no records. 

                   CREATE TABLE Project( projectId VARCHAR2(4) CONSTRAINT proj_pk PRIMARY KEY, projectName

VARCHAR2(10) DEFAULT 'NA' CONSTRAINT proj_nn NOT NULL); 

Identify the INSERT statements which would successfully insert record into Project table. Choose two most

appropriate options.

Select one or more:

a. INSERT INTO project(projectName,projectId) VALUES('NA','P4' ); 

b. INSERT INTO project VALUES('P1');

c. INSERT INTO project(projectId) VALUES('P2');

d. INSERT INTO project(projectId,projectName) VALUES('P3', Null);

The correct answers are: INSERT INTO project(projectName,projectId) VALUES('NA','P4' );, INSERT INTO project(projectId)

VALUES('P2');

Given a table Projects, which of the following SQL queries will display records that contains Sub-String "SAP" any where in the

ProjectName ? Choose most appropriate option.

Select one:

a. SELECT * FROM Projects WHERE ProjectName LIKE "%SAP%"; 

b. SELECT * FROM Projects WHERE ProjectName = '%SAP%';

c. SELECT * FROM Projects WHERE ProjectName LIKE '%SAP';

 sai Sampath Ghantasala .

Question

13

Incorrect

Mark 0 out of 1

Question

14

Correct

Mark 1 out of 1

Question

15

c. S C O ojects oject a e %S ;

d. SELECT * FROM Projects WHERE ProjectName LIKE 'SAP%';

The correct answer is: SELECT * FROM Projects WHERE ProjectName LIKE "%SAP%";

Identify the CORRECT SQL statement to create a Account table with composite primary key (AccountNumber, CustomerId).

Choose most appropriate option

Select one:

a. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey COMPOSITE PRIMARY KEY (AccountNumber,CustomerId)); 

b. CREATE TABLE Account (AccountNumber Number(5) CONSTRAINT Acc_Pkey1 PRIMARY KEY, CustomerId Number(10)

CONSTRAINT Acc_Pkey2 PRIMARY KEY, OpeningDate Date, Balance Number(10,2));

c. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId));

d. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10) CONSTRAINT Acc_Pkey2 PRIMARY KEY

(AccountNumber,CustomerId), OpeningDate Date, Balance Number(10,2));

Your answer is incorrect.

The correct answer is: CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date,

Balance Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId));

Consider the tables given below.

Customer(customerId,customerName)

Book(bookId, bookName)

Purchase(purchaseId, bookId, customerId)

bookId and customerId in purchase table are foreign keys referring to Book and Customer tables respectively.

Which is the CORRECT SQL statement to retrieve customer name and book name for all books purchased by customers.

Select one:

a. SELECT c.customerName,b.bookName

FROM customer c INNER JOIN purchase p

ON c.customerId=p.customerId

SELF JOIN book b

ON b.bookid=p.bookid;

b. SELECT c.customerName,b.bookName

FROM customer c INNER JOIN purchase p

INNER JOIN book b

ON b.bookid=p.bookid AND c.customerId=p.customerId;

c. SELECT c.customerName,b.bookName

FROM customer c INNER JOIN purchase p

ON c.customerId=p.customerId

INNER JOIN book b

ON b.bookid=p.bookid; 

d. SELECT c.customerName,b.bookName

FROM customer c INNER JOIN purchase p

ON c.customerId=p.customerId;

Your answer is correct.

The correct answer is: SELECT c.customerName,b.bookName

FROM customer c INNER JOIN purchase p

ON c.customerId=p.customerId

INNER JOIN book b

ON b.bookid=p.bookid;

Consider a table with the name Project is created using the SQL statement given below

 sai Sampath Ghantasala .

15

Correct

Mark 1 out of 1

Question

16

Correct

Mark 1 out of 1

Question

17

Not answered

Marked out of 1

CREATE TABLE Project(

projectid VARCHAR2(10) CONSTRAINT pkey PRIMARY KEY,

projectname VARCHAR2(10) CONSTRAINT pnull NOT NULL,

employeecount NUMBER(2) DEFAULT 0);

Which of the following statements insert record successfully to the Project table [Choose 2]

Select one or more:

a. INSERT INTO project(projectid,projectname) VALUES('P2','Finance'); 

b. INSERT INTO project VALUES('P1','Finance';)

c. INSERT INTO project(projectid,employeecount) VALUES('P3',10);

d. INSERT INTO project VALUES('P1','Finance',20); 

Your answer is correct.

The correct answers are: INSERT INTO project VALUES('P1','Finance',20);, INSERT INTO project(projectid,projectname)

VALUES('P2','Finance');

What will be the output of the following Java code?

public class ApplicationTester 

 {

 public static void main(String[] args)

 { 

 int i; 

 for(i = 1; i <=3; i++);

 { 

 System.out.println(i); 

 }

 System.out.println(i);

 } 

 }

Choose the most appropriate option. 

Select one:

a. 3 will be displayed twice on the console

b. 4 will be displayed twice on the console 

c. 1 to 3 will be displayed on the console

d. 1 to 4 will be displayed on the console

The correct answer is: 4 will be displayed twice on the console

Identify the relationship between the class Patient and class Doctor which are given below.

 public class Patient

 private String name; 

 //getter and setter methods 

public class Doctor

 private String name; 

 private String specialization; 

 //getter and setter methods 

 public void treatPatient(Patient patient)

 { 

 //valid Java code 

 }

}

Choose the most appropriate option. 

Select one:

a. Composition

b. Aggregation

D d

 sai Sampath Ghantasala .

Question

18

Correct

Mark 1 out of 1

Question

19

Incorrect

Mark 0 out of 1

Question

20

Correct

Mark 1 out of 1

c. Dependency

d. No relationship exists between Doctor class and Patient class

The correct answer is: Dependency

Consider the Java code given below. How many times ";Hello "; will be printed when the code is executed?

 public class ApplicationTester 

 { 

 public static void main(String[] args)

 {

 int i = 0; 

 do

 { 

 System.out.println("Hello");

 i++; 

 } while(i <= 1); 

 } 

 }

Choose the most appropriate option. 

Select one:

a. 1 time

b. 3 times

c. 2 times 

d. Nothing will be printed

The correct answer is: 2 times

If Employee class is created inside com.test package, what could be the first line in class? Choose most appropriate option.

Select one:

a. package com.test

b. package com.test.Employee 

c. packages com.test

d. class Employee{}

The correct answer is: package com.test

Consider the Java code given below. How many times "1" will be printed when the code is executed?

 public class ApplicationTester 

 public static void main(String[] args)

 { 

 int i = -1; 

 while( ++i <= 1)

 { 

 System.out.println("1");

 i++; 

 } 

 }

}

Choose the most appropriate option. 

Select one:

a. 1 time 

b. 2 times

c. Nothing will be printed.

d. 3 times

 sai Sampath Ghantasala .

Question

21

Incorrect

Mark 0 out of 1

Question

22

Correct

Mark 1 out of 1

Question

23

Correct

Mark 1 out of 1

The correct answer is: 1 time

Which of the following statement/s is/are TRUE?

(1) Abstract method can have body

(2) Abstract class cannot be instantiated

(3) Abstract class can have constructor

Choose the most appropriate option.

Select one:

a. Both (2) and (3) are TRUE

b. Both (1) and (2) are TRUE

c. Only (2) is TRUE 

d. Both (1) and (3) are TRUE

The correct answer is: Both (2) and (3) are TRUE

What will be the output of the following Java code?

public class StringTester 

public static void main(String[] args) 

 String player1 = new String ("virat kohli"); 

 String player2 = new String("GAYLE"); 

 player1.toUpperCase(); 

 String newPlayer=player1.substring(6); 

 newPlayer = newPlayer + player2.toLowerCase(); 

 System.out.println(newPlayer); 

}

Choose the most appropriate option. 

Select one:

a. kohligayle 

b. kohliGAYLE

c. KOHLIgayle

d. KOHLI gayle

The correct answer is: kohligayle

What will be the output of the following Java code?

public class BaseClass 

 { 

 public static void method()

 { 

 System.out.println("1"); 

 } 

 } 

public class DerivedClass extends BaseClass

public static void method()

System.out.println("2"); 

public class ApplicationTester 

{

 public static void main(String[] args)

 { 

 BaseClass ref = new DerivedClass(); 

ref method();

 sai Sampath Ghantasala .

Question

24

Correct

Mark 1 out of 1

Question

25

Correct

Mark 1 out of 1

Question

26

Correct

M k 1 t f 1

 ref.method(); 

 //Line-1 

 }

}

Choose the most appropriate option. 

Select one:

a. Compilation error at Line-1: Ambiguous method call 'ref.method()'

b. 2

c. Program will display both 1 and 2

d. 1 

The correct answer is: 1

What will be the output of the following Java code?

public class ApplicationTester 

 public static void main(String[] args)

 { 

 int[] array = {11,22,33,44,55,11}; 

 int searchNumber = 11, position=999;

 for(int index=0; index < array.length; index++)

 { 

 if(searchNumber == array[index])

 { 

 position = index; 

 } 

 } System.out.println(position); 

 }

}

Choose the most appropriate option. 

Select one:

a. 5 

b. 0

c. 6

d. 1

The correct answer is: 5

Which of the following statement(s) is/are FALSE?

(i) 'package ' statement can appear any where in the Java code

(ii) In a Java code, only one 'import ' statement can be written

Choose the most appropriate option.

Select one:

a. Both (i) and (ii) are FALSE 

b. Only (ii) is FALSE

c. Only (i) is FALSE

d. Both (i) and (ii) are TRUE

The correct answer is: Both (i) and (ii) are FALSE

Chaining What is the output for the below code ?

class A 

 { 

 public A()

 sai Sampath Ghantasala .

Mark 1 out of 1

Question

27

Incorrect

Mark 0 out of 1

Question

28

Correct

Mark 1 out of 1

 { 

 System.out.print("A "); 

 } 

 public A(int i)

 { 

 System.out.print(i+" "); 

 } 

 } 

class B extends A

public B ()

 super(); 

 System.out.print("B ");

}

public B (int i)

 super(i); 

 System.out.print(i+3+" ");

}

public class Test

 public static void main (String[] args)

 { 

 new B(5); 

 }

}

Choose most appropriate option. 

Select one:

a. A B 5

b. A B 8

c. 5 8 

d. B 8 A 5

The correct answer is: 5 8

Accenture developed a Java based Application (Vendor Management System) for New Codington city. The product was

delivered to New Codington after successful testing on Windows platform. New Codington wants to run the application on

their desktop which has Linux platform. What are the MINIMUM resources needed to successfully run the application? Choose

the most appropriate option.

Select one:

a. JDK on Windows

b. JVM on Linux

c. JVM on Windows

d. JDK on Linux 

The correct answer is: JVM on Linux

What will be the output of the following Java code?

 public class MyClass 

 private static int data; 

 static

 { 

 MyClass.data = 999; 

 } 

 public static int getData() 

 { 

 return data; 

 } 

 public static void setData(int data) 

 {

 sai Sampath Ghantasala .

Question

29

Correct

Mark 1 out of 1

Question

30

Correct

Mark 1 out of 1

 MyClass.data = data; 

 } 

public class ApplicationTester 

{

 public static void main(String[] args)

 { 

 MyClass ref1 = new MyClass(); 

 MyClass ref2 = new MyClass();

 System.out.print(ref1.getData()); 

 ref2.setData(111); 

 System.out.println(" " + ref1.getData());

 } 

}

Choose the most appropriate option. 

Select one:

a. 999 111 

b. 0 111

c. 111 111

d. 999 999

The correct answer is: 999 111

What will be the output of the following Java code?

public class MyClass

 public static void main (String[] args) 

 { 

 int value1=33; 

 int value2=--value1; 

 int value3=value1++;

 System.out.println(value1+" "+value2+" "+value3);

 } 

}

Choose the most appropriate option. 

Select one:

a. 32 33 32

b. 32 32 33

c. 33 32 32 

d. 32 32 32

The correct answer is: 33 32 32

Analyse the following pseudo code and identify the CORRECT output. 

Note: Assume that the input given for Basic is 12000 and Allowances is 3000 

1. input Basic, Allowances 

2. Gross_Salary= Basic + Allowances 

3. if (Gross_Salary > 10000) then 

4. Tax = 0.1 * Gross_Salary 

5. Net_Salary = Gross_Salary - Tax 

6. else 

7. Net_Salary = Gross_Salary 

8. end-if 

9. display Net_Salary 

Choose the most appropriate option.

Select one:

 sai Sampath Ghantasala .

Question

31

Correct

Mark 1 out of 1

Question

32

Correct

Mark 1 out of 1

a. 14985

b. 14000

c. 15000

d. 13500 

The correct answer is: 13500

Consider the Java code given below. After the execution of the code what will be the content of "array2 "?

public class Tester

 public static void main(String[] args)

 {

 int array1[] = {71,12,23,34}; 

 int array2[] = new int[4]; 

 int count = 0; 

 for (int i = 0; i < array2.length; i++) 

 { 

 if(array1[i]%2==0)

 { 

 array2[count]=array1[i]; 

 count++; 

 } 

 } 

 } 

}

Choose the most appropriate option. 

Select one:

a. 0 0 12 34

b. 12 34

c. 12 34 0 0 

d. 12 0 34 0

The correct answer is: 12 34 0 0

Predict the line of code

 Abstract class Base1

{

 protected void getDetails()

 {

 System.out.println("Base method");

 }

 public Abstract void demomethod();

}

Abstract class Base2 extends Base1

{

 public Abstract void samplemethod(); 

}

class Derived extends Base2

{

 //Line1

}

Select one:

a. Error: abstract class can't extends other abstract class

b. none of the option

c. only "samplemethod" need to overried in Dervied class

d. Derived class need to override both "samplemethod" and "demomethod" 

The correct answer is: Derived class need to override both "samplemethod" and "demomethod"

 sai Sampath Ghantasala .

Question

33

Correct

Mark 1 out of 1

Question

34

Correct

Mark 1 out of 1

Question

35

What will be the output of the following Java code?

public class ApplicationTester 

 public static void main(String[] args)

 { 

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

 { 

 if(i>6)

 break;

 }

 System.out.println(i); //Line-1 

 } 

}

Choose most appropriate option. 

Select one:

a. 5

b. Compilation error at Line-1: i cannot be resolved to a variable 

c. 6

d. null

The correct answer is: Compilation error at Line-1: i cannot be resolved to a variable

Given the below code. What is output ?

 class Currency 

 private String country = "Canada"; 

 public String getC() 

 { 

 return country; 

 } 

class JapeneseYen extends Currency

public String getC() 

return super.country; //Line 12 

}

public class AustralianDollar extends Currency 

public String getC(int x) 

return super.getC(); 

public static void main(String[] args) 

System.out.print(new JapeneseYen().getC() + " " + new AustralianDollar().getC()); 

}

Choose most appropriate option. 

Select one:

a. Canada null

b. null Canada

c. null null

d. Compilation fails due to an error on line 12 ";country is not visible ";. 

e. Canada Canada

The correct answer is: Compilation fails due to an error on line 12 ";country is not visible ";.

What will be the output of the following Java code?

 sai Sampath Ghantasala .

35

Correct

Mark 1 out of 1

Question

36

Correct

Mark 1 out of 1

Question

37

Incorrect

public class Account 

 public void deposite(int amount)

 { 

 System.out.println("Account deposited with: " + amount); 

 }

 public void transaction()

 {

 this.deposite(100); 

 } 

}

public class SavingsAccount extends Account

{

public void deposite(int amount)

System.out.println("Savings Account deposited with: " + amount); 

public class ApplicationTester 

 public static void main(String[] args)

 { 

 Account account = new SavingsAccount();

 account.transaction();

 }

}

Choose the most appropriate option. 

Select one:

a. Savings Account deposited with: 100 

b. Account deposited with: 100

c. Savings Account deposited with: 0

d. Account deposited with: 0

The correct answer is: Savings Account deposited with: 100

What will be the output of the following Java code?

class Test extends Throwable { }

class Base extends Test {}

public class Main {

 public static void main(String args[]) { 

 try {

 throw new Base();

 }

 catch(Test t) {

 System.out.println("Test Exception");

 }

 finally {

 System.out.println("Finally block ");

 }

 }

}

Select one:

a. Compilation error: Test Class cant extends Throwable

b. print - "Test Exception" "Finally block " 

c. Compilation error : Base class can't extends Test

d. print-"Test Exception"

The correct answer is: print - "Test Exception" "Finally block "

which of the following code creates a list box from which user can select more than one option?

Select one:

l l iV l b /

 sai Sampath Ghantasala .

Mark 0 out of 1

Question

38

Incorrect

Mark 0 out of 1

Question

39

Correct

Mark 1 out of 1

Question

40

Correct

Mark 1 out of 1

a. <select type=multiValue><br />

 <option> P </option><br />

 <option> G </option><br />

 <option> S </option><br />

</select> 

b. <select type=multiple><br />

 <option> P </option><br />

 <option> G </option><br />

 <option> S </option><br />

</select>

c. <select name='type' multiple><br />

 <option> P </option><br />

 <option> G </option><br />

 <option> S </option><br />

</select>

d. <select name='type' multiValue><br />

 <option> P </option><br />

 <option> G </option><br />

 <option> S </option><br />

</select>

Your answer is incorrect.

The correct answer is: <select name='type' multiple><br />

 <option> P </option><br />

 <option> G </option><br />

 <option> S </option><br />

</select>

'link', 'vlink' and 'alink' are attributes of which HTML tag?

Choose the most appropriate option.

Select one:

a. <img>

b. <a> 

c. <head>

d. <body>

Your answer is incorrect.

The correct answer is: <body>

Which of the following attribute is used by a HTML tag to apply inline style? Choose most appropriate option.

Select one:

a. class

b. style 

c. id

d. styleclass

Your answer is correct.

The correct answer is: style

Refer to the below code:

<script> 

function helloMessage(){ 

 var jsName = //Line1 alert('Hello '+jsName+' !') 

 sai Sampath Ghantasala .

Mark 1 out of 1

Question

41

Correct

Mark 1 out of 1

Question

42

Correct

Mark 1 out of 1

Question

43

Correct

Mark 1 out of 1

</script> 

<form>

Enter First Name : <input type="text" name="firstName" id="first"><br> 

<input type="button" value="Click Here!" onclick="helloMessage()"> 

</form>

Which is the CORRECT code to be inserted at "Line1" to make the JavaScript run properly? Choose most appropriate option

Select one:

a. document.getElementByName('first').value;

b. document.getElement('first').value;

c. document.getElementById.first.value;

d. document.getElementById('first').value; 

The correct answer is: document.getElementById('first').value;

Which attribute of the form specifies the name of the web page on the server which will process the form after submission?

Choose most appropriate option.

Select one:

a. action 

b. name

c. url

d. method

The correct answer is: action

Identify the CORRECT statements with respect to CSS.

a) CSS is used for giving style for HTML content

b) External style sheet can be used only for one HTML page in a website

Choose most appropriate option.

Select one:

a. only b

b. neither a nor b

c. both a and b

d. only a 

The correct answer is: only a

Which of the following statements is TRUE for CSS?

A. An external style sheet is ideal when the style is applied to many pages

B. An inline style created for a html tag can be reused for other tags in same page.

Choose most appropriate option.

Select one:

a. Only B

b. Only A 

c. Both A and B

d. Neither A nor B

Th t i O l A

 sai Sampath Ghantasala .

Question

44

Correct

Mark 1 out of 1

Question

45

Correct

Mark 1 out of 1

Question

46

Correct

Mark 1 out of 1

Question

The correct answer is: Only A

Refer the incomplete HTML Code given below

<table border="2" _______=10> 

<tr> <th>Employee Name</th> 

<th>Department</th> </tr>

<tr> <td>Jack</td> 

<td>LKM</td> </tr> 

<tr> <td>Ace</td><td>Delivery</td> </tr>

</table> 

Identify the appropriate option to be placed in the spaceso that for each cell, there will be a space between the cell border and

its respective content Choose most appropriate option.

Select one:

a. cellpadding 

b. colspan

c. colspace

d. cellspacing

The correct answer is: cellpadding

Refer the incomplete HTML code given below.

<input type="text" name="firstname" ___Blank1___ = "5" />

It is required to restrict the maximum number of characters being entered in the above text box to 5. From the given option,

identify the CORRECT option which can replace "___Blank1___" to meet the above requirement. Choose most appropriate

option.

Select one:

a. maxlength 

b. maxsize

c. size

d. length

The correct answer is: maxlength

What would be the output of the following Java Script?

<html>

 <body>

 <script> 

 var key1=1; document.write(typeof(key1) + " "); 

 var key2=null; document.write(typeof(key2)); 

 </script> 

</body> 

</html>

Choose most appropriate option.

Select one:

a. number object 

b. number undefined

c. int undefined

d. int object

The correct answer is: number object

 sai Sampath Ghantasala .

Question

47

Correct

Mark 1 out of 1

Question

48

Correct

Mark 1 out of 1

<!DOCTYPE html>

 <html>

 <body> 

 <script> 

 var x = (3 + 3) + 4 + "6"; alert(x);//line 1 

 </script>

 </body> 

</html>

What will be printed in alert box in line 1? Choose most appropriate option.

Select one:

a. 3346

b. 646

c. 106 

d. 16

The correct answer is: 106

Consider the HTML code given below.

<html>

  <head>

    <script>

      var key=10;

      function add(){

        var key=20;

        window.key=key+1;

        document.write(key);

        document.write(" ");

        print();

      }

      function print(){

        document.write(key);

      }

    </script>

  </head>

  <body>

    <form>

      <input type="submit" onclick="add()" />

    </form>

  </body>

</html>

What will be displayed after executing the above code?

Choose the most appropriate option.

Select one:

a. 11 10

b. 11 11

c. 21 21

d. 20 21 

Your answer is correct.

The correct answer is: 20 21

 sai Sampath Ghantasala .

Question

49

Correct

Mark 1 out of 1

Question

50

Correct

Mark 1 out of 1

What would be the output of the Javascript code given below?

<html>

<body>

<script>

 var num1=100;

 function test(){

    num2=200;

    var num1=300;

    num1=num2;

 }

 test();

 document.write(num1 +"-"+num2);

 </script>

</body>

</html>

Select one:

a. 300-100

b. 200-200

c. 100-200 

d. 300-200

Your answer is correct.

The correct answer is: 100-200

How many cells will be created after executing the below HTML code?

<html>

<body>

<table border="1">

<tr> <td colspan="3"> Jack </td> </tr>

<tr> <td colspan="2"> Tom </td> <td> Mark </td> </tr>

<tr> <td rowspan="2"> John</td> <td> James</td> <td>Mary</td> </tr>

<tr> <td> Helen</td> <td> Sam </td>  </tr>

</table>

</body>

</html>

Select one:

a. 10

b. 9

c. 8 

d. 7

Your answer is correct.

The correct answer is: 8

 sai Sampath Ghantasala .

 Dashboard / Nobles Mock 1 - Quiz / Quiz / Quiz

Question

1

Correct

Mark 1 out of 1

Question

2

Correct

Mark 1 out of 1

Question

3

Correct

Mark 1 out of 1

Question

4

Incorrect

Mark 0 out of 1

Started on Friday, 5 June 2020, 6:00 PM

State Finished

Completed on Friday, 5 June 2020, 7:08 PM

Time taken 1 hour 7 mins

Grade 39 out of 50 (78%)

The employee table contains EmployeeNumber, EmployeeName, Salary and DeptCode Columns. Which is the CORRECT SQL

query to display DeptCode and average salary of each department? Choose most appropriate option.

Select one:

a. SELECT DeptCode,avg(salary) FROM Employee GROUP BY EmployeeNumber;

b. SELECT DeptCode,avg(salary) FROM Employee GROUP BY Salary;

c. SELECT DeptCode,avg(salary) FROM Employee GROUP BY DeptCode; 

d. SELECT DeptCode,avg(salary) FROM Employee;

The correct answer is: SELECT DeptCode,avg(salary) FROM Employee GROUP BY DeptCode;

Identify the CORRECT SQL statement(s) to remove ONLY the data from "Employee" table?

(i) DROP TABLE Employee;

(ii) DELETE FROM Employee;

(iii) TRUNCATE TABLE Employee;

Choose most appropriate option.

Select one:

a. (i), (ii) and (iii)

b. Both (ii) and (iii) 

c. Both (i) and (ii)

d. Both (i) and (iii)

The correct answer is: Both (ii) and (iii)

Which is the CORRECT SQL statement to add the new column "DateOfJoining" to an existing table "Employee"? Choose most

appropriate option.

Select one:

a. ALTER TABLE Employee MODIFY DateOfJoining DATE;

b. ALTER TABLE Employee UPDATE DateOfJoining DATE;

c. ALTER TABLE Employee ADD DateOfJoining DATE; 

d. CREATE TABLE Employee ADD DateOfJoining DATE;

The correct answer is: ALTER TABLE Employee ADD DateOfJoining DATE;

Which of the following statement(s) is/are TRUE?

(i) In a non-correlated(independent) subquery, the subquery is always executed only once.

(ii) In a non-correlated(independent) subquery, the inner query (sub query) references the column from the outer query (main

query).

Choose most appropriate option

 sai Sampath Ghantasala .

Question

5

Correct

Mark 1 out of 1

Question

6

Correct

Mark 1 out of 1

Question

7

Incorrect

Mark 0 out of 1

Question

8

Correct

Mark 1 out of 1

Select one:

a. Only (i)

b. Only (ii)

c. Both (i) and (ii) 

d. Neither (i) nor (ii)

The correct answer is: Only (i)

Identify the CORRECT SQL statement to create a table with composite primary key. Choose most appropriate option.

Select one:

a. CREATE TABLE Account (AccountNumber Number(5) CONSTRAINT Acc_Pkey1 PRIMARY KEY, CustomerId Number(10)

CONSTRAINT Acc_Pkey2 PRIMARY KEY, OpeningDate Date, Balance Number(10,2));

b. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10) CONSTRAINT Acc_Pkey2 PRIMARY KEY

(AccountNumber,CustomerId), OpeningDate Date, Balance Number(10,2));

c. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId)); 

d. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey COMPOSITE PRIMARY KEY (AccountNumber,CustomerId));

The correct answer is: CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date,

Balance Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId));

Which of the following SQL commands is used to remove table "EMPLOYEE" present in the database? Choose most

appropriate option.

Select one:

a. DELETE TABLE EMPLOYEE;

b. DROP TABLE EMPLOYEE; 

c. REMOVE TABLE EMPLOYEE;

d. TRUNCATE TABLE EMPLOYEE;

The correct answer is: DROP TABLE EMPLOYEE;

which command help us to get back the permission of accessing the table.

Select one:

a. revoke

b. rollback

c. grant 

d. commit

The correct answer is: revoke

State True/False?

The names of the foreign key field and the referenced field(in parent table) may be same or different, but must have the same

data type.

Select one:

 sai Sampath Ghantasala .

Question

9

Correct

Mark 1 out of 1

Question

10

Incorrect

Mark 0 out of 1

Question

11

Correct

Mark 1 out of 1

Question

12

Correct

Mark 1 out of 1

a. True 

b. False

The correct answer is: True

Given a table Projects, which of the following SQL queries will display records that contains Sub-String "SAP" any where in the

ProjectName ? Choose most appropriate option.

Select one:

a. SELECT * FROM Projects WHERE ProjectName LIKE '%SAP';

b. SELECT * FROM Projects WHERE ProjectName LIKE 'SAP%';

c. SELECT * FROM Projects WHERE ProjectName = '%SAP%';

d. SELECT * FROM Projects WHERE ProjectName LIKE "%SAP%"; 

The correct answer is: SELECT * FROM Projects WHERE ProjectName LIKE "%SAP%";

Consider the table Products(pid,pname,pcost). Identify the appropriate SQL statement to rename the table to ProductsInfo .

Choose most appropriate option.

Select one:

a. ALTER TABLE Products UPDATE TO ProductsInfo;

b. ALTER TABLE Products RENAME ProductsInfo; 

c. ALTER TABLE RENAME Products TO ProductsInfo;

d. ALTER TABLE Products RENAME TO ProductsInfo;

The correct answer is: ALTER TABLE Products RENAME TO ProductsInfo;

Consider the table Projects, has following records. 

ProjectId       Start_date 

--------------- ---------------- 

100                 12-Jan-2017 

Which of the following SQL statement retrieve the output as follows? 

Start_date

-----------------

 JAN, 12-2017

 Choose most appropriate option.

Select one:

a. SELECT TO_CHAR(Start_date,'MON, DD-YYYY') FROM Projects; 

b. SELECT TO_DATE(Start_date,'MON, DD-YYYY') FROM Projects;

c. SELECT TO_CHAR(Start_date,'MMM, DD-YYYY') FROM Projects;

d. SELECT TO_DATE(Start_date,'MMM, DD-YYYY') FROM Projects;

The correct answer is: SELECT TO_CHAR(Start_date,'MON, DD-YYYY') FROM Projects;

Consider the table Employee(empid, empname, designation). Identify the appropriate SQL statement to retrieve all employees

whose designation is either 'S or 'A'. Choose most appropriate option.

Select one:

a. SELECT * FROM Employee WHERE designation =('S' , 'A');

 sai Sampath Ghantasala .

Question

13

Correct

Mark 1 out of 1

Question

14

Incorrect

Mark 0 out of 1

Question

15

Incorrect

Mark 0 out of 1

b. SELECT * FROM Employee WHERE designation IN('S' , 'A'); 

c. SELECT * FROM Employee WHERE designation IN('S' OR 'A');

d. SELECT * FROM Employee WHERE designation =('S' OR 'A');

The correct answer is: SELECT * FROM Employee WHERE designation IN('S' , 'A');

Consider the following tables:

Vendor (VendorId, VendorName, PhoneNumber). Here VendorId is the primary key.

Item (ItemCode, UnitPrice, QuantityOnHand, VendorId) Here ItemCode is the primary key and VendorId is the foreign key

referencing the VendorId in Vendor Table.

Which is the CORRECT SQL query to display ItemCode, UnitPrice, VendorName for all Items. It should also display the details

of the Item which is not having any vendor?

Choose most appropriate option

Select one:

a. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item INNER JOIN Vendor ON Item.VendorId =

Vendor.VendorId;

b. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item LEFT OUTER JOIN Vendor ON Item.VendorId =

Vendor.VendorId; 

c. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item, Vendor WHERE Item.VendorId =

Vendor.VendorId;

d. SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item INNER JOIN Vendor ON Item.VendorId =

Vendor.VendorId AND Item.VendorId IS NULL;

Your answer is correct.

The correct answer is: SELECT Item.ItemCode,Item.UnitPrice,Vendor.VendorName FROM Item LEFT OUTER JOIN Vendor ON

Item.VendorId = Vendor.VendorId;

Consider the below tables.

Event(eventId,eventName) – eventId is primary key

Employee(empId, empName, eventId) – empId is primary key and eventId is foreign key referring to Event table.

Identify the correct SQL statement to retrieve empid, empname and eventName for all employees. If employee has not

registered for an event then it should display ‘Not Registered’.

Select one:

a. SELECT e1.empId, e1.empName, NVL(e2.eventName,'Not Registered') FROM event e2 INNER JOIN employee e1 ON

e2.eventId=e1.eventId; 

b. SELECT e1.empId, e1.empName, NVL(e2.eventName,'Not Registered') FROM employee e1 LEFT OUTER JOIN event e2

ON e1.eventId=e2.eventId;

c. SELECT e1.empId, e1.empName, NVL(e2.eventName,'Not Registered') FROM employee e1 RIGHT OUTER JOIN event e2

ON e1.eventId=e2.eventId;

d. SELECT e1.empId, e1.empName, NVL(e2.eventName,'Not Registered') FROM event e2 LEFT OUTER JOIN employee e1

ON e2.eventId=e1.eventId;

Your answer is incorrect.

The correct answer is: SELECT e1.empId, e1.empName, NVL(e2.eventName,'Not Registered') FROM employee e1 LEFT OUTER

JOIN event e2 ON e1.eventId=e2.eventId;

Consider Project table given below.

PROJECTID   EMPLOYEEID

---------------   -------------------

         1                   10

         2                   11

         1                   13

Id tif th t SQL t t t t di l th j tId hi h h th l

 sai Sampath Ghantasala .

Question

16

Correct

Mark 1 out of 1

Question

17

Correct

Mark 1 out of 1

Question

18

Correct

Mark 1 out of 1

Identify the correct SQL statement to display the projectId which has more than one employee.

Select one:

a. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project WHERE

COUNT(employeeId)>1); 

b. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project GROUP BY projectid

WHERE COUNT(employeeId)>1);

c. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project HAVING

COUNT(employeeId)>1);

d. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project GROUP BY projectid

HAVING COUNT(employeeId)>1);

Your answer is incorrect.

The correct answer is: SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project GROUP

BY projectid HAVING COUNT(employeeId)>1);

What will be the output of the following Java code?

public class ApplicationTester 

 public static void main(String[] args)

 { 

 int i=10; 

 while(++i<15)

 { 

 System.out.print(i + " "); 

 } 

 }

}

Choose the most appropriate option. 

Select one:

a. 10 11 12 13 14

b. 15

c. 11 12 13 14 

d. 14

The correct answer is: 11 12 13 14

Which of the following statement/s is/are TRUE?

(1) Abstract method can have body

(2) Abstract class cannot be instantiated

(3) Abstract class can have constructor

Choose the most appropriate option.

Select one:

a. Both (1) and (3) are TRUE

b. Both (1) and (2) are TRUE

c. Both (2) and (3) are TRUE 

d. Only (2) is TRUE

The correct answer is: Both (2) and (3) are TRUE

What will be the output of the following Java code?

 public class Employee 

 private static int count; static

 sai Sampath Ghantasala .

Mark 1 out of 1

Question

19

Correct

Mark 1 out of 1

Question

20

Correct

Mark 1 out of 1

 { 

 Employee.count = 101; 

 } 

 public Employee()

 { 

 Employee.count = 201; 

 } 

 public static int getCount()

 { 

 return Employee.count; 

 } 

public class ApplicationTester 

 public static void main(String[] args)

 { 

 Employee emp = new Employee(); 

 System.out.println(emp.getCount()); 

 } 

}

Choose the most appropriate option. 

Select one:

a. 201 

b. 0

c. null

d. 101

The correct answer is: 201

What will be the output of the following Java code?

class StringSample 

 public StringSample(String string) 

 { 

 System.out.println("The string is " + string); 

 } 

public class ConstructorTester1 

 public static void main(String[] args) 

 { 

 StringSample stringSample = new StringSample(); 

 StringSample stringSample1 = new StringSample("Test String"); 

 } 

}

Choose the most appropriate option. 

Select one:

a. The string is Test String

b. Compilation Error: The constructor StringSample() is undefined 

c. The string is null The string is Test String

d. The string is null

The correct answer is: Compilation Error: The constructor StringSample() is undefined

Consider the Java code given below. How many times "1" will be printed when the code is executed?

 public class ApplicationTester 

 public static void main(String[] args)

 { 

 int i = -1; 

 while( ++i <= 1)

 { 

 System.out.println("1");

 sai Sampath Ghantasala .

Question

21

Correct

Mark 1 out of 1

Question

22

Correct

Mark 1 out of 1

 i++; 

 } 

 }

}

Choose the most appropriate option. 

Select one:

a. Nothing will be printed.

b. 2 times

c. 3 times

d. 1 time 

The correct answer is: 1 time

What will be the output of the following Java code?

public class ApplicationTester 

 public static void main(String[] args)

 {

 int i=0; 

 for(i=0; i<10; i++)

 {

 if(i == 5)

 {

 continue; 

 }

 i++; 

 System.out.print(i + " "); 

 }

 }

}

Choose the most appropriate option. 

Select one:

a. 1 3 5 7 9 

b. 1 2 3 4 6 7 8 9

c. 1 2 3 4 5 6 7 8 9

d. 1 2 3 4 and then program will get into infinite loop

The correct answer is: 1 3 5 7 9

What will be the output of the following Java code?

public class ApplicationTester 

 {

 public static void main(String[] args)

 { 

 int i; 

 for(i = 1; i <=3; i++);

 { 

 System.out.println(i); 

 }

 System.out.println(i);

 } 

 }

Choose the most appropriate option. 

Select one:

a. 1 to 3 will be displayed on the console

b. 3 will be displayed twice on the console

c. 1 to 4 will be displayed on the console

d. 4 will be displayed twice on the console 

 sai Sampath Ghantasala .

Question

23

Incorrect

Mark 0 out of 1

Question

24

Correct

Mark 1 out of 1

The correct answer is: 4 will be displayed twice on the console

What will be the output of the following Java code?

public class ApplicationTester 

 public static void main(String[] args)

 { 

 int[] array = {11,22,33,44,55,11}; 

 int searchNumber = 11, position=999;

 for(int index=0; index < array.length; index++)

 { 

 if(searchNumber == array[index])

 { 

 position = index; 

 } 

 } System.out.println(position); 

 }

}

Choose the most appropriate option. 

Select one:

a. 6

b. 1

c. 5

d. 0 

The correct answer is: 5

What will be the output of the following Java code?

 public class Vehicle 

{

 protected String enginePower;

 public Vehicle()

 { 

 this.enginePower = "100CC";

 } 

 public String getEnginePower()

 { 

 return this.enginePower; 

 } 

public class PassengerVehicle extends Vehicle

private int capacity; 

public PassengerVehicle()

this.capacity = 50; 

this.enginePower = "150CC"; 

public int getCapacity()

return this.capacity; 

}

public class ApplicationTester 

 public static void main(String[] args)

 { 

 Vehicle vehicle = new PassengerVehicle(); 

 System.out.println(vehicle.getEnginePower());

 } 

}

Choose the most appropriate option. 

Select one:

a. 100CC

b. 150CC 

 sai Sampath Ghantasala .

Question

25

Correct

Mark 1 out of 1

Question

26

Not answered

Marked out of 1

Question

27

Correct

Mark 1 out of 1

c. null

d. 100CC150CC

The correct answer is: 150CC

Consider the Java code given below. After the execution of the code what will be the content of "array2 "?

public class Tester

 public static void main(String[] args)

 {

 int array1[] = {71,12,23,34}; 

 int array2[] = new int[4]; 

 int count = 0; 

 for (int i = 0; i < array2.length; i++) 

 { 

 if(array1[i]%2==0)

 { 

 array2[count]=array1[i]; 

 count++; 

 } 

 } 

 } 

}

Choose the most appropriate option. 

Select one:

a. 12 34 0 0 

b. 12 34

c. 12 0 34 0

d. 0 0 12 34

The correct answer is: 12 34 0 0

What will be the output of the following Java code?

 class Event

 static int eventId; 

 public static void main(String[] args) 

 { 

 Event e1=new Event(); 

 e1.eventId=100; 

 Event e2=e1; e2.eventId=200;

 Event e3=new Event(); 

 System.out.println(e1.eventId+ " "+ e2.eventId + " "+ e3.eventId); 

 } 

}

Choose the most appropriate option. 

Select one:

a. 200 200 200

b. 100 100 100

c. 100 200 200

d. 100 200 0

The correct answer is: 200 200 200

Predict the line of code

 Abstract class Base1

{

 protected void getDetails()

 sai Sampath Ghantasala .

Mark 1 out of 1

Question

28

Correct

Mark 1 out of 1

Question

29

Correct

Mark 1 out of 1

 {

 System.out.println("Base method");

 }

 public Abstract void demomethod();

}

Abstract class Base2 extends Base1

{

 public Abstract void samplemethod(); 

}

class Derived extends Base2

{

 //Line1

}

Select one:

a. Derived class need to override both "samplemethod" and "demomethod" 

b. only "samplemethod" need to overried in Dervied class

c. Error: abstract class can't extends other abstract class

d. none of the option

The correct answer is: Derived class need to override both "samplemethod" and "demomethod"

What will be the output of the following Java code?

public class LocalVariableTester 

 { 

 public static void main(String[] args)

 {

 int data1=8, data2; 

 if(data1 >= 10)

 { 

 data2 = 20; 

 } 

 System.out.println(data1 + " " + data2);

 } 

 }

Choose the most appropriate option 

Select one:

a. 10 null

b. 10 0

c. Compilation error: The local variable 'data2' may not have been initialized 

d. 10 20

The correct answer is: Compilation error: The local variable 'data2' may not have been initialized

What will be the output of the following Java code?

public class BaseClass 

 { 

 public static void method()

 { 

 System.out.println("1"); 

 } 

 } 

public class DerivedClass extends BaseClass

public static void method()

System.out.println("2"); 

public class ApplicationTester 

{

 public static void main(String[] args)

 { 

 BaseClass ref = new DerivedClass(); 

 sai Sampath Ghantasala .

Question

30

Correct

Mark 1 out of 1

Question

31

Correct

Mark 1 out of 1

 ref.method(); 

 //Line-1 

 }

}

Choose the most appropriate option. 

Select one:

a. Program will display both 1 and 2

b. 1 

c. 2

d. Compilation error at Line-1: Ambiguous method call 'ref.method()'

The correct answer is: 1

What will be the output of the following Java code?

public class MyClass

 public static void main (String[] args) 

 { 

 int value1=33; 

 int value2=--value1; 

 int value3=value1++;

 System.out.println(value1+" "+value2+" "+value3);

 } 

}

Choose the most appropriate option. 

Select one:

a. 32 32 32

b. 32 33 32

c. 32 32 33

d. 33 32 32 

The correct answer is: 33 32 32

What will be the output of the following Java code?

 public class Employee 

 private static int employeeCount; 

 public Employee()

 { 

 employeeCount++; 

 //Line-1 

 } 

 public static int getEmployeeCount()

 { 

 return Employee.employeeCount; 

 }

public class StaticTester 

 public static void main(String[] args)

 { 

 Employee emp1 = new Employee(); 

 Employee emp2 = new Employee(); 

 Employee emp3 = new Employee(); 

 System.out.println(Employee.getEmployeeCount()); 

 }

}

Choose the most appropriate option. 

Select one:

a. 3 

 sai Sampath Ghantasala .

Question

32

Correct

Mark 1 out of 1

Question

33

Correct

Mark 1 out of 1

Question

34

b. 0

c. 1

d. Compilation error at Line-1: Cannot use static member 'employeeCount' in a non-static context

The correct answer is: 3

What is the output of the below code?

public class Calculator 

 public static void main(String[] args) 

 { 

 int result = 0; 

 Calculator calculator = new Calculator(); 

 calculator.add(10, 20, result); 

 System.out.println("Result : " + result); 

 } 

 public void add(int num1, int num2, int result) 

 { 

 result = num1 + num2; 

 } 

}

Choose the most appropriate option. 

Select one:

a. Result : null

b. Result : 30

c. Result: 20

d. Result : 0 

The correct answer is: Result : 0

What will be the output of the following Java code?

public class ApplicationTester 

 { 

 public static void main(String[] args)

 { 

 int[] array = {-9,-11-8,-100,-78}; 

 int minimum = 0; 

 for(int index=0; index < array.length; index++)

 { 

 if(minimum < array[index])

 { minimum = array[index]; 

 }

 }

 System.out.println(minimum); 

 } 

 }

Choose the most appropriate option. 

Select one:

a. -100

b. -8

c. 0 

d. null

The correct answer is: 0

What will be the output of the following Java code?

 sai Sampath Ghantasala .

34

Correct

Mark 1 out of 1

Question

35

Correct

Mark 1 out of 1

Question

36

Correct

Mark 1 out of 1

Employee.java public class Employee 

 private double salary; 

 public Employee()

 { 

 this.salary = 10000.0; 

 }

 public static void updateSalary(Employee emp)

 {

 emp.salary = emp.salary + 10000.0;

 //Line-1

 } 

 public double getSalary()

 {

 return this.salary; 

 } 

ApplicationTester .java public class ApplicationTester 

 public static void main(String[] args)

 { 

 Employee emp1 = new Employee();

 Employee emp2 = new Employee(); 

 Employee.updateSalary(emp1);

 System.out.println(emp1.getSalary() + " " + emp2.getSalary()); 

 } 

}

Choose the most appropriate option. 

Select one:

a. 0.0 10000.0

b. 20000.0 10000.0 

c. 10000.0 10000.0

d. Compilation error at Line-1: Cannot 'emp.salary' in a static context

The correct answer is: 20000.0 10000.0

What will be the output of the following Java code?

public class ApplicationTester 

 public static void main(String[] args)

 { 

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

 { 

 if(i>6)

 break;

 }

 System.out.println(i); //Line-1 

 } 

}

Choose most appropriate option. 

Select one:

a. 6

b. null

c. 5

d. Compilation error at Line-1: i cannot be resolved to a variable 

The correct answer is: Compilation error at Line-1: i cannot be resolved to a variable

What will be the output of the following Java code?

public class Account 

 public void deposite(int amount)

 { 

 System.out.println("Account deposited with: " + amount); 

 sai Sampath Ghantasala .

Question

37

Correct

Mark 1 out of 1

Question

38

Incorrect

Mark 0 out of 1

Question

39

Incorrect

 }

 public void transaction()

 {

 this.deposite(100); 

 } 

}

public class SavingsAccount extends Account

{

public void deposite(int amount)

System.out.println("Savings Account deposited with: " + amount); 

public class ApplicationTester 

 public static void main(String[] args)

 { 

 Account account = new SavingsAccount();

 account.transaction();

 }

}

Choose the most appropriate option. 

Select one:

a. Account deposited with: 100

b. Savings Account deposited with: 100 

c. Savings Account deposited with: 0

d. Account deposited with: 0

The correct answer is: Savings Account deposited with: 100

which of the following is block level html tags?

Select one:

a. <b>

b. <i>

c. <h6> 

d. <a>

Your answer is correct.

The correct answer is: <h6>

'link', 'vlink' and 'alink' are attributes of which HTML tag?

Choose the most appropriate option.

Select one:

a. <img>

b. <body>

c. <head>

d. <a> 

Your answer is incorrect.

The correct answer is: <body>

Assume abc.html is existing and a valid HTML page. Refer the code below:

<form action="abc.html">

First Name: <input type="text"/><br/>

 sai Sampath Ghantasala .

Incorrect

Mark 0 out of 1

Question

40

Correct

Mark 1 out of 1

Question

41

Correct

Mark 1 out of 1

Question

42

Correct

Mark 1 out of 1

st a e: put type te t b

 Last Name: <input type="text"/><br/>

 Password: <input type="hidden"/><br/> 

<input type="submit" value="Submit"/> 

<form>

How many HTML controls will be displayed on the browser, when the above page is run on browser? Choose most appropriate

option

Select one:

a. 5

b. 4 

c. 7

d. 3

The correct answer is: 3

Johana wants to display "Welcome to JS!!" as a pop up message using JavaScript. Which of the following suits her

requirement?

Select one:

a. alertmsg("Welcome to JS!!");

b. alert("Welcome to JS!!"); 

c. alert(Welcome to JS!!);

d. alertBox("Welcome to JS!!");

The correct answer is: alert("Welcome to JS!!");

In HTML, Which of the following is used to merge columns in a table? Choose most appropriate option.

Select one:

a. columnspan

b. columns-span

c. colspan 

d. cspan

The correct answer is: colspan

What would be the Output of the below java script Code?

<html> <body>

<script>

 var x = 5; var d = (x != "5"); 

document.write(d +"--"); 

d = (x === "5"); document.write(d); 

</script> </body>

</html>

Choose most appropriate option.

Select one:

a. true--false

b. false--true

c. false--false 

d. true--true

The correct answer is: false--false

 sai Sampath Ghantasala .

Question

43

Correct

Mark 1 out of 1

Question

44

Correct

Mark 1 out of 1

Question

45

Correct

Mark 1 out of 1

Identify the CORRECT statements with respect to CSS.

a) CSS is used for giving style for HTML content

b) External style sheet can be used only for one HTML page in a website

Choose most appropriate option.

Select one:

a. both a and b

b. only b

c. only a 

d. neither a nor b

The correct answer is: only a

<!DOCTYPE html>

 <html>

 <body> 

 <script> 

 var x = (3 + 3) + 4 + "6"; alert(x);//line 1 

 </script>

 </body> 

</html>

What will be printed in alert box in line 1? Choose most appropriate option.

Select one:

a. 646

b. 3346

c. 16

d. 106 

The correct answer is: 106

Identify the CORRECT HTML code to define the state of the hyperlink. The requirement is to display the hyperlink "Click" in RED

color if user has already visited "https://portal.accenture.com". Choose most appropriate option.

Select one:

a. <html> 

<body link="red" > 

<a href="https://portal.accenture.com/"> Click </a> 

</body> 

</html>

b. <html> 

 <body vlink="red" > 

<a href="https://portal.accenture.com/">Click </a> 

 </body>

 </html> 

c. <html> 

 <body> 

 <a href="https://portal.accenture.com/" vlink="red"> Click </a> 

 </body> 

 </html>

d. <html>

 <body> 

 <a href="https://portal.accenture.com/" link="red"> Click </a>

 </body> 

 </html>

 sai Sampath Ghantasala .

Question

46

Correct

Mark 1 out of 1

Question

47

Correct

Mark 1 out of 1

Question

48

Not answered

Marked out of 1

The correct answer is: <html> 

 <body vlink="red" > 

<a href="https://portal.accenture.com/">Click </a> 

 </body>

 </html>

Refer the code below:

<table border="2">

 <tr> <th colspan="3"> Employee Details</th></tr>

 <tr> <th>Employee Name</th> <th>Department</th> </tr> 

 <tr> <td>Jack</td> <td>LKM</td> </tr> 

 <tr> <td>Ace</td><td rowspan="2">Delivery</td> </tr> 

 <tr> <td>Justin</td> </tr>

 </table> 

How many cells will be displayed when the page is displayed on the browser? Choose most appropriate option.

Select one:

a. 9

b. 8 

c. 7

d. 10

The correct answer is: 8

Which of the following is not a method of document object? Choose most appropriate option.

Select one:

a. getElementById(String)

b. print(String) 

c. write(String)

d. getElementByTagName(String)

The correct answer is: print(String)

Consider the HTML code given below.

<html>

  <head>

    <script>

      var key=10;

      function add(){

        var key=20;

        window.key=key+1;

        document.write(key);

        document.write(" ");

        print();

      }

      function print(){

        document.write(key);

      }

    </script>

  </head>

  <body>

 sai Sampath Ghantasala .

Question

49

Correct

Mark 1 out of 1

Question

50

Not answered

Marked out of 1

    <form>

      <input type="submit" onclick="add()" />

    </form>

  </body>

</html>

What will be displayed after executing the above code?

Choose the most appropriate option.

Select one:

a. 20 21

b. 11 10

c. 11 11

d. 21 21

Your answer is incorrect.

The correct answer is: 20 21

How many cells will be created after executing the below HTML code?

<html>

<body>

<table border="1">

<tr> <td colspan="3"> Jack </td> </tr>

<tr> <td colspan="2"> Tom </td> <td> Mark </td> </tr>

<tr> <td rowspan="2"> John</td> <td> James</td> <td>Mary</td> </tr>

<tr> <td> Helen</td> <td> Sam </td>  </tr>

</table>

</body>

</html>

Select one:

a. 8 

b. 10

c. 7

d. 9

Your answer is correct.

The correct answer is: 8

Consider the javascript code given below. What would be the print values from line 1 and line 2 on execution?

<html> 

   <body> 

     <p id="id1"></p><!-- line 1--> 

     <p id="id2"></p><!-- line 2-->

     <script>

       var y=10; 

       myFunction();

       document.getElementById("id1").innerHTML = y; 

       document.getElementById("id2").innerHTML = window.y;

 sai Sampath Ghantasala .

       function myFunction() {

         y=20; 

         y=y+window.y

       } 

     </script>

   </body> 

</html>

Choose the most appropriate option.

Select one:

a. 10 30

b. 40 40

c. 10 10

d. 10 40

Your answer is incorrect.

The correct answer is: 40 40

 sai Sampath Ghantasala .

11/29/2019 Quiz

https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=2297664&showall=1 1/55

Avengers Mock 3 MCQ / MCQ / Quiz

Started on

Friday, 22 November 2019, 2:00 PM

State

Finished

Completed on

Friday, 22 November 2019, 3:10 PM

Time taken

1 hour 10 mins

Grade

30.50 out of 50.00 (61%)

Question 1

Correct

Mark 1.00 out of

1.00

What is the approach of OO ?

Select one:

The correct answer is: bundle data and method

a. bundle data only for security

b. bundle method seperated from data

c. bundle data seperated from method

d. bundle data and method

11/29/2019 Quiz

https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=2297664&showall=1 2/55

Question 2

Correct

Mark 1.00 out of

1.00

How do we change the state of an object ?

Select one:

The correct answer is: Using object's behavior

a. Using object's behavior

b. Using object's property

c. Using Object's default methods

d. Using class name

11/29/2019 Quiz

https://accenturelearning.tekstac.com/mod/quiz/review.php?attempt=2297664&showall=1 3/55

Question 3

Correct

Mark 1.00 out of

1.00

Select the bene

No comments:

Post a Comment