3i Infotech Papers: Sample Questions 894 - 896 of 1245

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

Question number: 894

» Languages » C & C Plus Plus

Essay Question▾

Describe in Detail

Which bit wise operator is suitable for checking whether a particular bit is on or off?

Explanation

Define Logical operator

Define Logical Operator

Define Logical operator

  • Operator is suitable for checking weather particular bit is on or off.

  • For example,

  • Suppose in byte has value 10101101.

  • We check whether bit number 3 is ON (1) or OFF (0).

  • For checking bit number 3, the second operand for AND operation is binary 00001000, which is equal to 8 in decimal.

  • Since the resulting value is 8, that is value of the second operand the bit was ON

  • If the answer was 0, the bit number 3 in the resulting bit pattern would have evaluated 0 and complete bit pattern have 00000000.

Question number: 895

» Languages » Java

Short Answer Question▾

Write in Short

Does a class inherit the constructors of it’s super class?

Explanation

  • No constructor of the superclass is not inherited.

  • Access to super class parameterized constructors is done through use of super keyword.

  • Constructors are special functions in that are not inherited by the subclass.

  • One of the main reasons is to prevent overriding of superclass constructors, which would be possible if they were inherited.

  • Overriding the superclasses constructor would erode encapsulation in the language.

Question number: 896

» Languages » Java

MCQ▾

Question

What was the first name given to Java Programming Language?

Choices

Choice (4) Response

a.

Small Talk

b.

Oak

c.

Oak-Java

d.

Question does not provide sufficient data or is vague

Answer

c.

Explanation

  • Oak-java was the first name given to java Programming Language.

  • Gosling attempted to modify and extend C++ but soon abandoned that in favour of creating a new platform called Green and an entirely new language.

  • This was called Oak, after the tree that stood just outside his office- we have Oak language, the libraries, and the hardware.

  • Their first attempt, demonstrated on September 3,1992, focused on building a PDA device named Star with graphical interface and a smart agent called “Duke” to assist the user.

  • Oak was renamed Java in 1994 after a trademark search revealed that Oak was used by Oak Technology.

  • Java was finally shipped in 1996