Computer Knowledge

Operating Systems

1,344 Questions

Test your computer knowledge with these questions on operating systems. The content covers various platforms including Unix, Linux, Windows, Android, and Macintosh. These questions are commonly asked in the computer knowledge sections of banking and government exams.

Unix emulatorsLinux distributionsAndroid software stackMacintosh operating systemsWindows OS versionsSymbian OS history

Operating Systems Questions

Multiple choice
  1. getSharedPreferences()

  2. getPreferences()

  3. Both (1) and (2)

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The getPreferences() method (called without a name parameter) creates a single preferences file specific to that activity. In contrast, getSharedPreferences() requires a name parameter and can be shared across different activities or components.

Multiple choice
  1. shared preferences

  2. internal storage

  3. external storage

  4. Both (1) and (2)

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

SharedPreferences and internal storage are private to each application and reside in the app's sandbox, so they require no special permissions. External storage does require permissions (though the exact permissions have changed across Android versions - WRITE_EXTERNAL_STORAGE, READ_EXTERNAL_STORAGE, or scoped storage in newer APIs).

Multiple choice
  1. is same for all devices

  2. may vary for different devices

  3. is Mnt/sdcard

  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The external storage directory path varies across devices - different manufacturers use different mount points (e.g., /mnt/sdcard, /sdcard, /storage/emulated/0). Developers should never hardcode paths and should always use the Environment.getExternalStorageDirectory() API or the Storage Access Framework for compatibility.

Multiple choice
  1. Intent intent = new Intent(MyActivity.this, MyOtherActivity); startActivity(intent);

  2. Intent intent = new Intent(MyActivity.this, MyOtherActivity.class); startActivity(intent);

  3. Intent intent = new Intent(MyActivity.class, MyOtherActivity.class); startActivity(intent);

  4. Intent intent = new Intent(this, MyOtherActivity.this); startActivity(intent);

  5. Intent intent = new Intent(MyOtherActivity.class); startActivity(intent);

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

After calling startActivity, the new activity, i.e. MyOtherActivity will be created and will move to the top of the activity stack.

Multiple choice
  1. a – 1; b – 5; c – 6; d – 7; e – 4; f – 3; g – 2

  2. a – 2; b – 5; c – 6; d – 7; e – 4; f – 3; g – 1

  3. a – 2; b – 4; c – 6; d – 7; e – 5; f – 3; g – 1

  4. None of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

.

Multiple choice
  1. Only A

  2. Only B

  3. Both A and B

  4. Neither A nor B

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The getCount() returns the total number of fragments in the pages and the getItem() returns the fragment at the specified position.This method will be called as the user scrolls through the pages.

Multiple choice
  1. doInBackground()

  2. doInFront()

  3. onPreExecute()

  4. onPostExecute()

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Following are the methods provided by AsyncTask: doInBackground(), onPreExecute(),onPostExecute(), onProgressUpdate(), isCancelled(). There is no method called doInFront() provided by AsyncTask.