0% found this document useful (0 votes)
248 views48 pages

Fundamentals Mock 2 - 1548950645533

The document provides details of a question-wise test on SQL queries and database concepts. It includes 7 multiple choice questions with explanations and answer options on topics like SQL joins, cloud computing types, agile development principles, cyber safety best practices, minimum budget queries, loading default text in HTML forms, and sorting SQL query results.

Uploaded by

Revati Raut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
248 views48 pages

Fundamentals Mock 2 - 1548950645533

The document provides details of a question-wise test on SQL queries and database concepts. It includes 7 multiple choice questions with explanations and answer options on topics like SQL joins, cloud computing types, agile development principles, cyber safety best practices, minimum budget queries, loading default text in HTML forms, and sorting SQL query results.

Uploaded by

Revati Raut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Shout4Education

Question-wise Details

Section #1

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

Consider the below tables.

Actor(actorId,actorName) - actorId is primary key

n
tio
Event(eventId,eventName) - eventId is primary key

ca
Registration(registrationId,actorId,eventId) - actorId and eventId are foreign keys
du
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.
4E
o ut
Sh

Shout4Education
2 / 49
Shout4Education
Options Response Answer

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 CROSS JOIN


Registration r

n
ON a.actorid=r.actorid;

tio
SELECT

ca
a.actorId,a.actorName,r.eventId

FROM Actor a LEFT OUTER JOIN


du
Registration r

ON a.actorid=r.actorid;
4E

SELECT
a.actorId,a.actorName,r.eventId
ut

FROM Actor a INNER JOIN


o

Registration r
Sh

ON a.actorid=r.actorid;

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

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.

Shout4Education
3 / 49
Shout4Education
Options Response Answer

Neither (1) Nor (2)

Both (1) and (2)

Only (2)

Only (1)

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

Which of the following options are the characteristics of Agile development?

n
tio
(a) It delivers functional bits of the application as soon as they are ready
(b) It helps teams respond to unpredictability through incremental, iterative work

ca
Choose the most appropriate option.

Options Response Answer


du
Both (a) and (b)
4E

Neither (a) Nor (b)

Only (a)
ut

Only (b)
o
Sh

Question 4: Time: 18 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

Shout4Education
4 / 49
Shout4Education
Options Response Answer

Only (ii)

Both (i) and (ii)

Both (i) and (iii)

Both (ii) and (iii)

Only (iii)

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

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

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

ca
in each project type?
du
4E
o ut
Sh

Shout4Education
5 / 49
Shout4Education
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,

n
p1.projectType,p1.budget FROM
project p1

tio
WHERE p1.budget IN(

ca
SELECT MIN(p2.budget) FROM
project p2
du
WHERE p1.budget=p2.budget);
4E

SELECT p1.projectId,
p1.projectType,p1.budget FROM
ut

project p1
o

WHERE MIN(p1.budget)IN(
Sh

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);

Shout4Education
6 / 49
Shout4Education

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

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?

Options Response Answer

<html>

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

</html>

<html>

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

tio
</html>

ca
<html> du
<input type="text" id="Hello"/>

</html>
4E

<html>
ut

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


o

</html>
Sh

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

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.

Shout4Education
7 / 49
Shout4Education
Options Response Answer

SELECT StudentId, StudentName,


Email, PercentageOfmarks

FROM Student ORDER BY


StudentName, PercentageOfMarks
DESC;

SELECT StudentId, StudentName,


Email, PercentageOfmarks

FROM Student ORDER BY

n
PercentageOfMarks DESC,
StudentName;

tio
SELECT StudentId, StudentName,

ca
Email, PercentageOfMarks
du
FROM Student ORDER BY
PercentageOfMarks DESC,
StudentName DESC;
4E

SELECT StudentId, StudentName,


Email, PercentageOfmarks
o ut

FROM Student ORDER BY


Sh

PercentageOfMarks, StudentName;

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

