Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

MARVELS QUIZ MCQS2

Question 1
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
A class Student and its subclass Hostler both have a method payFees() as part of their class
definition. What will the following code do?
Hostler h = new Hostler() ;
h.payFees();

Select one:
a. The payFees() method defined in Hostler will be called.
b. The payFees() method defined in Student will be called.
c. Overloading will be used to pick which payFees() is called.
d. The compiler will complain that payFees() has been defined twice.
Feedback

The correct answer is: The payFees() method defined in Hostler will be called.

Question 2
Correct
Mark 1.00 out of 1.00

Flag question

Question text

Method Overriding shows static polymorphism.


Select one:
True
False
Feedback

The correct answer is 'False'.

Question 3
Incorrect
MARVELS QUIZ MCQS2
Mark 0.00 out of 1.00

Flag question

Question text

Nullpointer Exception and Logical Exception are not Exceptions in Java.


Select one:
True
False
Feedback

The correct answer is 'True'.

Question 4
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Predict the output:
public class Topper
{
public static void check() {
this.display();
}
public static void display() {
System.out.println("Welcome to Java");
}
public static void main(String args []) {
check();
}
}

Select one:
a. Welcome to Java
b. An exception is raised stating that the variable this can only be used within an instance
c. Runtime error
d. Compile time error
Feedback
MARVELS QUIZ MCQS2
The correct answer is: Compile time error

Question 5
Correct
Mark 1.00 out of 1.00

Flag question

Question text
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).
Select one:
a. throws Exception
b. new Exception
c. Don't need to specify anything
d. throw Exception
Feedback
The correct answer is: throws Exception

Question 6
Correct
Mark 1.00 out of 1.00

Flag question

Question text
What will happen if you attempt to compile and run the following code?
Integer i=new Integer(15);
Long l=new Long (10);
System.out.println(i + l);
int check=1;
System.out.println(check + i);

Select one:
a. 25
16
b. 15
16
MARVELS QUIZ MCQS2

c. 25
26
d. Error: Can't convert java lang Integer
Feedback
The correct answer is: 25
16

Question 7
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Predict the output:
int arr[];
int i = 0;
arr = new int[5];
while (i < 5)
{
arr[i] = 10;
i = i + 1;
}
System.out.println(arr[4]);

Select one:
a. unknown
b. 3
c. 0
d. 10
Feedback

The correct answer is: 10

Question 8
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
MARVELS QUIZ MCQS2
String str= new String("Hello World");

Which of the following calls are valid?


(A) str.trim()
(B) str.replace('o', 'A')
(C) str.substring(3)
(D) str.toUppercase()
(E) str.setCharAt(1,'A')
(F) str.append("xyz")

Select one:
a. (A), (B), (C) & (D)
b. (A), (B) & (C)
c. (A), (C), (D) & (E)
d. (C), (D) & (E)
e. (D) & (E)
Feedback
The correct answer is: (A), (B) & (C)

Question 9
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Predict the output:
interface X
{
void display();
}
interface Y extends X
{
void print();
}

class Employee implements Y


{
public void display() {
System.out.print("John ");
}
public void print() {
System.out.print("Mathew");
}
}

public class TestMain {

public static void main(String[] args) {


MARVELS QUIZ MCQS2

Employee e = new Employee();


e.display();
e.print();
}
}

Select one:
a. John Mathew
b. John
c. Complie Time Error
d. Mathew
Feedback

The correct answer is: John Mathew

Question 10
Correct
Mark 1.00 out of 1.00

Flag question

Question text

How do we change the state of an object ?


Select one:
a. Using object's property
b. Using Object's default methods
c. Using object's behavior
d. Using class name
Feedback

The correct answer is: Using object's behavior

Question 11
Correct
Mark 1.00 out of 1.00

Flag question

Question text
MARVELS QUIZ MCQS2
What is the term used to define the values that are common across all instances of a class ?
Select one:
a. Attribute
b. Interface
c. Property
d. Static
Feedback

The correct answer is: Static

Question 12
Correct
Mark 1.00 out of 1.00

Flag question

Question text
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 flight perfomance, fuel consumption, service intervals, etc
Select one:
a. Encapsulation
b. Polymorphism
c. Abstraction
d. Typing
Feedback

