• ( 1 ) Function overloading

    • 1) Involves several function definitions under one name, but different argument types
    • 2) Implements polymorphism
    • 3) Reduces the number of comparison in a program, hence increases the execution speed of a program
    • 4) All of the above
    • Discussion in forum
      Answer : 4) All of the above
      Solution :








      discussion


      Answer : 4) All of the above

    • ( 2 ) What is function overloading?

    • 1) Calling function from another function
    • 2) More than one function with same name
    • 3) Calling function from itself
    • 4) No such function in C++
    • Discussion in forum
      Answer : 2) More than one function with same name
      Solution :








      discussion


      Answer : 2) More than one function with same name

    • ( 3 ) When our function doesn't need to return anything means what we will as parameter in function?

    • 1) void
    • 2) blank space
    • 3) both 1 & 2
    • 4) None of these
    • Discussion in forum
      Answer : 2) blank space
      Solution :








      discussion


      Answer : 2) blank space

    • ( 4 ) Overloading of constructor function

    • 1) is similar to function overloading
    • 2) different from an overloaded function as it can't return a value
    • 3) not permitted in C++
    • 4) None of these
    • Discussion in forum
      Answer : 2) different from an overloaded function as it can't return a value
      Solution :








      discussion


      Answer : 2) different from an overloaded function as it can't return a value

    • ( 5 ) Overloaded function

    • 1) are a group of functions,with the same value
    • 2) all have the same number and types of arguments
    • 3) make life simpler for programmers
    • 4) may fail unexpectedly due to stress
    • Discussion in forum
      Answer : 3) make life simpler for programmers
      Solution :








      discussion


      Answer : 3) make life simpler for programmers

    • ( 6 ) what is the difference bertween overloaded functions and overridden functions?

    • 1) Overloading is a dynamic or run-time binding and Overriding is static or compile-time binding
    • 2) Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called an overloaded function
    • 3) Overloading is a static or compile -time binding and Overriding is dynamic or run-time binding
    • 4) Redefining a functon in a friend class is called function overloading while redefining a function in a derived class is called as overridden function
    • Discussion in forum
      Answer : 2) Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called an overloaded function
      Solution :








      discussion


      Answer : 2) Redefining a function in a friend class is called function overriding while Redefining a function in a derived class is called an overloaded function

    • ( 7 ) Function overloading is a feature by which we can achieve ____

    • 1) Polymorphism
    • 2) Encapsulation
    • 3) Classes
    • 4) Abstraction
    • Discussion in forum
      Answer : 1) Polymorphism
      Solution :








      discussion


      Answer : 1) Polymorphism

    • ( 8 ) Overloading the function operator

    • 1) requires a class with an overloaded operator.
    • 2) requires a class with an overloaded [ ] operator.
    • 3) allows you to create objects that act syntactically like functions.
    • 4) usually make use of a constructor that takes arguments.
    • Discussion in forum
      Answer : 1) requires a class with an overloaded operator.
      Solution :








      discussion


      Answer : 1) requires a class with an overloaded operator.

    • ( 9 ) Function template can be overloaded with

    • 1) other function of its name
    • 2) other template function of same name
    • 3) both 1 & 2
    • 4) None of these
    • Discussion in forum
      Answer : 3) both 1 & 2
      Solution :








      discussion


      Answer : 3) both 1 & 2

    • ( 10 ) Overload function in C++

    • 1) a group functionwith the same name
    • 2) all have the samenumber and type of arguments
    • 3) functions withsame name and samenumber and type of arguments
    • 4) All of the above
    • Discussion in forum
      Answer : 1) a group functionwith the same name
      Solution :








      discussion


      Answer : 1) a group functionwith the same name





Top