Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

MIDTERM EXAMINATION IN CTCC00603

Total questions: 50

Worksheet time: 38mins

Name
Class
Date
1.

What is Android Studio?

a)

A text editor

b)

The official IDE for Android development

c)

A compiler for Java only

d)

A mobile emulator

2.

Which programming language is primarily used in Android app development?

a)

C++

b)

Java

c)

Python

d)

Swift

3.

The res folder in an Android project contains:

a)

Source code files

b)

Build scripts

c)

Resources like layouts, images, and strings

d)

Database files

4.

Which file describes the essential information about an Android app?

a)

build.gradle

b)

strings.xml

c)

AndroidManifest.xml

d)

activity_main.xml

5.

To run an Android app on a physical device, what must be enabled?

a)

Safe Mode

b)

Bluetooth Debugging

c)

USB Debugging

d)

Cloud Sync

6.

Which Gradle file typically manages module-level dependencies?

a)

project build.gradle

b)

settings.gradle

c)

module build.gradle

d)

manifest.gradle

7.

The main activity of an Android app is usually named:

a)

FirstActivity

b)

MainActivity

c)

AppActivity

d)

StartActivity

8.

Log messages in Android are viewed in:

a)

Toast notifications

b)

Debugger pane

c)

Logcat pane

d)

Manifest file

9.

Which method is used to filter logcat messages?

a)

search()

b)

setFilter()

c)

Log.filter()

d)

Using tags

10.

Which Android Studio pane allows you to design UI visually?

a)

Logcat

b)

Layout Editor

c)

Gradle Console

d)

Project View

11.

What is the basic building block of Android UI?

a)

Activity

b)

View

c)

Intent

d)

Fragment

12.

Which class is used to display text on the screen?

a)

EditText

b)

Button

c)

TextView

d)

ImageView

13.

A ViewGroup is best described as:

a)

A subclass of TextView

b)

A container for other views

c)

A type of button

d)

A layout attribute

14.

Which layout arranges its children in rows or columns?

a)

RelativeLayout

b)

LinearLayout

c)

ConstraintLayout

d)

FrameLayout

15.

What is the root view in every layout hierarchy?

a)

Button

b)

TextView

c)

ViewGroup

d)

Constraint

16.

Which unit should be used for text size in Android?

a)

px

b)

in

c)

dp

d)

sp

17.

In XML, how do you set a resource string as a text value?

a)

android:text="Hello"

b)

android:text="@string/hello"

c)

android:text="@color/hello"

d)

android:text="@id/hello"

18.

Which layout is best for designing complex UI with constraints?

a)

ConstraintLayout

b)

GridLayout

c)

LinearLayout

d)

FrameLayout

19.

Which is NOT a property of a View?

a)

Visibility

b)

Interactivity

c)

Focus

d)

Package name

20.

Which resource folder is used for images?

a)

res/layout

b)

res/values

c)

res/drawable

d)

res/xml

21.

Which attribute defines how much space a view takes horizontally?

a)

android:layout_margin

b)

android:layout_gravity

c)

android:layout_width

d)

android:padding

22.

Which layout stacks views on top of each other?

a)

TableLayout

b)

FrameLayout

c)

GridLayout

d)

RelativeLayout

23.

What is the best practice for view hierarchies?

a)

Deep nesting

b)

Use as many custom views as possible

c)

Keep hierarchy flat and simple

d)

Avoid using layouts

24.

Which class allows a scrollable list of views?

a)

LinearLayout

b)

ScrollView

c)

FrameLayout

d)

GridView

25.

Which file stores string values for localization?

a)

strings.xml

b)

styles.xml

c)

dimens.xml

d)

colors.xml

26.

What does @+id/ mean in XML?

a)

Reference to a resource

b)

Create a new ID

c)

Add a new layout

d)

Assign a string

27.

To handle button clicks in XML, which attribute is used?

a)

android:onPress

b)

android:onClick

c)

android:handler

d)

android:action

28.

The unit dp stands for:

a)

Density-independent pixels

b)

Device pixels

c)

Data points

d)

Dynamic property

29.

Which view lets the user choose between multiple options?

a)

CheckBox

b)

RadioButton

c)

Switch

d)

SeekBar

30.

In Java, how do you programmatically create a TextView?

a)

new TextView()

b)

TextView myText = new TextView(this);

c)

TextView myText = new View();

d)

TextView myText = new Layout();

31.

What is an Activity in Android?

a)

A background service

b)

A UI component representing one screen

c)

A layout manager

d)

A fragment

32.

The first activity a user sees is called:

a)

Starting activity

b)

Main activity

c)

Root activity

d)

Primary activity

33.

How are activities declared to the Android system?

a)

In strings.xml

b)

In styles.xml

c)

In the Android manifest

d)

In build.gradle

34.

Which method connects an activity with its layout?

a)

onCreateLayout()

b)

setContentView()

c)

startActivity()

d)

getLayoutInflater()

35.

What is an Intent?

a)

A UI widget

b)

A description of an operation to perform

c)

A type of layout

d)

A method for debugging

36.

Which type of intent starts a specific activity?

a)

Explicit intent

b)

Implicit intent

c)

Internal intent

d)

External intent

37.

Which type of intent asks the system to find an appropriate app to handle the request?

a)

Explicit intent

b)

Implicit intent

c)

Broadcast intent

d)

Default intent

38.

Which method starts an activity using an intent?

a)

runActivity()

b)

startService()

c)

startActivity()

d)

openActivity()

39.

Which URI scheme is used to dial a phone number?

a)

http://

b)

tel:

c)

sms:

d)

call:

40.

How do you send multiple key-value pairs with an Intent?

a)

getExtras()

b)

putExtras()

c)

addBundle()

d)

setValues()

41.

Which method retrieves data from an Intent?

a)

getValues()

b)

getExtra()

c)

getData()

d)

fetchIntent()

42.

Which method is used when expecting a result back from another activity?

a)

startActivity()

b)

startActivityForResult()

c)

setResult()

d)

returnActivity()

43.

How is the returned data captured in the first activity?

a)

onCreate()

b)

onResultReceived()

c)

onActivityResult()

d)

getIntent()

44.

Which constant indicates a successful result?

a)

RESULT_SUCCESS

b)

RESULT_DONE

c)

RESULT_OK

d)

RESULT_FINISHED

45.

Android manages activities using what structure?

a)

Linked list

b)

Queue

c)

Back stack

d)

Tree

46.

Back navigation in Android is controlled by:

a)

Manifest settings

b)

Back stack

c)

Action bar

d)

Home button

47.

Up navigation is defined in:

a)

Android Studio

b)

Android manifest

c)

strings.xml

d)

build.gradle

48.

Which method puts data inside an intent as a string?

a)

putExtra(String name, String value)

b)

setExtra(String name, String value)

c)

addExtra(String name, String value)

d)

insertExtra(String name, String value)

49.

What does finish() do in an activity?

a)

Restarts the app

b)

Ends the current activity

c)

Saves data permanently

d)

Closes Android Studio

50.

Which navigation method uses the action bar to move to a parent activity?

a)

Back navigation

b)

Forward navigation

c)

Up navigation

d)

Deep link navigation