What is the purpose of the Android 'SharedPreferences'? MCQ with Answer and Explanation

What is the purpose of the Android 'SharedPreferences'?
A. To store complex objects
B. To cache data temporarily
C. To share data between apps
D. To store primitive data in key-value pairs persistently
Answer: Option D
Solution (By JKSSB Mock Tests)
SharedPreferences is used for storing small amounts of simple data (booleans, strings, ints) for app settings.

Discuss this Question (0)

No comments yet. Be the first to start the discussion!

Practice More Operating Systems Questions

Question #1
What is the purpose of the Android 'WallpaperService'?
A. To set wallpapers
B. To create live wallpapers that run as a service
C. To manage wallpapers
D. To draw wallpapers

Correct Answer: Option B


Explanation:
WallpaperService is the base class for live wallpapers, enabling animations and interactive backgrounds.

This question belongs to: Computer Operating Systems
Question #2
What does 'Preemptive Multitasking' ensure across system workloads?
A. Only one single system task can execute per computer restart cycle.
B. The operating system slices execution chunks using hardware clock signals to interrupt running tasks fairly.
C. Applications determine exactly when they give up processor time voluntarily.
D. Hardware operates without an active process scheduler scheduler.

Correct Answer: Option B


Explanation:
Preemptive multitasking uses hardware timer interrupts to halt running tasks, preventing any single application from locking up the machine.

This question belongs to: Computer Operating Systems
Question #3
In a multiprocessor system, what is NUMA?
A. Network Unified Memory Architecture
B. New Unified Memory Access
C. Non-Universal Memory Architecture
D. Non-Uniform Memory Access, where memory access times vary based on the processor's location

Correct Answer: Option D


Explanation:
NUMA is a memory architecture where each processor has local memory, but accessing remote memory takes longer, affecting performance.

This question belongs to: Computer Operating Systems