Today's Discussion30/09/2017 : Topic : Programming Languages : 2nd Day

  
Q.By default class variables and member functions are

A. Public
B. Protected
C. Private
D. None

Answer: C





Q. Which of the following is not a type of inheritance?
A.    Multiple
B.    Multilevel
C.    Distributive
D.    Hierarchica

Answer: C




Q.How would you round off a value from 1.66 to 2.0?

A. ceil(1.66) 
B. floor(1.66)
C. roundup(1.66) 
D. roundto(1.66)

Answer:A

In a publicly derived subclass, the protected members of a superclass are:
(A) available with public visibility
(B) available with protected visibility
(C) available with private visibility
(D) not available

Answer;


Q. The recursive function defined by f(n)=1 if n=1 and f(n)=n+f(n-1) computes the value:
(A) n2                 (B) n!
(C) n(n+1)/2      (D) 2n

Answer: C

More Questions and Discussion...

Comments