0% found this document useful (0 votes)
3 views70 pages

SQL Questions

The document contains a collection of 167 unique SQL questions and answers, covering various SQL concepts and commands. Each question presents a scenario or requirement, followed by multiple-choice options, with the correct answer indicated for each. Topics include SQL queries, table modifications, subqueries, data types, and relationships between classes.
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)
3 views70 pages

SQL Questions

The document contains a collection of 167 unique SQL questions and answers, covering various SQL concepts and commands. Each question presents a scenario or requirement, followed by multiple-choice options, with the correct answer indicated for each. Topics include SQL queries, table modifications, subqueries, data types, and relationships between classes.
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

SQL Questions

Extracted from All-in-One Mock Quiz

Total: 167 unique SQL questions

Q2.
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.
a. SELECT EmployeeName FROM Employee WHERE EmployeeName = 'A_e';
b. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE 'A%e';
c. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE 'A_e'; ■
d. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE '__e';
The correct answer is: SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE
'A_e';

Q3.
Which is the CORRECT SQL statement to add the new column "DateOfJoining" to an existing table
"Employee"? Choose most
appropriate option.
a. ALTER TABLE Employee MODIFY DateOfJoining DATE;
b. CREATE TABLE Employee ADD 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;

Q4.
Which of the following statement(s) is/are TRUE?
(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
(i) In a non-correlated(independent) subquery, the subquery is always executed only once.
a. Only (ii)
b. Both (i) and (ii)
c. Only (i) ■
d. Neither (i) nor (ii)
The correct answer is: Only (i)

Q5.
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.
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');

Q6.
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.
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=unitprice*0.1 from Item order by discount;
d. select itemId, discount from Item order by discount;
The correct answer is: select itemId, unitprice*0.1 as discount from Item order by discount;

Q7.
Which of the following SQL commands is used to remove table "EMPLOYEE" present in the database?
Choose most
appropriate option.
a. TRUNCATE TABLE EMPLOYEE;
b. REMOVE TABLE EMPLOYEE;
c. DELETE TABLE EMPLOYEE;
d. DROP TABLE EMPLOYEE; ■
The correct answer is: DROP TABLE EMPLOYEE;

Q8.
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.
a. INSERT INTO project VALUES('P1');
b. INSERT INTO project(projectName,projectId) VALUES('NA','P4' ); ■
c. INSERT INTO project(projectId,projectName) VALUES('P3', Null);
d. INSERT INTO project(projectId) VALUES('P2'); ■
The correct answers are: INSERT INTO project(projectName,projectId) VALUES('NA','P4' );, INSERT
INTO project(projectId)

VALUES('P2');

Q9.
Which of the following SQL query will not be executed successfully? Assume all the column names and
table name given here
are correct. Choose the most appropriate option.
a. SELECT deptno,ename FROM emp WHERE empno > 100 group by ename,deptno;
b. SELECT deptno FROM emp GROUP BY deptno,job;
c. SELECT ename FROM emp ORDER by ename,job GROUP BY ename; ■
The correct answer is: SELECT ename FROM emp ORDER by ename,job GROUP BY ename;

Q10.
Which of the following statement(s) is/are TRUE?
(i) In a correlated subquery, the subquery is always executed only once.
(ii) In a correlated subquery, the inner query (sub query) references the column from the outer query (main
query).
Choose most appropriate option.
a. Both (i) and (ii) ■
b. Only (i)
c. Only (ii)
d. Neither (i) nor (ii)
The correct answer is: Only (ii)

Q11.
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.
a. a and c
b. a and b
c. a only
d. b and c ■
The correct answer is: b and c

Q12.
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.
a. SELECT TO_DATE(Start_date,'MON, DD-YYYY') FROM Projects;
b. SELECT TO_DATE(Start_date,'MMM, DD-YYYY') FROM Projects;
c. SELECT TO_CHAR(Start_date,'MON, DD-YYYY') FROM Projects; ■
d. SELECT TO_CHAR(Start_date,'MMM, DD-YYYY') FROM Projects;
The correct answer is: SELECT TO_CHAR(Start_date,'MON, DD-YYYY') FROM Projects;

Q13.
Consider Project table given below.
PROJECTID EMPLOYEEID
--------------- ------------------1
10
2
11
1
13
Identify the correct SQL statement to display the projectId which has more than one employee.
a. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project
GROUP BY projectid
HAVING COUNT(employeeId)>1); ■
b. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project
HAVING
COUNT(employeeId)>1);
c. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project
WHERE
COUNT(employeeId)>1);
d. SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT projectid FROM project
GROUP BY projectid
WHERE COUNT(employeeId)>1);
The correct answer is: SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT
projectid FROM project GROUP

BY projectid HAVING COUNT(employeeId)>1);

Q14.
Consider the tables given below.
Emp(empid, empname,salary,deptid)
Dept(deptid,deptname)
Note: deptid column of table Emp referring to deptid column of table Dept.
Identify the correct SQL statement to retrieve employees who are getting more than 25000 salary and
working in "FINANCE"
department.
Choose most appropriate option.
a. SELECT * FROM Emp WHERE deptid=(SELECT * FROM Dept WHERE deptname='FINANCE' AND
salary > 25000);
b. SELECT * FROM Emp WHERE deptid=(SELECT deptid FROM Dept WHERE deptname='FINANCE'
AND salary>25000);
c. SELECT * FROM Emp WHERE deptid=(SELECT * FROM Dept WHERE deptname='FINANCE') AND
salary>25000;
d. SELECT * FROM Emp WHERE deptid=(SELECT deptid FROM Dept WHERE deptname='FINANCE')
AND salary>25000;

The correct answer is: SELECT * FROM Emp WHERE deptid=(SELECT deptid FROM Dept WHERE
deptname='FINANCE') AND

salary>25000;

Q15.
Consider a table with the name Project is created using the SQL statement given below
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]
a. INSERT INTO project(projectid,employeecount) VALUES('P3',10);
b. INSERT INTO project VALUES('P1','Finance',20); ■
c. INSERT INTO project VALUES('P1','Finance';)
d. INSERT INTO project(projectid,projectname) VALUES('P2','Finance'); ■
The correct answers are: INSERT INTO project VALUES('P1','Finance',20);, INSERT INTO
project(projectid,projectname)

VALUES('P2','Finance');

Q16.
Identify the appropriate relationship between the classes House and Room. Assume that getter and setter
methods for all
instance variables are implemented
class Room
{
private int length;
private float width;
}
class House
{
private float area;
private Room room;
public House()
{
room=new Room();
}
}
Choose the most appropriate option
a. Specialization
b. Aggregation
c. Composition ■
d. No relationship exists between class House and class Room
The correct answer is: Composition

Q17.
which of the following represents correct order from the most to least restrictive? Choose most appropriate
option.
a. protected,private,default,public
b. private,default,proctected,public
c. public,protected,default,private
d. private,protected,default,public ■
The correct answer is: private default proctected public

The correct answer is: private,default,proctected,public

Q18.
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.
a. 13500 ■
b. 15000
c. 14985
d. 14000
The correct answer is: 13500

Q19.
Given the following declaration, which expression returns the size of the array,assuming the array has
been initialized? int[]
array; Choose most appropriate option.
a. [Link] ■
b. array[].length()
c. [Link]()
d. array[].size()
The correct answer is: [Link]

Q20.
Which attribute of the form speci es the name of the web page on the server which will process the form
after submission?
Choose most appropriate option.
a. action ■
b. name
c. url
d. method
The correct answer is: action

Q21.
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.
a. Only (i)
b. Only (ii) ■
c. Neither (i) nor (ii)
d. Both (i) and (ii)
The correct answer is: Both (i) and (ii)

Q22.
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
a. Only (ii)
b. Only (i) ■
c. Both (i) and (ii)
d. Neither (i) nor (ii)
The correct answer is: Only (i)

Question

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

a. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY


PercentageOfMarks DESC,

StudentId;

b. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY


StudentId DESC,

PercentageOfMarks;
c. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY
PercentageOfMarks DESC,

StudentId DESC;

d. SELECT StudentId, StudentName, Email, PercentageOfmarks FROM Student ORDER BY


PercentageOfMarks, StudentId

DESC; ■

The correct answer is: SELECT StudentId, StudentName, Email, PercentageOfmarks FROM
Student ORDER BY

PercentageOfMarks, StudentId DESC;

Q23.
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.
a. It is not possible to change the data type of a column
b. Data type can be changed only for primary key column
c. 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 ■
d. There are no criteria to be followed. We can change the datatype of the column irrespective of the data
The correct answer is: 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

Q24.
State True/False?
The names of the foreign key eld and the referenced eld(in parent table) may be same or different, but
must have the same
data type.
a. True
b. False ■
The correct answer is: True

Question

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

Choose most appropriate option.

a. ALTER TABLE RENAME Products TO ProductsInfo;

b. ALTER TABLE Products RENAME ProductsInfo;

c. ALTER TABLE Products RENAME TO ProductsInfo; ■

d. ALTER TABLE Products UPDATE TO ProductsInfo;

The correct answer is: ALTER TABLE Products RENAME TO ProductsInfo;

Q25.
Consider the table employee(empname,salary) with some records. Identify a correct SQL statement to
retrieve unique
combination of empname and salary. Choose most appropriate option.
a. select empname,distinct salary from employee;
b. select distinct empname,salary from employee;
c. select empname,salary from employee;
d. select distinct empname,distinct salary from employee; ■
The correct answer is: select distinct empname,salary from employee;

Q26.
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.
a. SELECT * FROM department WHERE deptname LIKE "%a%e_";
b. SELECT * FROM department WHERE deptname LIKE "_a%e_"; ■
c. SELECT * FROM department WHERE deptname LIKE "a%e%";
d. SELECT * FROM department WHERE deptname LIKE "a%e_";
The correct answer is: SELECT * FROM department WHERE deptname LIKE "_a%e_";

Q27.
Consider table Customer(cid NUMBER(4), cname VARCHAR2(10)) has some records. Identify the
appropriate ALTER
statements (choose 2)which executes on table Customer [ Note: There is no null value for any column]
a. ALTER TABLE Customer MODIFY cname VARCHAR2(15);
b. ALTER TABLE Customer MODIFY cid NUMBER(2);
c. ALTER TABLE Customer ADD dob DATE DEFAULT '30-Jun-1995';
d. ALTER TABLE Customer ADD CONSTRAINT cust_name NOT NULL(cname); ■
The correct answers are: ALTER TABLE Customer ADD dob DATE DEFAULT '30-Jun-1995';,
ALTER TABLE Customer MODIFY

cname VARCHAR2(15);

Question

13

Assume that table Asset(assetId number(2)) is created and 2 records are already inserted and
saved.

COMMIT;

DELETE FROM ASSET;

ROLLBACK;

INSERT INTO ASSET VALUES(5);

COMMIT;

What would be the output of the below SQL statement after executing the above statements
sequentially.

SELECT COUNT(*) FROM Asset;

a. 0

b. 2 ■

c. 3

d. 1

The correct answer is: 3

Q28.
Partially correct
Consider a table with the name Project is created using the SQL statement given below
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]
a. INSERT INTO project(projectid,projectname) VALUES('P2','Finance'); ■
b. INSERT INTO project VALUES('P1','Finance',20);
c. INSERT INTO project VALUES('P1','Finance';)
d. INSERT INTO project(projectid,employeecount) VALUES('P3',10);
You have correctly selected 1.
The correct answers are: INSERT INTO project VALUES('P1','Finance',20);, INSERT INTO
project(projectid,projectname)

VALUES('P2','Finance');

Q29.
Identify the CORRECT SQL statement to create a Account table with composite primary key
(AccountNumber, CustomerId).
Choose most appropriate option
a. CREATE TABLE Account (AccountNumber Number(5), CustomerId Number(10), OpeningDate Date,
Balance
Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId)); ■
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) CONSTRAINT Acc_Pkey1 PRIMARY KEY,
CustomerId Number(10)
CONSTRAINT Acc_Pkey2 PRIMARY KEY, 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 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));

Question

16

If Employee class is created inside [Link] package, what could be the rst line in class? Choose
most appropriate option.

a. packages [Link]
b. class Employee{}

c. package [Link]

d. package [Link] ■

The correct answer is: package [Link]

Q30.
Partially correct
Mark 0.67 out of
1.00
Choose all the statement(s) that are valid.
a. A super class is an incomplete class that requires further speci cation
b. Static data member have same copy, each associated with the object of class ■
c. Two classes in two different packages can have the same name. ■
d. There is only single copy of member function in memory when a class is loaded
The correct answers are: Two classes in two different packages can have the same name., There is
only single copy of

member function in memory when a class is loaded, Static data member have same copy, each
associated with the object of

class

Question

Mark 1.00 out of

1.00

Identify whether the below statement is True or False: The hierarchy of Reader/Writer class is
character-oriented and

InputStream/OutputStream class is byte-oriented.

True ■

False

The correct answer is 'True'.

Q31.
Mark 1.00 out of
1.00
What is the correct way for a method to indicate that it expects the caller to handle an Exception?
Assuming that the method
contains code which may raise an Exception (but not a RuntimeException).
a. throws Exception ■
b. new Exception
c. Don't need to specify anything
d. throw Exception
The correct answer is: throws Exception

Q32.
Mark 1.00 out of
1.00
What is the diagram that depicts the interaction between objects by arranging the objects in time sequence
?
a. Use Case Diagram
b. Component Diagram
c. Sequence Diagram ■
d. Activity Diagram
The correct answer is: Sequence Diagram


Question

11

Mark 1.00 out of

1.00

What is the term used to de ne the values that are common across all instances of a class ?

a. Interface

b. Static ■

c. Property

d. Attribute

The correct answer is: Static

Q33.
Mark 0.00 out of
1.00
Select the principle that best describes the given scenario. The airline ticket booking clerk manages the
available seats, dates,
passenger information, etc while the mehanic maintains information like ight perfomance, fuel
consumption, service
intervals, etc
a. Encapsulation ■
b. Typing
c. Abstraction
d. Polymorphism
The correct answer is: Abstraction
Q34.
Mark 1.00 out of
1.00
Select the diagram used to depict the building blocks and the static structure of the system ?
a. Class Diagram ■
b. Interaction Diagram
c. Sequence Diagram
d. Component Diagram
The correct answer is: Class Diagram

Question

15

Partially correct
Mark 0.50 out of

1.00

Select the bene ts of OOP ?

a. code deployment

b. Ease of design

c. Resuability ■

d. Testing

The correct answers are: Ease of design, Resuability

Q35.
Mark 1.00 out of
1.00
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
a.
c , a, b, f, e, d
b.
c , e , a, b, f, d ■
c.
c , e , a, f , b, d
d.
d, c , e , a, b, f
The correct answer is:

c , e , a, b, f, d

Q36.
A owchart needs to represent a situation to check whether a person is eligible to vote. The system has to
consider the
person’s age for checking the eligibility. Which of the following constructs should be used?
Mark 1.00 out of
1.00
a.
Loop
b. All the options
c.
Decision ■
d.
Sequence
The correct answer is:

Decision

Question

18

Steve is learning to draw a owchart to calculate the volume of a cuboid. Which of the options given
below would t into the

process section of the ow chart?

Mark 1.00 out of

1.00

a. display the volume of the cuboid

b. check if l,b,h have positive value

c. Volume=l*b*h ■

d. Read the value of l,b,h(l represents the length, b represents the breadth, h represents the height)

The correct answer is: Volume=l*b*h

Q37.
Mark 1.00 out of
1.00
Carefully read the question and answer accordingly. Find which list is not related to stacks?
a. First in First Out ■
b. None of the options.
c. Last In First Out
d. Push-down
The correct answer is: First in First Out

