CS201 LIVE QUIZ FINAL TERM 23/24 February 20, 2023 by Dilawar 435 Created on February 20, 2023 By Dilawar CS201 live quiz final term 23/24 1 / 20 access the data members of structure _______ is used. dot operator (.) * operator à operator None of given 2 / 20 What does 5 ^ 6 , evaluate to in decimal where ‘^’ is Exclusive OR operator? 1 2 3 4 3 / 20 If constructor contains a return statement in its body then compiler will give __________ No error Syntax error Logical error Run time error 4 / 20 We can use New keyword inside of Class Constructor. True False 5 / 20 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 6 / 20 The declarator of Plus (+) member operator function is Class-Name operator + (Class-Name rhs) operator Class-Name + ( ) operator Class-Name + ( rhs) Class-Name operator + ( ) 7 / 20 Also Read: cs201 Friend function of a class is ______________ . Member function Non-member function Private function Public function 8 / 20 We can also create an array of user define data type. True False 9 / 20 What is the sequence of event(s) when deallocating memory using delete operator Only block of memory is deallocated for objects Only destructor is called for objects Memory is deallocated first before calling destructor Destructor is called first before deallocating memory 10 / 20 Deleting an array of objects without specifying [] brackets may lead to memory leak True False 11 / 20 Which of the following data type(s) can operate on modulus operator ‘%’? float, int float, double int char 12 / 20 Array is passed by value to a function by default. Also Read: CS602 FINAL TERM PAPERS + LIVE MCQ'S True false 13 / 20 With template function, the compiler automatically detects the passed data and generates a new copy of function using passed data. True false 14 / 20 What will be the correct syntax to initialize all elements of two-dimensional array to value 0? int arr[2][3] = {0,0} ; int arr[2][3] = {{0},{0}} ; int arr[2][3] = {0},{0} ; int arr[2][3] = {0} ; 15 / 20 When an operator function is define as member function then operand on the left side of operator must be an object. True False 16 / 20 break statement can be used outside a loop or switch statement. True False 17 / 20 The keyword_______ is used to return some value from a function. return break continue goto 18 / 20 Unary operator implemented as member function takes ____ arguments whereas non-member function takes _____ arguments. Also Read: MTH401 FINAL TERM PAPERS LIVE MCQ'S One, zero Zero, one One, two Two, one 19 / 20 Which of the following is true for the C++ statement given below? int &ref = val ; It creates a synonym for variable ‘val’ It creates an alias for variable ‘val’ It’s a new name for variable ‘val’ All of the given options 20 / 20 Every data member or function inside the structure is ___ by default whereas everything declared inside a class is ____ by default. private, public public, private private, protected public, protected Your score is The average score is 57% LinkedIn Facebook Twitter VKontakte 0% Restart quiz Related