Shout4Education
8 / 49
Shout4Education
Consider the tables given below.

Customer(customerId,customerName)

Account(accountId, accountType, customerId)

Transaction(transactionId, accountId, transactionType, amount)

Which is the CORRECT SQL statement to retrieve customer Id and customer name of all customers who has made transaction
in their account?

n
tio
ca
du
4E
o ut
Sh

Shout4Education
9 / 49
Shout4Education
Options Response Answer

SELECT DISTINCT c.customerid,


c.customername

FROM customer c INNER JOIN


transaction t

INNER JOIN account a ON


t.accountid=a.accountid and

c.customerid=a.customerid;

SELECT DISTINCT c.customerid,


c.customername

n
FROM customer c INNER JOIN

tio
account a ON
c.customerid=a.customerid

ca
INNER JOIN transaction t ON
t.accountid=a.accountid;
du
SELECT DISTINCT c.customerid,
c.customername
4E

FROM customer c INNER JOIN


ut

account a
o

INNER JOIN transaction t ON


t.accountid=a.accountid and
Sh

a.customerid=c.customerid;

SELECT DISTINCT c.customerid,


c.customername

FROM customer c SELF JOIN account


a ON c.customerid=a.customerid

SELF JOIN transaction t ON


t.accountid=a.accountid;

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

Shout4Education
10 / 49
Shout4Education
What will be the outout of the following Java code?

public class StringTester{


public static void main(String[] args){
String company=new String("Accenture");
company+= " Services Limited";
System.out.println(company);
}
}

Choose the most appropriate option.

Options Response Answer

Accenture Services Limited

n
Services Limited

tio
Accenture

ca
Compilation fails as '+' operator connot
be used for String
du
4E

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


ut

Assume that table Customer has the following records.


o


Sh

CUSTOMERID CUSTOMERNAME

10 James
11 ami
12 JAMES

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

SELECT customername FROM customer WHERE customername LIKE '_am%';

Shout4Education
11 / 49
Shout4Education
Options Response Answer

James

JAMES

James

ami

James

ami

JAMES

n
James

tio
ca
Question 11: du Time: 3 Min 44 Sec Marks: 1/ 1

What will be the output of the following Java code?


4E

public class OverloadTester{


public static void main(String[] args) {
new OverloadSample().calculate(10, 20);
ut

}
o

public void calculate(int num1, int num2) {


Sh

System.out.println("Inside calculate integer");


}

public void calculate(long num1, long num2) {


System.out.println("Inside calculate long");
}

public void calculate(float num1, float num2) {


System.out.println("Inside calculate float");
}
}

Choose the most appropriate option.

Shout4Education
12 / 49
Shout4Education
Options Response Answer

Inside calculate long

Inside calculate float

Compilation Error: Ambiguous call to


calculate() method in type
OverloadTester

Inside calculate integer

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

n
tio
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'

ca
and 'SALE' separately.
du
4E
o ut
Sh

Shout4Education
13 / 49
Shout4Education
Options Response Answer

SELECT
projectType,COUNT(projectId)

FROM project

GROUP BY projectId

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

SELECT
projectType,COUNT(projectId)

FROM project

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

tio
SELECT

ca
projectType,COUNT(projectId)

FROM project
du
WHERE projectType IN('FIN','SALE')
4E

GROUP BY projectId;

SELECT
ut

projectType,COUNT(projectId)
o

FROM project
Sh

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

GROUP BY projectType;

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

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

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

Shout4Education
14 / 49
Shout4Education
Options Response Answer

SELECT jobBand DISTINCT from


Employee;

SELECT DISTINCT jobBand,empId


from Employee;

SELECT jobBand from Employee


DISTINCT;

SELECT DISTINCT jobBand from


Employee;

n
Question 14: Time: 1 Min 11 Sec Marks: 1/ 1

tio
What will be the output of the following Java code?