Q38.
Mark 1.00 out of
1.00
Carefully read the question and answer accordingly. Which data structure is said to be linear data
structure?
a. Arrays ■
b. None of the listed options
c. Graphs
d. Tree
The correct answer is: Arrays

Q39.
Mark 1.00 out of
1.00
From the given options identify the appropriate algorithm that has the lowest worst-case complexity?
a. Selection Sort
b. Merge Sort ■
c. Bubble Sort
d. Quick Sort
The correct answer is: Merge Sort

Question

22

Mark 0.00 out of

1.00

Which algorithm is the best sorting method in-place with no quadratic worst-case scenarios?

a. Quick Sort ■

b. Selection Sort

c. Heap Sort

d. Bubble Sort

The correct answer is: Heap Sort

Q40.
Mark 1.00 out of
1.00
Time complexity of an algorithm signi es the total time required by the algorithm to complete its execution
with provided
resources. State True or False.
True ■
False
The correct answer is 'True'.

Q41.
Mark 0.00 out of
1.00
In which of the given SDLC model, unclear requirements are considered?
a. Prototyping Model
b. Spiral Model
c. Waterfall Model ■
d. Agile Model
The correct answer is: Prototyping Model

Q42.
Mark 1.00 out of
1.00
Which of the option gives the number of independent paths in the program
a. Equivalence Partitioning
b. Error Guessing
c. Mc Cabes number ■
d. Boundary Value analysis
The correct answer is: Mc Cabes number

Q43.
Mark 1.00 out of
1.00
Which of the following option will delete the corresponding records in the child table when the records in
parent table get
deleted?
a. On cascade set null
b. On delete cascade ■
c. On cascade delete
d. On delete set null
The correct answer is: On delete cascade


Question

30

Mark 1.00 out of

1.00

The CUSTOMER table has following structure

CID NUMBER (5), CNAME VARCHAR2 (50), CADDRESS VARCHAR2 (150)

Which of the below statement would fetch the Customer ID, Name from customer table where
customer name contains “Bose”

and is from “Calcutta”

a. Select cid, cname from customers where cname like ‘%Bose%’ and caddress =’Calcutta’; ■

b. Select cid, cname from customers where cname like ‘Bose’ and caddress =’Calcutta’;

c. Select cid, cname from customers where cname =’Bose’ and caddress =’Calcutta’;

d. Select * from customers where cname like ‘%Bose%’ and caddress =’Calcutta’;

The correct answer is: Select cid, cname from customers where cname like ‘%Bose%’ and
caddress =’Calcutta’;

Q44.
Mark 1.00 out of
1.00
In SQL, which command is used to add new rows to a table?
a. Append
b. Insert ■
c. Alter Table
d. Add row
The correct answer is: Insert

Q45.
Mark 1.00 out of
1.00
Which of the following is not a built in aggregate function in Oracle?
a. Count
b. Max
c. Avg
d. Total ■
The correct answer is: Total

Q46.
Mark 1.00 out of
1.00
The EMPLOYEE table has following structure
EMPID NUMBER (5) , ENAME VARCHAR2 (50), Address VARCHAR2 (15)
Which of the below options will display names of all the employees who are from “Chennai “?
a. SELECT ENAME FROM EMPLOYEE WHERE ADDRESS =’Chennai’; ■
b. SELECT * FROM EMPLOYEE ;
c. SELECT ENAME FROM EMPLOYEE;
d. SELECT * FROM EMPLOYEE WHERE ADDRESS =’Chennai’;
The correct answer is: SELECT ENAME FROM EMPLOYEE WHERE ADDRESS =’Chennai’;

Question

34

Mark 1.00 out of

1.00

What statements are true with respect to delete and truncate command?

a. Both the commands cannot be reversed

b. Delete command can be reversed but truncate cannot be reversed ■

c. Both the commands work in same manner

d. Both the commands can be reversed

The correct answer is: Delete command can be reversed but truncate cannot be reversed

Q47.
Mark 1.00 out of
1.00
What is the purpose of using -a option with ls command ?
a. for showing executables
b. for showing hidden les ■
c. for showing directories
d. for multi columnar output
The correct answer is: for showing hidden les

Q48.
Which command in UNIX displays the list of all the users who have logged into the Unix server?
Mark 1.00 out of
1.00
a. users
b. List users
c. Who am i
d. Who ■
The correct answer is: Who
Q49.
Mark 1.00 out of
1.00
Unix Terminals are called Dummy terminals as they do not have _____________ capability.
a. Processing ■
b. Input
c. Output
d. Display
The correct answer is: Processing

Question

38

Mark 1.00 out of


1.00

Pipes are Used to combine two or more commands. The symbol used for representing pipe is
______

a. ;;

b. | ■

c. ||

d. >>

The correct answer is: |

Q50.
What does the below Unix command accomplish?
$ sed 's/ABC/ZYX/' [Link]
Mark 1.00 out of
1.00
a. Replaces rst occurrence in every line ‘ABC’ with 'ZYX' ■
b. Replaces all occurrences 'ABC' with 'ZYX'
c. Replaces only rst occurrence of ‘ABC’ with 'ZYX'
d. Only matches and displays the occurrence of the pattern
The correct answer is: Replaces rst occurrence in every line ‘ABC’ with 'ZYX'

Q51.
Mark 1.00 out of
1.00
What is used in an HTML page to give instruction to the web browser about the version of HTML being
used?
a. HEAD
b. DOCTYPE ■
c. DOCUMENT
d. TITLE
The correct answer is: DOCTYPE

Q52.
What does the following selector do ?
$("div")
Mark 1.00 out of
1.00
a. Selects the rst div element
b. Selects all div elements ■
c. selects the rst div element inside a <p> tag
d. Selects all div elements within a <p> tag
The correct answer is: Selects all div elements

Q53.
Mark 1.00 out of
1.00
In CSS to de ne style for a unique element then which css selector should be used?
a. id ■
b. text
c. name
d. class
The correct answer is: id

Question

46

Mark 1.00 out of

1.00

What is the CSS code to remove an underline from all hyperlinks

a. a {text: no-underline;}

b. a {text-decoration: no-underline;}

c. a {text-decoration:none;} ■

d. a {text-style: no-underline;}

The correct answer is: a {text-decoration:none;}

Q54.
Mark 1.00 out of
1.00
Find out the well-formed xml le
a. <book category="Web">
<bname>XML Tutorials</BNAME>
<pages>100</pages>
<price>$300.00<price>
<book>
b. <book category="Web">
<bname>XML Tutorials</bname>
<pages>100</pages>
<price>$300.00</price>
</book> ■
c. <book category=Web>
<bname>XML Tutorials</bname>
<pages>100</pages>
<price>$300.00</price>
</book>
d. <book category="Web">
<bname>XML Tutorials</bname>
<pages>100</pages>
<price>$300.00</Price>
</book>
The correct answer is: <book category="Web">

<bname>XML Tutorials</bname>
<pages>100</pages>

<price>$300.00</price>

</book>

Q55.
Mark 1.00 out of
1.00
what is used to nd out an internet resource in an XML?
a. URL
b. XMLNS
c. URN
d. URI ■
The correct answer is: URI


Question

49

Which of the following xml prolog is according to syntax of XML

Mark 1.00 out of

1.00

a. <?xml version="1.0" version="UTF-8"?>

b. <?xml version="1.0" encoding="UTF-8">

c. <?xml version="1.0" encoding="UTF-18"?>

d. <?xml version="1.0" encoding="UTF-8"?> ■

The correct answer is: <?xml version="1.0" encoding="UTF-8"?>

Q56.
What is wrong in the following lines of xml code
<note date= 14/04/1979>
<to>Abin< /to>
<from>John< /from>
</note>
Mark 1.00 out of
1.00
a. XML Tags are Case Sensitive
b. All XML Elements Must Have a Closing Tag
c. XML Attribute Values Must be Quoted ■
d. XML Elements Must be Properly Nested
The correct answer is: XML Attribute Values Must be Quoted

