TCS Papers: Sample Questions 419 - 420 of 502

Examrace Placement Series prepares you for the toughest placement exams to top companies.

Question number: 419

» Languages » C & C Plus Plus



Which of the following concepts of OOPS means exposing only necessary information to client?


Choice (4) Response






Data hiding


Data binding




  • Data hiding means exposing only necessary information to client

  • Data hiding hides the details of an object or function- providing data security and reducing complexity.

  • Data hiding allows the implementations to change internally without changing external interface.

  • Eg: consider our ATM. All we know is withdrawing the amount, but how it actually works and how the transaction occurs are totally hidden.

Data hiding in image

Data Hiding in Image

Given the image is define the data hiding

  • Data hiding is also used to hide information inside code after the code is broken down and hidden from the object.

  • Data hiding is about not leaking the implementation details to any user of the class.

Question number: 420

» Basic CS » Operating System

Short Answer Question▾

Write in Short

Differentiate between process and thread


Table of Differentiate Between Process and Thread

Table of Differentiate Between Process and Thread



An executing instance of a program is called a process.

A thread is a subset of the process.

It has its own copy of the data segment of the parent process.

It has direct access to the data segment of its process

Processes must use inter-process communication to communicate with sibling processes.

Threads can directly communicate with other threads of its process.

Processes have considerable overhead.

Threads have almost no overhead.

New processes require duplication of the parent process.

New threads are easily created.

Processes can only exercise control over child processes.

Threads can exercise considerable control over threads of the same process.

Any change in the parent process does not affect child processes.

Any change in the main thread may affect the behavior of the other threads of the process.

Run in separate memory spaces.

Run in shared memory spaces.

Most file descriptors are not shared.

It shares file descriptors.

There is no sharing of file system context.

It shares file system context.

It does not share signal handling.

It shares signal handling.

In multiple processes each process operates independently of the others.

One thread can read, write or change another thread’s data.

If one process is blocked, then no other process can execute until the first process is unblocked.

While one thread is blocked and waiting, a second thread in the same task can run.

Process is heavy weight or resource intensive.

Thread is light weight, taking lesser resources than a process.