ca
public class ApplicationTester {
public static void main(String[] args) {
du
char letterArray[]={'a','A','h','h','m','m'};
for(int index=0;index<letterArray.length;index++){
4E

if(letterArray[index] == letterArray[index+1]){
break;
}
ut

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


}
o

}
Sh

Choose the most appropriate option.

Options Response Answer

0 1 2

0 1 2 3

0 1 2 3 4

0 1

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

Shout4Education
15 / 49
Shout4Education

Consider the HTML code given below.

<html>

<head>

<style>

h2{

color:green;

n
}

tio
span{

ca
color:blue;

}
du
</style>
4E

</head>
ut

<body>
o

<h2>Accenture <span> Bangalore</span> India</h2>


Sh

</body>

</html>

While displaying output on the browser what will be the color of each word of the text "Accenture Bangalore India"?

Shout4Education
16 / 49
Shout4Education
Options Response Answer

Accenture - Green

Bangalore - Green

India - Blue

Accenture - Green

Bangalore - Blue

India - Green

Accenture - Green

n
Bangalore - Blue

tio
India - Blue

ca
Accenture - Green du
Bangalore - Green

India - Green
4E
ut

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


o
Sh

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

Both (1) and (2)

Only (2)

Neither (1) Nor (2)

Only (1)

Shout4Education
17 / 49
Shout4Education

Question 17: Time: 56 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;

n
StaticTester staticTester = new StaticTester();
System.out.println("Count is " +staticTester.count);

tio
}
}

ca
Choose the most appropriate option.
du
Options Response Answer

Count is 5
4E

Count is 1
ut

Count is 0
o

Count is 6
Sh

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

Shout4Education
18 / 49
Shout4Education
What will be the output of the following Java code? Assume that all classes are present in the same package.

class Account {
int balance;
public void createAccount() {
System.out.println("Account created");
balance = 500;
}
}
class SavingsAccount extends Account {
public void createAccount() {
System.out.println("Savings account created");
balance = 1000;
}
}

n
public class ApplicationTester{

tio
public static void main(String[] args) {
Account account = new SavingsAccount();
account.createAccount();

ca
System.out.println("Balance: "+account.balance);
}
}
du
Choose the most appropriate option.
4E

Options Response Answer


ut

Account created
Balance: null
o

Compilation Error: The field


Sh

Account.balance is not visible

Account created
Balance: 500

Savings account created


Balance: 1000

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

Shout4Education
19 / 49
Shout4Education
Which of the following is/are TRUE with respect to Grey Box Testing?

(a) Testing is based on the requirements and specifications of the system internals
(b) Testing does not check the code or internal structure
(c) Testing monitors an application to check if its behavior matches with the valid input

Choose the most appropriate option.

Options Response Answer

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

Only (a) is TRUE

Both (b) and (c ) are TRUE

n
Both (a) and (b) are TRUE

tio
ca
Question 20: Time: 45 Sec Marks: 1/ 1
du
Refer the class declarations given below:
4E

class A{ }

class B extends A{ }
ut

class C extends B{ }
o

class D extends C{ }
Sh

Identify the INCORRECT statement.

Choose the most appropriate option.

Options Response Answer

B b=new D();

C c=new C();

A a = new D();

C c=new B();

Shout4Education
20 / 49
Shout4Education
Question 21: 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) {
boolean b1=true;
boolean b2=true;
boolean b3=false;

if((b1==b2)||(b3==true)){
System.out.println("inside if");
System.out.println(b1+","+b2+","+b3);
}

tio
}
}

ca
Choose the most appropriate option. du
Options Response Answer

inside if
4E

inside if
true,true,false
ut

true,true,false
o

inside if
Sh

true,true,true

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

Shout4Education
21 / 49
Shout4Education
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;

n
//Line1

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

ca
Choose a valid Constructor implementation to be inserted at Line1 to make the above code compile successfully
du
Choose the most appropriate option.
4E
o ut
Sh