■ Dashboard / Marvels Mock 3 - Quiz - REVIEW / Quiz / Quiz

Started on Friday, 24 April 2020, 4:31 PM

State

Finished

Completed on Friday, 24 April 2020, 5:50 PM

Time taken 1 hour 19 mins

Grade 47.00 out of 50.00 (94%)

Q57.
Mark 1.00 out of
1.00
How do we change the state of an object ?
a. Using object's property
b. Using object's behavior ■
c. Using Object's default methods
d. Using class name
The correct answer is: Using object's behavior

Q58.
Mark 1.00 out of
1.00
Select the true statement ?
a. Inheritance forms a is-a part of relationship between classes.
b. Aggregation is the stronger form of Inheritance.
c. Aggregation forms a is-a part of relationship between classes. Composition is the stronger form of
Aggregation. ■
d. Aggregation forms the is-a type of relationship between classes.
The correct answer is: Aggregation forms a is-a part of relationship between classes. Composition
is the stronger form of

Aggregation.

Q59.
Mark 1.00 out of
1.00
Which of the below terms represents the levels of hierarchy ?
a. Multi-Level
b. Compound
c. Aggregation ■
d. Generalization ■
The correct answers are: Generalization, Aggregation

Question

Mark 0.00 out of

1.00

What de nes the state of an object ?

a. Using the class Id

b. Using the value of the class properties

c. Using the behavior ■

d. Using the class identity

The correct answer is: Using the value of the class properties

Q60.
Mark 1.00 out of
1.00
How does the different section of an application communicate in an OO approach ?
a. The objects created during runtime by different sections of the application interact through messages ■
b. In OO approach, the diffferent sections run in isolation so they will NOT interact
c. Different sections of the application interact through le system
d. Different sections of the application interact through database
The correct answer is: The objects created during runtime by different sections of the application
interact through messages

Q61.
Mark 1.00 out of
1.00
Select the principle that best describes the given scenario. An air-condition can be operated using the
button or remote
control.
a. Abstraction
b. Encapsulation ■
c. Hierarchy
d. Polymorphism
The correct answer is: Encapsulation

Q62.
_________ 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.
Mark 1.00 out of
1.00
a. object code
b. Pseudocode ■
c. Structure code
d. Programming code
The correct answer is: Pseudocode

Question

Mark 1.00 out of

1.00

In which of the given SDLC model, unclear requirements are considered?

a. Waterfall Model

b. Spiral Model

c. Agile Model
d. Prototyping Model ■

The correct answer is: Prototyping Model

Q63.
Mark 1.00 out of
1.00
Enhancements made to the developed software is called as ………………
a. Maintenance ■
b. Analysis
c. Design
d. Testing
The correct answer is: Maintenance

Q64.
Mark 1.00 out of
1.00
Software was developed for Global Marketing. Few changes that was earlier requested was already
incorporated in the
delivered software. Now the client does not want the changes and requested for the previous release.
Which of the below
option would facilitate developer to meet the client needs.
a. Software Control Management
b. Software Repository
c. Change Control Management
d. Software Con guration Management ■
The correct answer is: Software Con guration Management

Question

12

Mark 1.00 out of

1.00

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

a. Agile

b. Water fall

c. Prototyping

d. Spiral ■
The correct answer is: Spiral

Q65.
Mark 1.00 out of
1.00
Which of the following is not a feature of UNIX?
a. User friendly ■
b. Portability
c. Multitasking
d. Multiuser
The correct answer is: User friendly

Q66.
Mark 1.00 out of
1.00
Consider the [Link] le 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" [Link] command?
a. 4
b. 2 ■
c. 0
d. 3
The correct answer is: 2

Question

16

What does the below Unix command accomplish?

$ sed 's/ABC/ZYX/' [Link]

Mark 1.00 out of

1.00

a. Only matches and displays the occurrence of the pattern

b. Replaces only rst occurrence of ‘ABC’ with 'ZYX'

c. Replaces all occurrences 'ABC' with 'ZYX'

d. Replaces rst occurrence in every line ‘ABC’ with 'ZYX' ■

The correct answer is: Replaces rst occurrence in every line ‘ABC’ with 'ZYX'

Q67.
Mark 1.00 out of
1.00
Which of the following should be used to print lines containing ‘manager’ in [Link]?
a. awk ‘/manager { print }’ [Link]
b. awk ‘/manager/ { print } [Link]
c. awk ‘manager { print }’ [Link]
d. awk ‘/manager/ { print }’ [Link] ■
The correct answer is: awk ‘/manager/ { print }’ [Link]

Q68.
Which is the correct way to de ne an empty book element
Mark 1.00 out of
1.00
a. <book>
b. <book>NULL</book>
c. <book>empty</book>
d. <book></book> ■
The correct answer is: <book></book>

Question

20

Mark 1.00 out of

1.00

Which is not true about XML

a. XML must be wellformed

b. XML Tags are not Case Sensitive ■

c. All XML Elements Must Have a Closing Tag

d. XML Elements Must be Properly Nested

The correct answer is: XML Tags are not Case Sensitive

Q69.
Mark 1.00 out of
1.00
What is the correct XPATH that selects all the state elements that have a "speak" attribute with a value of
"HIN"
a. //state[@speak,'HIN']
b. //state[@speak=HIN]
c. //state[speak='HIN']
d. //state[@speak='HIN'] ■
The correct answer is: //state[@speak='HIN']
Q70.
Mark 1.00 out of
1.00
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.
a. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE '__e';
b. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE 'A_e'; ■
c. SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE 'A%e';
d. SELECT EmployeeName FROM Employee WHERE EmployeeName = 'A_e';
The correct answer is: SELECT EmployeeName FROM Employee WHERE EmployeeName LIKE
'A_e';

Question

33

Consider the following tables:

Vendor (VendorId, VendorName, PhoneNumber).

Here VendorId is the primary key.

Mark 1.00 out of

1.00

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

a. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON


[Link] =

[Link];

b. SELECT [Link],[Link],[Link] FROM Item LEFT OUTER JOIN


Vendor ON [Link] =

[Link]; ■

c. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON


[Link] =

[Link] AND [Link] IS NULL;

d. SELECT [Link],[Link],[Link] FROM Item, Vendor WHERE


[Link] =

[Link];
The correct answer is: SELECT [Link],[Link],[Link] FROM Item
LEFT OUTER JOIN Vendor ON

[Link] = [Link];

Q71.
Mark 1.00 out of
1.00
What would be the output of the SQL statement given below? SELECT SUBSTR("Accenture",3,4) FROM
DUAL; Choose most
appropriate option.
a. ntur
b. entu
c. cent ■
d. centu
The correct answer is: cent

Q72.
Identify the CORRECT SQL statement(s) to remove ONLY the data from "Employee" table?
(ii) DELETE FROM Employee;
(iii) TRUNCATE TABLE Employee;
Mark 1.00 out of
1.00
(i) DROP TABLE Employee;
Choose most appropriate option.
a. Both (i) and (ii)
b. Both (i) and (iii)
c. Both (ii) and (iii) ■
d. (i), (ii) and (iii)
The correct answer is: Both (ii) and (iii)

Question

36

Mark 1.00 out of

1.00

Identify the CORRECT SQL statement to create a Account table with composite primary key
(AccountNumber, CustomerId).

Choose most appropriate option

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), OpeningDate
Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId)); ■

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

Q73.
Mark 1.00 out of
1.00
which of the following code creates a list box from which user can select more than one option?
a. <select name='type' multiple><br />
<option> P </option><br />
<option> G </option><br />
<option> S </option><br />
</select> ■
b. <select type=multiValue><br />
<option> P </option><br />
<option> G </option><br />
<option> S </option><br />
</select>
c. <select 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>
The correct answer is: <select name='type' multiple><br />

<option> P </option><br />


