OOPS quiz (03/08/2023)

1.) What are the pillars of oops ?
a.) Encapsulation and polymorphism
b.) inheritance and abstraction
c.) both a and b
d.) Cyclic inheritance

2.) What are various method in oops ?
a.) instance method
b.) static method
c.) class method
d.) all of above

3.) What are the types of polymorphism?
a ) runtime polymorphism
b.) compile time polymorphism
c ) overloading
d ) overriding
e) all of above

4.) What is the tike complexity of following code ?
Def reverse( number) :
string = str(number)
return string[ : : -1]

number = int( input())
reverse (number)

a.) O(n)
b.) O(1)
c.) O(logn)
d.) None of above

1 Like

1)c
2)d
3)a. run time and b. compile time both a and b options are correct
4)b

2 Likes
  1. c option
    2)d option
    3)a&b option
    4)b option
1 Like
  1. c] both a and b
  2. d] all of above
  3. e] all of above
  4. b] O(1)
1 Like

Amazing guys , Keep practicing

1.c and b
2.d
3.e
4.b

1 Like

1).c
2).d
3).a and b
4).b

1 Like

1.) What are the pillars of oops ?
a.) Encapsulation and polymorphism
b.) inheritance and abstraction
c.) both a and b
d.) Cyclic inheritance
ANS → c

2.) What are various method in oops ?
a.) instance method
b.) static method
c.) class method
d.) all of above
ANS → d

3.) What are the types of polymorphism?
a ) runtime polymorphism
b.) compile time polymorphism
c ) overloading
d ) overriding
e) all of above
ANS → e

4.) What is the tike complexity of following code ?
Def reverse( number) :
string = str(number)
return string[ : : -1]
number = int( input())
reverse (number)

a.) O(n)
b.) O(1)
c.) O(logn)
d.) None of above

ANS → a

1 Like

Amazing guys keep it up

  1. (c)
  2. (d)
  3. (e)
  4. (b)
1 Like

Correct @bhavani.gangisheety

  1. c. both a and b
  2. d. all of above
  3. e. all of above
  4. a
1 Like
  1. (c)
  2. (d)
  3. (e)
  4. (a)
1 Like

correct @swethakunduru29

correct @aishukhairnar1998

  1. c option
  2. d option
  3. e option
1 Like

1).c
2).d
3).a and b
4).b

1 Like

correct @deepakmoon143

correct @saudagarganesh9