The correct answer is: Abstraction

Question 13
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Select the true statements about Use Case diagram ?
Select one or more:
MARVELS QUIZ MCQS2

a. Captures dynamic aspects of the system


b. Captures attributes and methods
c. Depicts the boundry of the system
d. Captures users of the system
Feedback
The correct answers are: Depicts the boundry of the system, Captures users of the system,
Captures dynamic aspects of the system

Question 14
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text

Select the benefits of OOP ?


Select one or more:
a. Ease of design
b. Testing
c. code deployment
d. Resuability
Feedback

The correct answers are: Ease of design, Resuability

Question 15
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Select the multiplicity between passenger and train reservation ticket? What is the multiplicity of
passenger ?
Select one:
a. 1..*
b. 1
MARVELS QUIZ MCQS2

c. 0..*
d. 0..1
Feedback
The correct answer is: 1

Question 16
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
The properties of good program must have_____
Select one:
a. Modules tightly connected
b.
Fault Prevention and fault tolerance
c.
Poor Design for change
d. Component dependence
Feedback
Your answer is incorrect.
The correct answer is:
Fault Prevention and fault tolerance

Question 17
Correct
Mark 1.00 out of 1.00

Flag question

Question text

A program is said to be_______, if it optimizes the amount of memory and processing time.
Select one:
a. robust
b. modular
MARVELS QUIZ MCQS2

c. efficient
d. documented
Feedback
The correct answer is: efficient

Question 18
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Steve is learning to draw a flowchart to calculate the volume of a cuboid. Which of the options
given below would fit into the process section of the flow chart?
Select one:
a. Volume=l*b*h
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. check if l,b,h have positive value
Feedback
Your answer is correct.
The correct answer is: Volume=l*b*h

Question 19
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Carefully read the question and answer accordingly. Which data structure is said to be linear
data structure?
Select one:
a. Graphs
b. Arrays
MARVELS QUIZ MCQS2

c. None of the listed options


d. Tree
Feedback
The correct answer is: Arrays

Question 20
Correct
Mark 1.00 out of 1.00

Flag question

Question text
Carefully read the question and answer accordingly. What operation is processed for each
element in the list
Select one:
a. Sorting
b. Traversal
c. Merging
d. Inserting
Feedback

The correct answer is: Traversal

Question 21
Correct
Mark 1.00 out of 1.00

Flag question

Question text

Which algorithm is the best sorting method in-place with no quadratic worst-case scenarios?
Select one:
a. Bubble Sort
b. Heap Sort
c. Quick Sort
d. Selection Sort
Feedback
MARVELS QUIZ MCQS2
The correct answer is: Heap Sort

Question 22
Correct
Mark 1.00 out of 1.00

Flag question

Question text
What is the time complexity of below function?
void cal_fun(int m,int a[])
{
int i=0,j=0;
for(;i<m;++i)
while(j<m && a[i] < a[j])
j++;
<="" a[j])="" j++;="" }="" pre="" style="box-sizing: border-box;">
}
Select one:
a. O(n2)
b. O(1)
c. O(nlogn)
d. O(n)
Feedback

The correct answer is: O(n)

Question 23
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text

Carefully read the question and answer accordingly. Which of the following options are correct?
Select one or more:
a. A tree which does not have any node other than root node has depth of zero.
MARVELS QUIZ MCQS2

b. None of the options.


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

Question 24
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text

State true or false.


Configuration management is important only during the coding phase
Select one:
True
False
Feedback

The correct answer is 'False'.

Question 25
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text

Choose the correct option where waterfall model is not suited.


Select one:
a. Complex Projects (that has more number of functionalities)
b. Projects with stable requirements
c. Simple Projects (that has less number of functionalities)
d. Projects with frequent changes
Feedback
MARVELS QUIZ MCQS2
The correct answer is: Projects with frequent changes

Question 26
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Go-Will department store wants to automate few of its functionalities.From the below options
identify the functional requirements of Go-Will department store
Select one or more:
a. Response for each button click should be within 3 seconds
b. System should be up and running 24/7
c. Generate Bill for the purchased Items
d. Add Product Details
Feedback