<option> G </option><br />

<option> S </option><br />

</select>

Question

40

Mark 1.00 out of

1.00

Which attribute of the form speci es the name of the web page on the server which will process the
form after submission?

Choose most appropriate option.

a. method

b. name

c. url

d. action ■

The correct answer is: action

Q74.
Steve is learning to draw a owchart to calculate the volume of a cuboid. Which of the options given below
would t into the
process section of the ow chart?
Mark 1.00 out of
1.00
a. check if l,b,h have positive value
b. display the volume of the cuboid
c. Read the value of l,b,h(l represents the length, b represents the breadth, h represents the height)
d. Volume=l*b*h ■
The correct answer is: Volume=l*b*h

Question

45

Mark 1.00 out of

1.00

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

a.

c , a, b, f, e, d

b.

c , e , a, b, f, d ■

c.

c , e , a, f , b, d

d.

d, c , e , a, b, f

The correct answer is:

c , e , a, b, f, d

Q75.
Mark 1.00 out of
1.00
Carefully read the question and answer accordingly. One of the best application of Stack is
a. Radix sort
b. Array
c. Recursion ■
d. Breadth First Search
The correct answer is: Recursion

Question

48

Carefully read the question and answer accordingly. Which of the following options are correct?

a. None of the options.

Mark 1.00 out of

1.00

b. A tree which does not have any node other than root node has depth of zero. ■

c. A tree which does not have any node other than root node is called a null tree ■

d. A tree with n nodes has exactly n branches or degree.

The correct answers are: A tree which does not have any node other than root node is called a null
tree, A tree which does not

have any node other than root node has depth of zero.

Q76.
Which algorithm is the best sorting method in-place with no quadratic worst-case scenarios?
a. Bubble Sort
Mark 1.00 out of
1.00
b. Selection Sort
c. Quick Sort
d. Heap Sort ■
The correct answer is: Heap Sort

Q77.
What is the time complexity of these functions?
int fact(int i)
{
Mark 0.00 out of
1.00
if(i<=1)
return i;
return 2*fact(i-1);
}
int fact2(int i)
{
if(i<=1)
return i;
return fact2(i-1) + fact2(i-1);
}
a. O(n) for both fact() and fact2()
b. O(2^n) for fact() and O(n) for fact2() ■
c. O(n) for fact() and O(2^n) for fact2()
d. O(2^n) for both fact() and fact2()
The correct answer is: O(n) for fact() and O(2^n) for fact2()

6/29/2020

Quiz: Attempt review

■ Abhijit Mukund Pimpale .

■ Dashboard / Nobels Mock 3 - Quiz / Quiz / Quiz

Started on Friday, 19 June 2020, 4:30 PM

State

Finished

Completed on Friday, 19 June 2020, 4:47 PM

Time taken 17 mins 10 secs

Grade 49.00 out of 50.00 (98%)

Q78.
Mark 1.00 out of
1.00
What is the term used to de ne the values that are common across all instances of a class ?
a. Property
b. Interface
c. Attribute
d. Static ■
The correct answer is: Static

Q79.
Mark 1.00 out of
1.00
Select the multiplicity between passenger and train reservation ticket? What is the multiplicity of passenger
?
a. 0..1
b. 1 ■
c. 1..*
d. 0..*
The correct answer is: 1

Q80.
Mark 1.00 out of
1.00
What de nes the state of an object ?
a. Using the value of the class properties ■
b. Using the class identity
c. Using the behavior
d. Using the class Id
The correct answer is: Using the value of the class properties

[Link]
l=1

1/17

6/29/2020

Quiz: Attempt review

■ Abhijit Mukund Pimpale .

Q81.
Mark 1.00 out of
1.00
Select the true statements about Use Case diagram ?
a. Depicts the boundry of the system ■
b. Captures dynamic aspects of the system ■
c. Captures attributes and methods
d. Captures users of the system ■
The correct answers are: Depicts the boundry of the system, Captures users of the system,
Captures dynamic aspects of the

system

Q82.
Mark 1.00 out of
1.00
A program is said to be_______, if it optimizes the amount of memory and processing time.
a. e cient ■
b. modular
c. robust
d. documented
The correct answer is: e cient

Q83.
Mark 1.00 out of
1.00
In which of the given SDLC model, unclear requirements are considered?
a. Agile Model
b. Prototyping Model ■
c. Waterfall Model
d. Spiral Model
The correct answer is: Prototyping Model

Q84.
State true or false.
Con guration management is important only during the coding phase
Mark 1.00 out of
1.00
True
False ■
The correct answer is 'False'

[Link]
l=1

2/17

6/29/2020
Quiz: Attempt review

The correct answer is False .

■ Abhijit Mukund Pimpale .

Q85.
Mark 1.00 out of
1.00
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
a. 0..0
b. m..m
c. m..1 ■
d. 0..m
The correct answer is: m..1

Q86.
Mark 1.00 out of
1.00
A website for Flight Booking was developed and given to the testing team for testing. It has various elds to
enter the data, out
of which one of the input eld will take the birth year from the user ranging from 1980 to 2060. The
boundary values for testing
this eld are?
a. 0, 1959, 1960, 1961, 1994, 1995, 1996
b. 1959, 1960, 1994, 1995
c. 0,2000,2050,2020,1981
d. 1979,1980,2060,2061 ■
e. 1979,2030,1980,2060,2061
The correct answer is: 1979,1980,2060,2061

Q87.
Mark 1.00 out of
1.00
Pipes are Used to combine two or more commands. The symbol used for representing pipe is ______
a. | ■
b. ;;
c. >>
d. ||
The correct answer is: |
[Link]
l=1

3/17

6/29/2020

Quiz: Attempt review

■ Abhijit Mukund Pimpale .

Q88.
Consider the [Link] le and predict the output
Unix is an operating system.
Unix is open source.
Mark 1.00 out of
1.00
Linux is also a powerful OS.
What is the output of grep -c "Unix" [Link] command?
a. 3
b. 2 ■
c. 4
d. 0
The correct answer is: 2

Q89.
Mark 1.00 out of
1.00
What does DTD stand for?
a. Dynamic Type De nition
b. Dynamic Transfer De nition
c. Direct Type De nition
d. Document Type De nition ■
The correct answer is: Document Type De nition

Q90.
Which of the following xml prolog is according to syntax of XML
Mark 1.00 out of
1.00
a. <?xml version="1.0" encoding="UTF-18"?>
b. <?xml version="1.0" version="UTF-8"?>
c. <?xml version="1.0" encoding="UTF-8"?> ■
d. <?xml version="1.0" encoding="UTF-8">
The correct answer is: <?xml version="1.0" encoding="UTF-8"?>
Q91.
Mark 1.00 out of
1.00
Identify the predicate which selects the last Employee element that is the child of the Company element?
a. /Company/Employee[last()] ■
b. /Company/Employee[1]
c. /Company/Employee[ rst-1]
d. /Company/Employee[ rst()-1]
The correct answer is: /Company/Employee[last()]

[Link]
l=1

5/17

6/29/2020

Quiz: Attempt review


■ Abhijit Mukund Pimpale .

Q92.
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;
Mark 1.00 out of
1.00
Choose most appropriate option.
a. Both (ii) and (iii) ■
b. Both (i) and (iii)
c. Both (i) and (ii)
d. (i), (ii) and (iii)
The correct answer is: Both (ii) and (iii)

Q93.
Mark 1.00 out of
1.00
Identify the CORRECT SQL statement to create a table with composite primary key. Choose most
appropriate option.
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), OpeningDate Date,
Balance
Number(10,2), CONSTRAINT Acc_Pkey COMPOSITE PRIMARY KEY (AccountNumber,CustomerId));
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));
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));

[Link]
l=1

11/17

6/29/2020

Quiz: Attempt review

■ Abhijit Mukund Pimpale .

