Aptitude [TCS Placement]: Sample Questions 137 - 138 of 174

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 137

Aptitude
Edit

Write in Short

Short Answer▾

What number should be subtracted from each term of the ratio 17: 24 so that it becomes equal to 1: 2?

Explanation

  • The given ration is 17: 24 and we require it to be 1: 2
  • Our task is to find the number which needs to be subtracted from numerator and denominator both such that it becomes 1: 2.
  • Let the required number be x. Then,

  • So, required number is 10.

Question 138

Aptitude
Edit

Write in Short

Short Answer▾

What is a class in C ++ ?

Explanation

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. The variables inside class definition are called as data members and the functions are called member functions. Its access is governed by the three access specifiers private, protected or public (by default access to members of a class is private) . A class (declared with keyword class) in C ++ differs from a structure (declared with keyword struct) as by default, members are private in a class while they are public in a structure. Instances of these data types are known as objects and can contain member variables, constants , member functions, and overloaded operators defined by the programmer.

Developed by: