Online Test for C++
- Find Error/Output in follwing code:
#include <iostream>
using namespace std;
void square (int *x) {
*x = (*x)++ * (*x);
}
void square (int *x, int *y) {
*x = (*x) * --(*y);
}
int main ( ) {
int number = 30;
square(&number, &number);
cout << number;
return 0;
}
910
920
870
900
- Which of the following is not a member of class?
Static functionFriend functionConst functionVirtual function
- Which of the following operator(s) cannot be overloaded?
. (Member Access or Dot operator)?: (Ternary or Conditional Operator ):: (Scope Resolution Operator)All of the above
- When a method in a subclass has the same name and type signatures as a method in the superclass, then the method in the subclass _____ the method in the super class.
OverloadsFriendshipsInheritsOverrides
- Which of the following operators can not be overloaded in C+ +?
*==+=::
- The static member variable is initialized to?
012-1
- What is pointer?
The variable that stores the reference to another variableThe variable that stores reference of garbage variableThe variable that stores the memory address of another variableA & C Both
- A __________ is a special method used to initialize the instance variable of a class.
Member functionDestructorConstructorStructure
- Which of the following storage classes have global visibility in C++?
RegisterStaticAutoExtern
- Super classes are also called Parent classes/Base classes.
TrueFalse
Also Exercise
Post Your Question
Social Sharing
Facebook
Search
Articles
Recently Added Jobs
Rajasthan High Court - Jodhpur Recruitment 2017 for Civil Judges
Last Date: 21 December, 2017
Last Date: 21 December, 2017
WBSEDCL Recruitment - 2017 for Office Executive
Last Date: 16 May, 2017
Last Date: 16 May, 2017
RECRUITMENT OF PROBATIONARY OFFICERS IN STATE BANK OF INDIA
Last Date: 06 March, 2017
Last Date: 06 March, 2017
UPSC Combined Medical Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015
UPSC Engineering Services Examination 2015
Last Date: 10 April, 2015
Last Date: 10 April, 2015