The correct answers are: Generate Bill for the purchased Items, Add Product Details

Question 27
Incorrect
Mark 0.00 out of 1.00

Flag question

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

Question 28
Correct
Mark 1.00 out of 1.00

Flag question

Question text
State true or false. Black box testers can proceed with generating the test cases immediately
after the SRS is freezed in the analysis phase
Select one:
True
False
Feedback

The correct answer is 'True'.

Question 29
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Predict the output of the below SQL Statement
SELECT branch_name, COUNT(DISTINCT customer_name) FROM Account GROUP BY
branch_id;
Select one:
a. The query is syntactically wrong
b. The query contains one or more wrongly named clauses.
c. The query produces correct answer
d. The query produces wrong answer
Feedback

The correct answer is: The query is syntactically wrong

Question 30
Correct
Mark 1.00 out of 1.00
MARVELS QUIZ MCQS2

Flag question

Question text
The EMPLOYEE table has following structure
EMPID NUMBER (5), ENAME VARCHAR2 (50), DEPT VARCHAR2 (15)
Which of the below options would display all employee name from employee table who are
working in the same department as “Rajesh Ahuja”.
Select one:
a. Select EName from employee where dept = (Select dept from employee where Ename =
‘Rajesh Ahuja’);
b. Select * from employee where dept = (Select * from employee where Ename = ‘Rajesh
Ahuja’);
c. Select * from employee where dept = (Select dept from employee where Ename = ‘Rajesh
Ahuja’);
d. Select EName from employee where dept = (Select * from employee where Ename = ‘Rajesh
Ahuja’);
Feedback
The correct answer is: Select EName from employee where dept = (Select dept from employee
where Ename = ‘Rajesh Ahuja’);

Question 31
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
In SQL, which command is used to add new rows to a table?
Select one:
a. Append
b. Insert
c. Add row
d. Alter Table
Feedback
The correct answer is: Insert
MARVELS QUIZ MCQS2

Question 32
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
The following SQL statement exhibits which type of join?
Select customer.customer_id, customer_ name, order_id from customer, order where customer.
Customer_id = order. Customer_id;
Select one:
a. Natural join
b. Outer join
c. Cartesian join
d. Equi-join
Feedback
The correct answer is: Equi-join

Question 33
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text

What options can be avoided by storing data in centralized repository?


Select one or more:
a. Increase data duplication
b. Replication of data in multiple files
c. Reduce data redundancy
d. Storing data in multiple files
Feedback

The correct answers are: Reduce data redundancy, Storing data in multiple files

Question 34
Correct
MARVELS QUIZ MCQS2
Mark 1.00 out of 1.00

Flag question

Question text
In order to grant ‘SELECT’ on Employee table to User1, which one of following statement is
correct?
Select one:
a. Grant select from Employee to User1;
b. Grant select to Employee on User1;
c. Grant select on Employee to User1;
d. Grant select to Employee to User1;
Feedback
The correct answer is: Grant select on Employee to User1;

Question 35
Correct
Mark 1.00 out of 1.00

Flag question

Question text

Which of the following should be used to print lines containing ‘manager’ in emp.lst?
Select one:
a. awk ‘manager { print }’ emp.lst
b. awk ‘/manager { print }’ emp.lst
c. awk ‘/manager/ { print } emp.lst
d. awk ‘/manager/ { print }’ emp.lst
Feedback
The correct answer is: awk ‘/manager/ { print }’ emp.lst

Question 36
Incorrect
Mark 0.00 out of 1.00
MARVELS QUIZ MCQS2

Flag question

Question text
Which command in UNIX displays the list of all the users who have logged into the Unix server?

Select one:
a. Who am i
b. List users
c. users
d. Who
Feedback
The correct answer is: Who

Question 37
Correct
Mark 1.00 out of 1.00

Flag question

Question text

Which of the following is not a feature of UNIX?


Select one:
a. Multiuser
b. User friendly
c. Multitasking
d. Portability
Feedback
The correct answer is: User friendly

Question 38
Correct
Mark 1.00 out of 1.00
MARVELS QUIZ MCQS2

Flag question