Q94.
Mark 1.00 out of
1.00
Which of the following SQL commands is used to remove table "EMPLOYEE" present in the database?
Choose most
appropriate option.
a. DELETE TABLE EMPLOYEE;
b. TRUNCATE TABLE EMPLOYEE;
c. REMOVE TABLE EMPLOYEE;
d. DROP TABLE EMPLOYEE; ■
The correct answer is: DROP TABLE EMPLOYEE;

Q95.
Mark 1.00 out of
1.00
Identify the CORRECT SQL statement to create a Account table with composite primary key
(AccountNumber, CustomerId).
Choose most appropriate option
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), OpeningDate Date,
Balance
Number(10,2), CONSTRAINT Acc_Pkey COMPOSITE PRIMARY KEY (AccountNumber,CustomerId));
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));
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));

[Link]
l=1

12/17

6/29/2020

Quiz: Attempt review

■ Abhijit Mukund Pimpale .

Q96.
Mark 1.00 out of
1.00
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.
a. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
ON [Link]=[Link]
INNER JOIN book b
ON [Link]=[Link]; ■
b. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
ON [Link]=[Link]
SELF JOIN book b
ON [Link]=[Link];
c. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
ON [Link]=[Link];
d. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
INNER JOIN book b
ON [Link]=[Link] AND [Link]=[Link];
The correct answer is: SELECT [Link],[Link]

FROM customer c INNER JOIN purchase p

ON [Link]=[Link]

INNER JOIN book b

ON [Link]=[Link];

Q97.
Mark 0.00 out of
1.00
Which of the following CSS code is the correct one to apply style to tag 'P'? Choose most appropriate
option.
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; )
The correct answer is: p { color:red; text-align:center; }

Q98.
Mark 1.00 out of
1.00
Which of the following is not a method of document object? Choose most appropriate option.
a. write(String)
b. print(String) ■
c. getElementByTagName(String)
d. getElementById(String)
The correct answer is: print(String)

Q99.
The properties of good program must have_____
Mark 1.00 out of
1.00
a.
Fault Prevention and fault tolerance ■
b. Component dependence
c.
Poor Design for change
d. Modules tightly connected
The correct answer is:

Fault Prevention and fault tolerance

Q100.
Mark 1.00 out of
1.00
Carefully read the question and answer accordingly. What operation is processed for each element in the
list
a. Inserting
b. Sorting
c. Traversal ■
d. Merging
The correct answer is: Traversal

Q101.
Mark 1.00 out of
1.00
An algorithm which executes on constant time period can be denoted as
a. O(1) ■
b. O(n)
c. O(nlogn)
d. O(n2)
The correct answer is: O(1)

[Link]
l=1

16/17

6/29/2020

Quiz: Attempt review

■ Abhijit Mukund Pimpale .

Q102.
Which algorithm is the best sorting method in-place with no quadratic worst-case scenarios?
a. Heap Sort ■
Mark 1.00 out of
1.00
b. Quick Sort
c. Selection Sort
d. Bubble Sort
The correct answer is: Heap Sort

Q103.
What is the time complexity of nd_count()?
int nd_count(int i)
{
Mark 1.00 out of
1.00
int c=0;
for(int m=0;m<I;m++)
for(int n=m;n>0;n--)
c=c+1;
return c;
}
a. theta(n2) ■
b. theta(n)
c. theta(nlognlogn)
d. theta(n*logn)
The correct answer is: theta(n2)

[Link]
l=1

17/17

6/10/2020

Quiz: Attempt review

■ ■ Prashant Raju Ghadge .

■ Dashboard / Nobles Mock 1 - Quiz / Quiz / Quiz

Started on Friday, 5 June 2020, 6:15 PM

State

Finished

Completed on Friday, 5 June 2020, 7:35 PM

Time taken 1 hour 20 mins

Grade 44 out of 50 (88%)

Q104.
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.
a. SELECT DeptCode,avg(salary) FROM Employee GROUP BY DeptCode; ■
b. SELECT DeptCode,avg(salary) FROM Employee GROUP BY Salary;
c. SELECT DeptCode,avg(salary) FROM Employee;
d. SELECT DeptCode,avg(salary) FROM Employee GROUP BY EmployeeNumber;
The correct answer is: SELECT DeptCode,avg(salary) FROM Employee GROUP BY DeptCode;

Q105.
What is the SQL query for nding the total number of rows in a given table 'emp'? Choose most appropriate
option.
a. SELECT SUM FROM EMP;
b. SELECT COUNT(*) FROM EMP; ■
c. SELECT COUNT FROM EMP;
d. SELECT SUM(*) FROM EMP;
The correct answer is: SELECT COUNT(*) FROM EMP;

Q106.
which command help us to get back the permission of accessing the table.
a. rollback
b. commit
c. revoke ■
d. grant
The correct answer is: revoke

[Link]
l=1

2/25

6/10/2020

Quiz: Attempt review

■ ■ Prashant Raju Ghadge .

Q107.
Identify the CORRECT SQL statement to create a table with composite primary key. Choose most
appropriate option.
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), CustomerId Number(10), OpeningDate Date,
Balance
Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId)); ■
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) CONSTRAINT Acc_Pkey1 PRIMARY KEY,
CustomerId Number(10)
CONSTRAINT Acc_Pkey2 PRIMARY KEY, OpeningDate Date, Balance Number(10,2));
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));

Q108.
What would be the output of the SQL statement given below? SELECT SUBSTR("Accenture",3,4) FROM
DUAL; Choose most
appropriate option.
a. entu
b. ntur
c. centu
d. cent ■
The correct answer is: cent

Q109.
Assume that table Asset(assetId number(2)) is created and 2 records are already inserted and saved.
COMMIT;
DELETE FROM ASSET;
ROLLBACK;
INSERT INTO ASSET VALUES(5);
COMMIT;
What would be the output of the below SQL statement after executing the above statements sequentially.
SELECT COUNT(*) FROM Asset;
a. 0
b. 3 ■
c. 2
d. 1
The correct answer is: 3

Q110.
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’.
a. SELECT [Link], [Link], NVL([Link],'Not Registered') FROM event e2 INNER JOIN
employee e1 ON
[Link]=[Link];
b. SELECT [Link], [Link], NVL([Link],'Not Registered') FROM employee e1 LEFT
OUTER JOIN event e2
ON [Link]=[Link]; ■
c. SELECT [Link], [Link], NVL([Link],'Not Registered') FROM event e2 LEFT OUTER
JOIN employee e1
ON [Link]=[Link];
d. SELECT [Link], [Link], NVL([Link],'Not Registered') FROM employee e1 RIGHT
OUTER JOIN event e2
ON [Link]=[Link];
The correct answer is: SELECT [Link], [Link], NVL([Link],'Not Registered')
FROM employee e1 LEFT OUTER

JOIN event e2 ON [Link]=[Link];

[Link]
l=1

4/25

6/10/2020

Quiz: Attempt review

■ ■ Prashant Raju Ghadge .

Q111.
which of the following code creates a list box from which user can select more than one option?
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' multiValue><br />
<option> P </option><br />
<option> G </option><br />
<option> S </option><br />
</select>
d. <select name='type' multiple><br />
<option> P </option><br />
<option> G </option><br />
<option> S </option><br />
</select> ■
The correct answer is: <select name='type' multiple><br />

<option> P </option><br />

<option> G </option><br />

<option> S </option><br />

</select>

Q112.
Which of the following is not a method of document object? Choose most appropriate option.
a. getElementById(String)
b. write(String)
c. getElementByTagName(String)
d. print(String) ■
The correct answer is: print(String)

Q113.
Identify the CORRECT statements with respect to CSS.
b) External style sheet can be used only for one HTML page in a website
Choose most appropriate option.
a) CSS is used for giving style for HTML content
a. only a ■
b. only b
c. neither a nor b
d. both a and b
The correct answer is: only a

[Link]
l=1

21/25

6/10/2020

Quiz: Attempt review

■ ■ Prashant Raju Ghadge .


