Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.


Dear Students,

Quiz No. 4 of CS201 will be started from Monday, July 21, 2014 and ends at Tuesday, July 22, 2014.  
Quiz No. 4 will cover 28-32 lectures.  There will be 10 questions in the quiz.


Views: 7736

Replies to This Discussion

46. reference is a thing by which we can create _________of any data type.

copy
Synonym *
pointer


47. The syntax of declaration of a function that returns the reference to an integer is ___________.

int & myfunc() ; *
int myfunc();
int myfunc() &;
integer & myfunc();

48. new operator can be used for

only integer data type
only char and integer data types
integer , float, char and double data types *
dot operator


49. Care must be taken about the correct ______________ of operator while overloading. (Choose the most appropriate).

Semantic
Complexity
Both Semantic and Complexity
None of the given options


50. When an operator function is define as member function for a Unary operator then the number of argument it take is/are,

0 *
1
2
no argument

51. Friend functions are _____________.

unidirectional *
bidirectional


52. When an operator function is defined as member function for a binary Plus (+) operator then the number of argument it take is/are. Select correct option:

0
1
2 *
no argunet

53. If B is designated as friend of A, B can access A’s non-public members


B cannot access private member of A *
B cannot access protected member of A
A can access non-public members of B


54. To prevent dangling reference the functions returning reference should be used with _______

local variables
static *
arrays
static and global variables

55. _______ operators are the ones that require two operands on both sides of the operator


Double
two sided
binary *
none of the given


56. The members of a class declared without any keyword are __________ by default

protected
private *
public
constant

57. Memory allocated from heap or free store _____________________.

can be returned back to the system automatically
can be allocated to classes only
cannot be returned back unless freed explicitly using free and delete operators *


58. _____________data isn't accessible by non-member functions or outside classes

Public
Private *
Static

59. Globally Declared free function is available in _______________ header file.

conio.h
stlib.h *
iostream.h


60. In functions, that returns reference use ______________.

global or local variables
global or static variables *
ordinary variables
arra

61. Reference variables must _________________.

not be initialized after they are declared
be initialized after they are declared *


62. Look at the statement given below int & a; and tell what will happen ?

Compiler will compile successfully
Compiler will show a warning to you
Null value will be assigned to a
Compiler will generate an error: ‘a' declared as reference but not initialized *

63. When an operator function is define as member function for a Unary operator then the number of argument it take is/are,

zero *
one
two
N arguments

64. The destructor is used to

deallocate memory


65. When an operator function is define as member function for a Unary operator then the number of argument it take is/are,

zero *
one
two
n

66. We cannot increment ________________.

pointers
arrays
referneces *

67. int &i; It means that i is a _________to an integer.

pointer
reference
data type

68. Friend function declaration can go ___________________ the class


only within
in the memeber function of
anywhere in *
anwser


69. The friend keyword provides access

in one direction only
two directions
all clases
to the data members of the friend

70. operators are the ones that require two operands on both sides of the operator.

double
two sided
binary
none

71. References cannot be uninitialized. Because it is impossible to _________________

reinitialize a pointer
reinitialize a reference *
cast a pointer


72. Overloaded member operator function is always called by _______

class
object *
compiler
primiive data tyupe

73. If B is designated as friend of A, B can access A’s non-public members


B cannot access private member of A
B cannot access protected member of A
A can access non-public members of B
A cannot access B *

74. The function will return a reference to the global variable that exists throughout the program and thus there will be no danger of _______________.

garbage collection *
dangling reference
wastage of memory
system crash

75. The syntax of declaration of a function that returns the reference to an integer is ___________.


int & myfunc() ; *
int myfunc();
int myfunc() &;
integer & myfunc();

76. reference is a thing by which we can create _________of any data type.

copy
sysnonym *
pointer
nove
none


77. The difference between pointers and references is that _________________.

we cannot do arithmetic with pointers *
we can do arithmetic with pointers
we cannot reassign pointers
we can assign references

78. Operator overloading is to allow the same operator to be bound to more than one implementation, depending on the types of the _________.

compiler

oprands *
function names
applications

79. The members of a class declared without any keyword are __________ by default

protected
private *
public
constant

80. When an operator function is defined as member function for a binary Plus (+) operator then the number of argument it take is/are.

zero
opne
two

RSS

© 2021   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service