Question text
What does the below Unix command accomplish?
$ vi sample
Select one:
a. open file if it exists else creates a new file
b. open file named sample
c. edit file named sample
d. delete a file named sample
Feedback

The correct answer is: open file if it exists else creates a new file

Question 39
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
What does the below Unix command accomplish?
$ sed 's/ABC/ZYX/' file.txt
Select one:
a. Only matches and displays the occurrence of the pattern
b. Replaces first occurrence in every line ‘ABC’ with 'ZYX'
c. Replaces all occurrences 'ABC' with 'ZYX'
d. Replaces only first occurrence of ‘ABC’ with 'ZYX'
Feedback
The correct answer is: Replaces first occurrence in every line ‘ABC’ with 'ZYX'

Question 40
Correct
Mark 1.00 out of 1.00
MARVELS QUIZ MCQS2

Flag question

Question text
Which of the following layer acts as an interface between user and kernel ?

Select one:
a. Hardware
b. System Calls
c. Kernel
d. Shell
Feedback

The correct answer is: Shell

Question 41
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text
Identify the selector that should be used if we want to select elements with no child elements

Select one:
a. :leaf-element
b. :no-siblings
c. :empty
d. :nobranch
Feedback
The correct answer is: :empty

Question 42
Incorrect
Mark 0.00 out of 1.00
MARVELS QUIZ MCQS2

Flag question

Question text
In CSS, styles are written under _____ tag which is the child of _____ tag
Select one or more:
a. head
b. body
c. script
d. style
Feedback
The correct answers are: head, style

Question 43
Correct
Mark 1.00 out of 1.00

Flag question

Question text

Javascript is included in an HTML file with the help of _____ tag


Select one:
a. script
b. body
c. style
d. head
Feedback

The correct answer is: script

Question 44
Correct
Mark 1.00 out of 1.00
MARVELS QUIZ MCQS2

Flag question

Question text
In CSS to define style for a unique element then which css selector should be used?
Select one:
a. id
b. name
c. text
d. class
Feedback
The correct answer is: id

Question 45
Correct
Mark 1.00 out of 1.00

Flag question

Question text

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


Select one:
a. a {text-decoration:none;}
b. a {text-style: no-underline;}
c. a {text: no-underline;}
d. a {text-decoration: no-underline;}
Feedback

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

Question 46
Incorrect
Mark 0.00 out of 1.00
MARVELS QUIZ MCQS2

Flag question

Question text
What would be the code to set all elements under the tag to green
Select one:
a. $(“p”).layout(“background-color”,”green”);
b. $(“p”).manipulate(“background-color”,”green”);
c. $(“p”).style(“background-color”,”green”);
d. $(“p”).css(“background-color”,”green”);
Feedback
The correct answer is: $(“p”).css(“background-color”,”green”);

Question 47
Correct
Mark 1.00 out of 1.00

Flag question

Question text

Find out the well-formed xml file


Select one:
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>
MARVELS QUIZ MCQS2
<pages>100</pages>
<price>$300.00<price>
<book>
Feedback
The correct answer is: <book category="Web">
<bname>XML Tutorials</bname>
<pages>100</pages>
<price>$300.00</price>
</book>

Question 48
Incorrect
Mark 0.00 out of 1.00

Flag question

Question text

Which is the correct way to define an empty book element

Select one:
a. <book>empty</book>
b. <book>NULL</book>
c. <book>
d. <book></book>
Feedback

The correct answer is: <book></book>

Question 49
Correct
Mark 1.00 out of 1.00

Flag question

Question text

Which of the following fragments of XML are well-formed


Select one:
a. <?xml encoding="Master"?>
b. <?xml?>
MARVELS QUIZ MCQS2

c. <?xml encoding="JIS" version="File1"?>


d. <?xml version="1.0"?>
Feedback
The correct answer is: <?xml version="1.0"?>

Question 50
Correct
Mark 1.00 out of 1.00

Flag question

Question text
What is the correct way of declaring an XML namespace?
Select one:
a. xmlns:prefix,"URI"
b. xmlns:prefix="URI"
c. xmlns:prefix=URI
d. xmlns-prefix="URI"
Feedback

The correct answer is: xmlns:prefix="URI"

You might also like