3i Infotech Papers: Sample Questions 1010 - 1011 of 1245

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

Question number: 1010

» Languages » Java

Appeared in Year: 2004

Short Answer Question▾

Write in Short

What is thread safe?


  • Thread safe program state behaves correctly when multiple simultaneous threads are using a resource.

  • Term can be applied to a section of code, a method, a class, a library, an application, etc.

    Code is not thread safe when it relies on state not being changed by another thread without guaranteeing that the state cannot be changed by another thread (guaranteeing exclusion). This can be done by:

    • Ensuring that concurrent threads use synchronized algorithms.

    • Confining the address of a shared object to one thread whenever an unsynchronized algorithm is active.

Question number: 1011

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

What is a class?


Understanding of different level, class and files.

Understanding of Different Level, Class and Files.

Understanding of different level, class and files.

  • Class is an object oriented programming concept.

  • Provides user defined data type, which holds data members and member functions.

  • It can accessed and used by creating an instance of that class.

  • A class is like blueprint for an object.

  • For example, consider the class of cars.

  • There may be many cars with different names and brand but all of them will shared common properties like 4 wheels, speed limit, mileage range etc.

  • The member functions determine the behaviour of the class- support operations on data held in the objects of the class.

Definition of a class:

Class class_name


Data Member;



Class member:

Data and functions are members.