TCS Placement: Sample Questions 439 - 440 of 502

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 439

Describe in Detail Essay▾

What is CRC?

Edit

Explanation

  • The cyclic redundancy check (CRC) detects errors in digital data using hash function.
  • Used in digital networks and storage devices such as hard disk drives.
  • Invented by W. Wesley Peterson in 1961 and further developed by the CCITT (Comite Consultatif International Telegraphique et Telephonique) .
  • Quite simple to implement in hardware and can be easily analyzed mathematically.
  • Based on binary division
  • Also called polynomial code checksum.
  • Given a k-bit frame or message, the transmitter generates an n-bit sequence, known as a frame check sequence (FCS) , so that the resulting frame, consisting of (k + n) bits, is exactly divisible by some predetermined number.
  • The receiver then divides the incoming frame by the same number and, if there is no remainder, assumes that there was no error.
Given the Image is Define the Cycle Redundancy Check
Given the Image is Define the CRC Example

Question 440

Question MCQ▾

Which of the following type of class allows only one object of it to be created?

Choices

Choice (4)

a.

Friend Class

b.

Virtual Class

c.

Abstract Class

d.

Singleton Class

Edit

Answer

d.

Explanation

  • Singleton pattern is a software design pattern that restricts the instantiation of a class to one object.
  • C ++ Singleton class using inheritance: In this example the base class enforces a singleton pattern.
  • Note that the function calls are static calls to their global names using the scope resolution operator.
  • The functions create () and instance () are defined as static functions in the class definitions.
  • The concept is sometimes generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects.
Given the Image is Define the Singleton Class in C ++