Q114.
Which method is used to remove focus from the speci ed object? Choose most appropriate option.
a. onfocus()
b. onclick()
c. onsubmit()
d. onblur() ■
The correct answer is: onblur()

[Link]
l=1

22/25

6/10/2020

Quiz: Attempt review


■ ■ Prashant Raju Ghadge .

Q115.
Consider a table Account(accountId, balance).
Observe the below statements. Few queries results in same output. Identify those queries. (Choose two).
a. SELECT * FROM Account WHERE balance > 1000 AND balance < 5000;
b. SELECT * FROM Account WHERE balance >= 1000 AND balance <= 5000; ■
c. SELECT * FROM Account WHERE balance between 1000 AND 5000; ■
d. SELECT * FROM Account WHERE balance >= 1000 OR balance <= 5000;
The correct answers are: SELECT * FROM Account WHERE balance >= 1000 AND balance <= 5000;,
SELECT * FROM Account

WHERE balance between 1000 AND 5000;

Q116.
Which of the following can be created as a table level constraint?
(i) primary Key
(ii) foreign key
(iii) unique
Choose most appropriate option.
a. (i) and (iii)
b. (i) only
c. (i) and (ii)
d. (i), (ii) and (iii) ■
The correct answer is: (i), (ii) and (iii)

Q117.
Consider table Students(studentId, branchid). Identify the CORRECT SQL statement to retrieve the
branches which has more
than 3 students. Choose most appropriate option.
a. SELECT branchid FROM Students GROUP BY branchid HAVING COUNT(*) > 3;
b. SELECT branchid FROM Students HAVING COUNT(*) >3;
c. SELECT branchid FROM Students WHERE COUNT(*) >3 GROUP BY branchid;
d. SELECT branchid FROM Students GROUP BY studentId HAVING COUNT(*) > 3; ■
The correct answer is: SELECT branchid FROM Students GROUP BY branchid HAVING COUNT(*) >
3;

[Link]
l=1

2/22

6/18/2020

Quiz: Attempt review

The correct answer is: SELECT branchid FROM Students GROUP BY branchid HAVING COUNT(*) >
3;

■ Abhijit Mukund Pimpale .

Q118.
Consider the table Products(pid,pname,pcost). Identify the appropriate SQL statement to rename the table
to ProductsInfo .
Choose most appropriate option.
a. ALTER TABLE Products UPDATE TO ProductsInfo;
b. ALTER TABLE Products RENAME ProductsInfo;
c. ALTER TABLE Products RENAME TO ProductsInfo; ■
d. ALTER TABLE RENAME Products TO ProductsInfo;
The correct answer is: ALTER TABLE Products RENAME TO ProductsInfo;

Q119.
Which of the following statement(s) is/are TRUE?
(i) In a subquery, the inner query is responsible for giving result.
(ii) In a subquery, the outer query is responsible to display output.
Choose most appropriate option
a. Only (ii)
b. Only (i)
c. Both (i) and (ii) ■
d. Neither (i) nor (ii)
The correct answer is: Both (i) and (ii)

Q120.
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.
a. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
ON [Link]=[Link]
INNER JOIN book b
ON [Link]=[Link]; ■
b. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
INNER JOIN book b
ON [Link]=[Link] AND [Link]=[Link];
c. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
ON [Link]=[Link]
SELF JOIN book b
ON [Link]=[Link];
d. SELECT [Link],[Link]
FROM customer c INNER JOIN purchase p
ON [Link]=[Link];
The correct answer is: SELECT [Link],[Link]

FROM customer c INNER JOIN purchase p

ON [Link]=[Link]

INNER JOIN book b

ON [Link]=[Link];

Q121.
If Employee class is created inside [Link] package, what could be the rst line in class? Choose most
appropriate option.
a. package [Link] ■
b. class Employee{}
c. packages [Link]
d. package [Link]
The correct answer is: package [Link]
Q122.
which of the following represents correct order from the most to least restrictive? Choose most appropriate
option.
a. private,protected,default,public
b. public,protected,default,private
c. private,default,proctected,public ■
d. protected,private,default,public
The correct answer is: private,default,proctected,public

[Link]
l=1

7/22

6/18/2020

Quiz: Attempt review

■ Abhijit Mukund Pimpale .

Q123.
Which of the following CSS code is the correct one to apply style to tag 'p'? Choose most appropriate
option.
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; )
The correct answer is: p { color:red; text-align:center; }

Q124.
Which method is used to remove focus from the speci ed object? Choose most appropriate option.
a. onclick()
b. onblur() ■
c. onfocus()
d. onsubmit()
The correct answer is: onblur()

Q125.
In HTML, Which of the following is used to merge columns in a table? Choose most appropriate option.
a. columns-span
b. colspan ■
c. columnspan
d. cspan
The correct answer is: colspan
Q126.
Mark 1.00 out of
1.00
What is the approach of OO ?
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

Q127.
Mark 1.00 out of
1.00
What is the term used to de■ne the values that are common across all instances of a class ?
a. Static ■
b. Property
c. Interface
d. Attribute
The correct answer is: Static

Q128.
Mark 1.00 out of
1.00
Select the bene■ts of OOP ?
a. Resuability ■
b. Testing
c. code deployment
d. Ease of design ■
The correct answers are: Ease of design, Resuability

Q129.
Not answered
Marked out of
1.00
Select the true statements about Use Case diagram ?
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

Q130.
Mark 0.00 out of
1.00
Select the principle that best describes the given scenario. An air-condition can be operated using the
button or remote
control.
a. Encapsulation
b. Polymorphism
c. Hierarchy
d. Abstraction ■
The correct answer is: Encapsulation

Q131.
State true or false.
Con■guration management is important only during the coding phase
Mark 1.00 out of
1.00
True
False ■
The correct answer is 'False'.

Q132.
Mark 1.00 out of
1.00
State true or false. Black box testers can proceed with generating the test cases immediately after the
SRS is freezed in the
analysis phase
True ■
False
The correct answer is 'True'.

Q133.
Mark 0.00 out of
1.00
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
a. m..1
b. 0..0
c. m..m ■
d. 0..m
The correct answer is: m..1

Q134.
Mark 1.00 out of
1.00
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
a. Agile
b. Prototyping
c. Water fall
d. Spiral ■
The correct answer is: Spiral

Q135.
Unix Terminals are called Dummy terminals as they do not have _____________ capability.
Mark 1.00 out of
1.00
a. Output
■ sai Sampath Ghantasala .
b. Input
c. Processing ■
d. Display
The correct answer is: Processing

Q136.
Mark 1.00 out of
1.00
Consider the [Link] ■le 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" [Link] command?
a. 0
b. 3
c. 2 ■
d. 4
The correct answer is: 2

Q137.
What does the below Unix command accomplish?
$ sed 's/ABC/ZYX/' ■[Link]
Mark 1.00 out of
1.00
a. Only matches and displays the occurrence of the pattern
b. Replaces only ■rst occurrence of ‘ABC’ with 'ZYX'
c. Replaces all occurrences 'ABC' with 'ZYX'
d. Replaces ■rst occurrence in every line ‘ABC’ with 'ZYX' ■
The correct answer is: Replaces ■rst occurrence in every line ‘ABC’ with 'ZYX'

Q138.
Mark 1.00 out of
1.00
which of the following option can be used ,in order to quit vi editor without saving the work done ?
a. :q! ■
b. :w
c. :q
d
d. :c
■ sai Sampath Ghantasala .
The correct answer is: :q!

Q139.
Mark 1.00 out of
1.00
Which of the following fragments of XML are well-formed
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"?>

Q140.
Mark 1.00 out of
1.00
Identify the well-formed XML code
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> ■
c. <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 .
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>

Q141.
Mark 1.00 out of
1.00
which of the following represents correct order from the most to least restrictive? Choose most appropriate
option.
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

