C++ Based Questions
Description: C++ Based Questions Questions for BCA, MCA Entrance and Placement Papers Preparation and Practice | |
Number of Questions: 25 | |
Created by: Trisha Prashad | |
Tags: Computer BCA MCA Entrance Placement Papers IT Placement Papers Computer Basics |
How many arguments do destructors take?
A pure virtual function is a function that___________
When we pass arguments by reference, the formal arguments in the called function become aliases to the actual arguments in the calling function.
The last character in a string must be_________
A constructor that accepts no parameters is called the ___________
A _______________ function can access a class private data, even though it is not a member function of the class.
What is the result of the following statement? cout<<sizeof(float);
Which one of the following is a bitwise operator?
Which one of the following is a valid method for accessing the 3rd element of the array cust?
A function template definition begins with the keyword___________
A C++ array can store values of different data types.
A pointer is a variable for storing
What is the output of the following code? int a=0; for(int I=1;I<=a;I++) cout<<I;
What is the output of the following program?
#include<iostream.h>
void x(int a,int &b)
{
a=a+b;
a=a-b;
b=b-a;
}
void main()
{
int a=4,b=10;
x(a,b);
cout<<a<<b;
}
A constructor's name is same as __________
Which manipulator is used to specify the required field size for displaying an output value?
A datatype that allows different data types to be assigned to the same storage location is called_________.
If p and q are int type variables, what will be the result of the following expression? p % q Where p = - 16 and q = - 3
The following examples show that the class R id derived from classes P and Q. Which of them is/ are legal?
The wrapping up of data and functions into a single unit is called _____________
Can class objects be passed to a function?
What is the value of a & b after the following two statements are executed? int a=10; int b=a++ * ++a;
Which one of the following is overloading the function? int sum(int x,int y) {}
The default case is required in the switch selection structure.
Opening a file in ios::out mode also opens it in the __________ mode by default.