Programming Languages : 2nd Day Discussion
Q. Which data type is used to represent the absence of parameters? a) int b) short c) void d) float Answer : C Q. Minimum number of temporary variable needed to swap the contents of 2 variables is: a. 1 b. 2 c. 3 d. 0 Answer : D Explanation : a=a+b b=a-b a=a-b Q. Which of the following also known as an instance of a class? A. Friend Functions B. Member Variables C. Member Functions D. Object Answer : D Q. Encapsulation is known as (A) Information hiding (B) Data abstraction (C) Data about data (D) None of these Answer : A Encapsulation means “we have enclosed all the characteristics of an object in the object itself”. Encapsulation and information hiding are much related concepts (information hiding is achieved using Encapsulation). We have seen in previous lecture that object characteristics include data members and behavior of the object in the form of functions. So we can say that Data and Behavior are tightly c...