Shout4Education
22 / 49
Shout4Education
Options Response Answer

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

n
}

tio
public void Car(int vehicleId, String
vehicleName, String carModel,double

ca
average) {
super(vehicleId, vehicleName);
//Java code to initialize carModel and
du
average
}
4E

public Car(int vehicleId, String


vehicleName, String carModel,double
average) {
ut

//Java code to initialize carModel and


average
o

super(vehicleId, vehicleName);
Sh

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

Which of the following statement(s) are TRUE regarding Java architecture?

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


(ii) JVM is platform independent

Choose the most appropriate option.

Shout4Education
23 / 49
Shout4Education
Options Response Answer

Only (i) is TRUE

Both (i) and (ii) are TRUE

Neither (i) Nor (ii) are TRUE

Only (ii) is TRUE

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

What are the benifits of ADM?

n
tio
(1) Project standardization and customization
(2) Common project management framework

ca
Choose the most appropriate option.

Options Response Answer


du
Both (1) and (2)
4E

Only (1)

Only (2)
ut

Neither (1) Nor (2)


o
Sh

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

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

Shout4Education
24 / 49
Shout4Education
Options Response Answer

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

n
Question 26: Time: 1 Min 30 Sec Marks: 1/ 1

tio
Consider the following Java code snippet.

ca
String str1 = new String("Accenture");
String str2 = str1;
du
String str3 = new String("LKM");
String str4 = str3;
4E

str1 = null;
str4 = null;
str3 = str4;
ut

From the above code, identify how many object(s) are eligible for garbage collection.
o
Sh

Choose the most appropriate option.

Options Response Answer

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

Shout4Education
25 / 49
Shout4Education
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) - (3) - (4)

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

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

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

tio
ca
Question 28: Time: 1 Min 27 Sec Marks: 1/ 1
du
4E
o ut
Sh

Shout4Education
26 / 49
Shout4Education
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

n
tio
public class MyClass implements MyInterface1, MyInterface2{
public void method1(){
System.out.print ("1 ");

ca
}
void method2(){
System.out.print ("2");
du
}
}
4E

InterfaceTester.java
ut

public class InterfaceTester {


public static void main(String[] args){
o

MyClass reference = new MyClass();


Sh

reference.method1();
reference.method2();
}
}

Choose the most appropriate option.

Shout4Education
27 / 49
Shout4Education
Options Response Answer

1 2

Compilation error: Cannot reduce the


visibility of the inherited method from
MyInterface2

Compilation error: method2 in


MyInterface2 must be defined with
public access specifier

Compilation error: MyClass cannot


implement more than one interface

n
tio
Question 29: Time: 15 Sec Marks: 1/ 1

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

4E
ut

EVENTID EVENTNAME STAGENUMBER

E1 Drama
o

E2 Dance 2
Sh

E3 Speech 1

Shout4Education
28 / 49
Shout4Education
Options Response Answer

SELECT * FROM Event WHERE


StageNumber != NULL

SELECT * FROM Event WHERE


StageNumber IS NOT EQUAL TO
NULL;

SELECT * FROM Event WHERE


StageNumber <> NULL

SELECT * FROM Event WHERE


StageNumber IS NOT NULL

n
tio
Question 30: Time: 31 Sec Marks: 1/ 1

ca
Which of the following is/are DevOps Principle?

(1) Continuous improvement


du
(2) Test early and often
4E

Choose the most appropriate option.

Options Response Answer


ut

Neither (1) Nor (2)


o

Both (1) and (2)


Sh

Only (2)

Only (1)

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

Shout4Education
29 / 49
Shout4Education
Refer the code given below:

