TCS Papers: Sample Questions 310 - 311 of 502

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

Question number: 310

» Languages » C & C Plus Plus



Which of the following is an abstract data type?


Choice (4) Response












  • Class is an abstract data type.

  • Classes are the most important feature of C++ that leads to Object Oriented programming.

  • Class is a user defined data type, which holds its own data members and member functions, which can be accessed and used by creating instance of that class.

  • Class name must start with an uppercase letter (although not mandatory).

  • If class name is made of more than one word, then first letter of each word must be in uppercase. Example, class Study, class StudyTonight etc

  • Classes contain data members and member functions, and the access of these data members and variable depends on the access specifiers (discussed in next section).

  • Classes in c++ are similar to structure in c- but class defaults to private access control, whereas structure defaults to public.

Define the class in c++

Define the Class in C++

Given the image is define the class in c++

Question number: 311

» Languages » Assembly Language

Essay Question▾

Describe in Detail

Describe the roles of CLR in. NET Framework.


CLR is common runtime environment for all. NET code irrespective of their programming language.

CLR provides an environment to execute. NET applications on target machines. It performs the following:

  • Automatic memory management:

    • Calls predefined functions of. NET framework to allocate and de-allocate memory of. NET objects.

    • Garbage Collection:

    • GC is used to prevent memory leaks or holes. Garbage collector of CLR automatically determines the best time to free the memory of an object.

    • Code Access Security:

    • CLR allows access to code to perform only those tasks for which it has permission. It also checks user’s permissions after authentication and configuration files of. NET applications.

    • JIT compilation of. NET code:

  • JIT compiler converts MSIL code to targeted machine code for execution.