Q142.
Consider the following tables:
Vendor (VendorId, VendorName, PhoneNumber).
Here VendorId is the primary key.
Mark 1.00 out of
1.00
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
a. SELECT [Link],[Link],[Link] FROM Item, Vendor WHERE
[Link] =
[Link];
b. SELECT [Link],[Link],[Link] FROM Item LEFT OUTER JOIN Vendor
ON [Link] =
[Link]; ■
c. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON
[Link] =
[Link];
d. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON
[Link] =
[Link] AND [Link] IS NULL;
The correct answer is: SELECT [Link],[Link],[Link] FROM Item
LEFT OUTER JOIN Vendor ON
[Link] = [Link];

Q143.
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.
Mark 1.00 out of
1.00
a. False
b. True ■
The correct answer is: True

Q144.
Mark 1.00 out of
1.00
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
a. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON
[Link] =
[Link];
b. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON
[Link] =
[Link] AND [Link] IS NULL;
c. SELECT [Link],[Link],[Link] FROM Item, Vendor WHERE
[Link] =
[Link];
d. SELECT [Link],[Link],[Link] FROM Item LEFT OUTER JOIN Vendor
ON [Link] =
[Link]; ■
The correct answer is: SELECT [Link],[Link],[Link] FROM Item
LEFT OUTER JOIN Vendor ON

[Link] = [Link];
Q145.
Mark 0.00 out of
1.00
Identify the CORRECT SQL statement to create a Account table with composite primary key
(AccountNumber, CustomerId).
Choose most appropriate option
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));
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));

Q146.
Mark 1.00 out of
1.00
In HTML, Which of the following is used to merge columns in a table? Choose most appropriate option.
a. columnspan
b. cspan
c. colspan ■
d. columns-span
The correct answer is: colspan

Q147.
Mark 1.00 out of
1.00
Which method is used to remove focus from the speci■ed object? Choose most appropriate option.
a. onclick()
b. onfocus()
c. onblur() ■
d. onsubmit()
The correct answer is: onblur()
Q148.
■ sai Sampath Ghantasala .
Carefully read the question and answer accordingly. Which data structure is said to be linear data
structure?
a. Graphs
Mark 1.00 out of
1.00
b. None of the listed options
c. Tree
d. Arrays ■
The correct answer is: Arrays

Q149.
Mark 1.00 out of
1.00
Time complexity of an algorithm signi■es the total time required by the algorithm to complete its execution
with provided
resources. State True or False.
True ■
False
The correct answer is 'True'.

Q150.
What is the time complexity of ■nd_count()?
int ■nd_count(int i)
Not answered
{
Marked out of
1.00
int c=0;
for(int m=0;m<I;m++)
for(int n=m;n>0;n--)
c=c+1;
return c;
}
a. theta(nlognlogn)
b. theta(n)
c. theta(n2)
d. theta(n*logn)
The correct answer is: theta(n2)
Q151.
What is the time complexity of these functions?
int fact(int i)
Not answered
{
Marked out of
1.00
if(i<=1)
return i;
return 2*fact(i-1);
}
int fact2(int i)
{
if(i<=1)
return i;
return fact2(i-1) + fact2(i-1);
}
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 .

■ sai Sampath Ghantasala .

■ Dashboard / Nobles Mock 2 - Quiz / Quiz / Quiz

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

Q152.
What is the SQL query for ■nding the total number of rows in a given table 'emp'? Choose most
appropriate option.
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;

Q153.
Which of the following about DELETE command in SQL is FALSE? Choose most appropriate option.
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

Q154.
Partially correct
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.
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');

Q155.
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.
a. SELECT * FROM Projects WHERE ProjectName LIKE "%SAP%"; ■
b. SELECT * FROM Projects WHERE ProjectName = '%SAP%';
c. SELECT * FROM Projects WHERE ProjectName LIKE '%SAP';
c. S
C
O
ojects
oject a e
%S
;
d. SELECT * FROM Projects WHERE ProjectName LIKE 'SAP%';
■ sai Sampath Ghantasala .
The correct answer is: SELECT * FROM Projects WHERE ProjectName LIKE "%SAP%";

Q156.
If Employee class is created inside [Link] package, what could be the ■rst line in class? Choose most
appropriate option.
a. package [Link]
b. package [Link] ■
c. packages [Link]
d. class Employee{}
The correct answer is: package [Link]

Q157.
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.
a. JDK on Windows
b. JVM on Linux
c. JVM on Windows
d. JDK on Linux ■
The correct answer is: JVM on Linux

Q158.
which of the following code creates a list box from which user can select more than one option?
l
l iV l
b/
a. <select type=multiValue><br />
<option> P </option><br />
■ sai Sampath Ghantasala .
<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>
The correct answer is: <select name='type' multiple><br />

<option> P </option><br />

<option> G </option><br />

<option> S </option><br />

</select>

Q159.
Which attribute of the form speci■es the name of the web page on the server which will process the form
after submission?
Choose most appropriate option.
a. action ■
b. name
c. url
d. method
The correct answer is: action

Q160.
Identify the CORRECT SQL statement to create a table with composite primary key. Choose most
appropriate option.
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));

Q161.
which command help us to get back the permission of accessing the table.
a. revoke
b. rollback
c. grant ■
d. commit
The correct answer is: revoke

Q162.
State True/False?
The names of the foreign key ■eld and the referenced ■eld(in parent table) may be same or different, but
must have the same
data type.
a. True ■
■ sai Sampath Ghantasala .
b. False
The correct answer is: True

Q163.
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
a. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON
[Link] =
[Link];
b. SELECT [Link],[Link],[Link] FROM Item LEFT OUTER JOIN Vendor
ON [Link] =
[Link]; ■
c. SELECT [Link],[Link],[Link] FROM Item, Vendor WHERE
[Link] =
[Link];
d. SELECT [Link],[Link],[Link] FROM Item INNER JOIN Vendor ON
[Link] =
[Link] AND [Link] IS NULL;
The correct answer is: SELECT [Link],[Link],[Link] FROM Item
LEFT OUTER JOIN Vendor ON

[Link] = [Link];

Q164.
Consider Project table given below.
PROJECTID EMPLOYEEID
--------------- -------------------
Id
1
10
2
11
1
13
tif th
t SQL t t
t t di
l
th
j
tId hi h h
th
l
Identify the correct SQL statement to display the projectId which has more than one employee.
■ sai Sampath Ghantasala .
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);
The correct answer is: SELECT DISTINCT projectid FROM project WHERE projectid IN( SELECT
projectid FROM project GROUP

BY projectid HAVING COUNT(employeeId)>1);

Q165.
In HTML, Which of the following is used to merge columns in a table? Choose most appropriate option.
a. columnspan
b. columns-span
c. colspan ■
d. cspan
The correct answer is: colspan

Q166.
Mark 1.00 out of
1.00
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.
a. Both (i) and (ii)
b. Both (i) and (iii)
c. Both (ii) and (iii) ■
d. (i), (ii) and (iii)
The correct answer is: Both (ii) and (iii)

Question

36

Mark 1.00 out of

1.00

Identify the CORRECT SQL statement to create a Account table with composite primary key
(AccountNumber, CustomerId).

Choose most appropriate option

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), OpeningDate
Date, Balance

Number(10,2), CONSTRAINT Acc_Pkey PRIMARY KEY (AccountNumber,CustomerId)); ■

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

Q167.
Which of the following statement(s) is/are TRUE?
(ii) In a non-correlated(independent) subquery, the inner query (sub query) references the column from the
outer query (main
Mark 1.00 out of
1.00
(i) In a non-correlated(independent) subquery, the subquery is always executed only once.
query).
Choose most appropriate option
a. Only (ii)
b. Neither (i) nor (ii)
c. Only (i) ■
d. Both (i) and (ii)
The correct answer is: Only (i)

Q168.
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.
a. only a ■
b. only b
c. neither a nor b
d. both a and b
The correct answer is: only a


[Link]
l=1

21/25

6/10/2020

Quiz: Attempt review

■ ■ Prashant Raju Ghadge .

You might also like