wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

IT366_MAD_Prerequisite Exam

Total questions: 20

Worksheet time: 3600secs

Name
Class
Date
1.

class MyActivity

{

static Context context;

void onCreate(Context ctx)

{ context = ctx;

}}

What issue can arise?

a)

Faster access

b)

Compile-time error

c)

Memory leak

d)

Thread deadlock

2.

Which code practice can cause ANR in Android apps?

a)

Using ViewModel

b)

Network call in main thread

c)

Using RecyclerView

d)

Using ConstraintLayout

3.

int[] arr = new int[3];

System.out.println(arr[3]);

What happens?

a)

Prints 0

b)

Compilation error

c)

ArrayIndexOutOfBoundsException

d)

Logical error

4.

A food delivery app extends features from a base User class to Customer and DeliveryPartner. This is an example of:

a)

Polymorphism

b)

Encapsulation

c)

Inheritance

d)

Abstraction

5.

In a project, the same method login() behaves differently for Admin and User roles. Which concept is used?

a)

Inheritance

b)

Encapsulation

c)

Polymorphism

d)

Constructor

6.

Why do product-based companies emphasize debugging and optimization skills during interviews?

a)

Syntax can be memorized easily

b)

Efficient code reduces infrastructure cost

c)

Debugging reflects real-world problem-solving ability

d)

UI design is less important

7.

Replacing O(n2)O(n^2) algorithm with O(nlogn)O(n \log n) primarily results in:

a)

Faster compilation

b)

Lower execution time for large inputs

c)

Reduced memory usage always

d)

Simpler code syntax

8.

An app feature shows noticeable delay due to nested loops. Which improvement has the highest impact on performance?

a)

Rewriting code in a different language

b)

Reducing time complexity using efficient data structures

c)

Adding more hardware resources

d)

Increasing cache size only

9.

While debugging, a developer wants to trace the sequence of method calls that led to a crash. Which tool is most useful?

a)

Layout Inspector

b)

Call Stack analysis

c)

Resource Monitor

d)

APK Analyzer

10.

A destroyed Activity remains in memory due to a static reference. What long-term effect can this cause?

a)

Immediate compilation failure

b)

Gradual memory leak leading to app slowdown

c)

Faster object creation

d)

UI thread blocking

11.

A complex UI uses multiple nested layouts and suffers from slow rendering. Which refactoring strategy is most effective?

a)

Replace all layouts with FrameLayout

b)

Flatten hierarchy using ConstraintLayout

c)

Increase screen resolution

d)

Add caching to XML files

12.

class Test {

Test() {

this(10);

System.out.print("Default "); }

Test(int x) {

System.out.print("Param "); }}

public class Main {

public static void main(String[] args)

{ new Test(); }}

What is the output?

a)

Default Param

b)

Param Default

c)

Param

d)

Compilation error

13.

An app crashes when dividing a number by zero during execution. This is an example of:

a)

Syntax Error

b)

Compile-time Error

c)

Runtime Error

d)

Logical Error

14.

A mobile app occasionally becomes unresponsive during API calls. Which design decision best prevents this issue in production?

a)

Increase UI thread priority

b)

Execute network calls on background threads

c)

Reduce API response size only

d)

Delay UI rendering

15.

A developer restricts direct access to sensitive user data and exposes only controlled update methods. What is the primary benefit?

a)

Faster execution time

b)

Improved data integrity and security

c)

Reduced memory footprint

d)

Simplified UI logic

16.

A discount calculation logic is written as:

if price > 500:

discount = price * 0.10

else:

discount = price * 0.05

During sale, customers with price = 500 complain about wrong discount. What is the issue?

a)

Syntax error

b)

Runtime error

c)

Boundary condition logical error

d)

Data type mismatch

17.

A variable is declared but assigned an incompatible data type in a strongly typed language. At which stage is this issue detected?

a)

Lexical analysis due to token mismatch

b)

Syntax analysis due to grammar violation

c)

Semantic analysis due to type inconsistency

d)

Runtime due to memory allocation

18.

A shopping app calculates discounts correctly for most users but applies incorrect values during seasonal offers. The code runs without crashing. What best explains this issue?

a)

Conditional logic fails for boundary cases

b)

Compiler optimization removes required code

c)

Runtime exception is silently ignored

d)

UI rendering issue

19.

A fintech company redesigns its app so that new payment methods can be added without modifying existing code. Which design principle is primarily applied?

a)

Tight coupling through inheritance

b)

Abstraction using interfaces

c)

Encapsulation via private constructors

d)

Method overloading for flexibility

20.

A reference variable of type Payment points to objects of UPI, Card, and Wallet. At runtime, the correct pay() method is invoked. This behavior depends on:

a)

Compile-time binding based on reference type

b)

Runtime binding based on object type

c)

Static method resolution

d)

Constructor chaining