class Employee{

public void printDetails(){

Printer printer = new Printer();

printer.print("Test Print");

n
tio
class Printer{

ca
public void print(String str){
du
System.out.println("Priting Details: "+str);
4E

}
o ut
Sh

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

Aggregation

Composition

Generalization

Specialization

Shout4Education
30 / 49
Shout4Education
Question 32: Time: 1 Min 6 Sec Marks: 1/ 1

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

n
tio
referencing AccountNumber in Account table.

ca
du
Which is the CORRECT query to display AccountNumber and balance of accounts on which NO transaction was done after '31-
Dec-2015';
4E

Options Response Answer

SELECT AccountNumber,Balance
ut

FROM Account
o
Sh

WHERE AccountNumber NOT IN

(SELECT AccountNumber FROM


Transaction

WHERE DateOfTransaction = '31-Dec-


2015');

Shout4Education
31 / 49
Shout4Education
SELECT AccountNumber,Balance
FROM Account

WHERE AccountNumber IN

(SELECT AccountNumber FROM


Transaction

WHERE DateOfTransaction > '31-Dec-


2015');

SELECT AccountNumber,Balance
FROM Account

n
tio
WHERE AccountNumber NOT IN

ca
(SELECT AccountNumber FROM
Transaction);
du
SELECT AccountNumber,Balance
FROM Account
4E

WHERE AccountNumber NOT IN


ut

(SELECT AccountNumber FROM


o

Transaction
Sh

WHERE DateOfTransaction > '31-Dec-


2015');

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

Shout4Education
32 / 49
Shout4Education
What will be the output of the following Java code?
Note: Parent class is present in a package called 'packageone'. The Child class and TestPackage class are present in a
package called 'packagetwo'

Parent.java
package packageone;
public class Parent {
protected void display(){
System.out.println("Hello! its from package one");
}
}

Child.java (Assume that necessary packages are imported)


package packagetwo;
public class Child extends Parent {

n
public void display(){ //Line 1

tio
System.out.println("Hello! its from package two");
}
}

ca
TestPackage.java (Assume that necessary packages are imported)
package packagetwo;
du
public class TestPackage {
public static void main(String[] args) {
4E

Parent p = new Parent();


Child c = new Child();
p.display(); // Line 2
ut

c.display(); // Line 3
}
o

}
Sh

Choose the most appropriate option.

Shout4Education
33 / 49
Shout4Education
Options Response Answer

Compilation error at Line 1 : Cannot


widen the visibility of the inherited
method

It prints only : Hello! its from package


two

It prints both : Hello! its from package


one
Hello! its from package two

Compilation error at Line 2 : The


method display() from the type Parent
is not visible

n
tio
Question 34: Time: 1 Min 16 Sec

ca
Marks: 1/ 1

What will be the output of the following Java code?


du
interface A{
4E

void display(); // Line X


}
ut

class B implements A{
void display(){ // Line Y
o

System.out.println("B");
Sh

}
}
public class Demo{
public static void main(String[] args) {
A a=new B(); // Line Z
a.display();
}
}

Choose the most appropriate option.

Shout4Education
34 / 49
Shout4Education
Options Response Answer

Compilation error at Line X: missing


‘abstract’ keyword

Compilation error at Line Y: cannot


reduce the visibility of the method

Compilation error at Line Z: Invalid


reference type

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

n
tio
Assume that table Employee has following records.

ca

EMPID EMPNAME MANAGERID
du
1001 James NULL
1002 Mark 1001
4E

1003 Mary 1002


1004 Mark NULL
o ut
Sh

How many rows will be deleted after executing the below DML statement.

DELETE FROM employee WHERE managerid=NULL;

Shout4Education
35 / 49
Shout4Education
Options Response Answer

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

Refer the HTML code given below.

n
tio
<html>

ca
<body>
du
<table border="1">
4E

<tr> <th colspan="2"> Customer Details </th><th>Regular</th>

<tr> <th>cid</th> <th>cname</th> <th>phone</th> </tr>


ut

<tr> <td>100</td> <td>Jack</td> <td>5655765</td> </tr>


o
Sh

<tr> <td>101</td> <td>John</td> <td rowspan="2">8989092</td> </tr>

<tr> <td>102</td> <td>James</td> </tr>

</table>

</body>

</html>

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

Shout4Education
36 / 49
Shout4Education
Options Response Answer

10

11

14

13

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

n
tio
ca
du
4E
ut
o
Sh

Shout4Education
37 / 49
Shout4Education
Refer the JavaScript code given below.

<html>

<head>

<script>

function aFun(){

var num1=111;

n
tio
var num2="111";

alert(num1==num2) //Line1

ca
alert(num1===num2) //Line2
du
}
4E

</script>
ut

</head>
o

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

</html>

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

Shout4Education
38 / 49
Shout4Education
Options Response Answer

JavaScript will show a compilation error


as "===" is not defined

Output from Line1: true, Output from


Line2: false

Output from Line1: false, Output from


Line2: true

Output from Line1: true, Output from


Line2: true

n
Question 38: Time: 58 Sec Marks: 1/ 1

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

ca
public class Tester{
public static void main(String[] args){
du
for(int i=0; i < 5; i++){
if(i > 2){
4E

continue;
}
System.out.print(" 1 ");
ut

}
}
o

}
Sh

Choose the most appropriate option.

Options Response Answer

5 times

2 times

3 times

6 times

Question 39: Time: 1 Min 6 Sec Marks: 1/ 1

Shout4Education
39 / 49
Shout4Education
Which of the following statement/s is/are VALID array decleration in JavaScript?

(1) var mixed=['ABCD',1234,12.3,"Value","1"]

(2) var arrayVar=[1,2,3,4]

(3) var arrayVar={1,2,3,4}

Options Response Answer

Both (1) and (2)

Both (2) and (3)

n
Only (1)

tio
All (1), (2) and (3)

ca
Question 40:
du Time: 20 Sec Marks: 1/ 1
4E

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

a. Method name should be the same


ut

b. Return type of the methods should be the same


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

Choose the most appropriate option.


Sh

Options Response Answer

Both (a) and (c ) are TRUE

Only (a) is TRUE

Both (b) and (c ) are TRUE

Both (a) and (b) are TRUE

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

Shout4Education
40 / 49
Shout4Education
What will be the output of the following Java code?

Bank.java
public abstract class Bank {
private String bankName;

public Bank(String bankName){
this.bankName = bankName;
}
public abstract void createAccount();

public String getBankName(){
return bankName;
}
}

n
tio
FriendlyBank.java

ca
public class FriendlyBank extends Bank {
public FriendlyBank (String bankName){
super(bankName);
du
}
public void createAccount(){
4E

System.out.println("Friendly Bank Account");


}
}
ut

AbstractClassTester.java
o
Sh

public class AbstractClassTester {


public static void main(String[] args){
Bank bank = new FriendlyBank("Friendly Bank");
System.out.print(bank.getBankName() + " ");
bank.createAccount();
}
}

Choose the most appropriate option.

Shout4Education
41 / 49
Shout4Education
Options Response Answer

Compilation error: Cannot use


reference ‘bank’ of abstract type

Friendly Bank Friendly Bank Account

null Friendly Bank Account

Compilation error: Abstract class Bank


cannot have constructor

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

n
tio
What will be the output of the following Java code?

class MyClass{

ca
public static void main(String args[]) {
int value = 10;
do{
du
System.out.print( value );
value++;
4E

System.out.print("\n");
}while( value < 20 );
System.out.println(value);
ut

}
}
o
Sh

Choose the most appropriate option.

Options Response Answer

Prints value from 11 to 19 within the


loop and 20 out side the loop

Prints value from 10 to 19 within the


loop and 20 out side the loop

Prints value 10 within the loop and 11


out side the loop

Prints value from 10 to 19 within the


loop and 19 out side the loop

Shout4Education
42 / 49
Shout4Education
Question 43: Time: 3 Min 29 Sec Marks: 1/ 1

What will be the output of the following Java code?

Employee.java

public class Employee {


private int employeeId;
private String employeeName;

public Employee(){
this.employeeName = null;
this.employeeId = 0;
System.out.println("Employee Constructor");

n
}
}

tio
ArrayOfObjectsTester.java

ca
public class ArrayOfObjectsTester {
public static void main(String[] args){
du
Employee[] employee = new Employee[3]; //Line-1
}
4E

Choose the most appropriate option.


ut

Options Response Answer


o

Employee Constructor will be displayed


Sh

once

Employee Constructor will be displayed


3 times

Program will display nothing

Compilation error at Line-1: Invalid


array declaration

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

Shout4Education
43 / 49
Shout4Education
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));

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

ca
a) INSERT INTO Event VALUES('E1','Dance',NULL,2);
du
b) INSERT INTO Event VALUES('E1','Speech',1);
4E

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


ut

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


o

Options Response Answer


Sh

a and b

a and d

b and c

a and c

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

Shout4Education
44 / 49
Shout4Education
Refer the code given below:

public class ApplicationTester{


public static void main(String[] args){
Employee emp = new Employee();
}
}

Assume that class Employee is a valid Java class having instance variables as (employeeId of type integer and employeeName
of type String).

Choose from below a VALID option.

Options Response Answer

n
emp reference variable is created on

tio
stack and employeeId and
employeeName are created on heap

ca
emp is created on heap along with
employeeId and employeeName
du
emp reference variable is created on
heap and employeeId and
4E

employeeName are created on stack

As emp is local to main method all


ut

emp, employeeId and employeeName


are created on stack
o
Sh

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

Shout4Education
45 / 49
Shout4Education
Refer the Incomplete JavaScript code given below:

<script>

var gVar='This is global value';

function aFun(){

var gVar='Local Data1';

//Line1

n
tio
</script>

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

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

Options Response Answer

alert(global.gVar)
ut

alert(document.gVar)
o

alert(window.gVar)
Sh

alert(gVar)

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

Shout4Education
46 / 49
Shout4Education
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 ");
}
}
}

n
tio
Choose the most appropriate option.

Options Response Answer

ca
Program will display “Twenty Ten
Zero”
du
Program will display “Twenty Ten”
4E

Program will display “Ten Zero”

Program will display “Twenty”


o ut
Sh

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

Shout4Education
47 / 49
Shout4Education
What will be the output of the following Java code?

1 package mypackage1;
2
3 public class Parent {
4 Parent(){
5 System.out.print("1 ");
6 }
7 }
8
9 package mypackage2;
10 import mypackage1.Parent;
11

n
12 public class Child extends Parent{
13 Child(){

tio
14 System.out.println("2");
15 }
16 }
17

ca
18 package mypackage2;
19
20 public class ApplicationTester{
21 public static void main(String[] args){
du
22 Child child = new Child();
23 }
24 }
25
4E
ut

Options Response Answer


o

2 1
Sh

Compilation error at Line 13: Implicit


super constructor Parent() is not
visible. Must explicitly invoke another
constructor

1 2

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

Which is the CORRECT ALTER statement to rename the table "Customer" to "Customer_Details".

Shout4Education
48 / 49
Shout4Education
Options Response Answer

ALTER TABLE Customer RENAME to


Customer_Details;

ALTER TABLE Customer to


Customer_Details;

ALTER Customer RENAME to


Customer_Details;

ALTER TABLE RENAME Customer to


Customer_Details;

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

tio
Refer the below incomplete HTML code.

ca
<a href="abc.lkm@accenture.com" target = "-------"> Click </a>
Assume that “abc.lkm@accenture.com” is a valid site. Choose the appropriate value for the target attribute to open the web
page in a new window.
du
Options Response Answer
4E

_top

_self
ut

_parent
o
Sh

_blank

Shout4Education
49 / 49

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy