• Post author:
  • Post category:Computer


961. Which function is used to position back from the end of file object?
A. Seekg
B. Seekp
C. Both seekg & seekp
D. None of the above

962. Which of the following function / types of function cannot have default parameters?
A. Member function of class
B. Main()
C. Member function of structure
D. Both B and C

963. Correct way to declare pure virtual function in a C++ class is
A. Virtual void foo() =0 ;
B. Void virtual foo()= { 0 }
C. Virtual void foo() {} = 0;
D. None of the above

964. What is the scope of the variable declared in the user defined function?
A. Whole program
B. Only inside the {} block
C. The main function
D. None of the above

965. Which of the following in Object Oriented Programming is supported by Function overloading and default arguments features of C++.
A. Inheritance
B. Polymorphism
C. Encapsulation
D. None of these

966. Which of the following statement is correct?
A. Only one parameter of a function can be a default parameter.
B. Minimum one parameter of a function must be a default parameter.
C. All the parameters of a function can be default parameters.
D. No parameter of a function can be default.

967. Which of the following function declaration using default arguments is incorrect?
A. int foo(int x, int y =5, int z=10)
B. int foo(int x=5, int y =10, int z)
C. int foo(int x=5, int y, int z=10)
D. All are correct

968. How are many minimum numbers of functions need to be presented in c++?
A. 0
B. 1
C. 2
D. 3

969. Unary scope resolution operator is denoted by
A. ! !
B. % %
C. :
D. : :

970. Which of the following function declaration is/are incorrect?
A. int Sum(int a, int b = 2, int c = 3);
B. int Sum(int a = 5, int b);
C. int Sum(int a = 0, int b, int c = 3);
D. Both B and C are incorrect.