C++ QuizsBy digitalcollegelibrary.com / 11 March 2024 In this C++ Language Quiz section - every Question Carries 2 Marks. If any question is wrong then two marks will be deducted. Note : Fill the Information Correctly to get Certified. C++ Quizs 1 / 60 C++ was originally developed by ??? Nicolas Wirth Donald Knuth Bjarne Stroustrup Ken Thompson 2 / 60 Which Operator is having right to left associativity in the following ? Array Subscripting Function Call Addition and Subtraction Type Cast 3 / 60 Which Operator is having the highest precedence ? equality shift unary postfix 4 / 60 What is this operator called ?: ? conditional relational casting operator none of the mentioned 5 / 60 Choose the correct Option.extern int i;int i; both 1 and 2 declare i 1 declares the variables i and 2 defines i 1 declares and defines i, 2 declares i 1 declares i, 2 declares and defines i 6 / 60 Pick the Right Option,Statement 1: A definition is also a declarationStatement 2: An identifier can be declared just once. Statement 1 is true, Statement 2 is false Statement 2 is true, Statement 1 is false Both are False Both are True 7 / 60 Which is the given statements are false,extern int func;extern int func2(int, int);int func2(int, int);extern class foo; 3 and 4 only 2 and 3 only only 4 2,3 and 4 8 / 60 Can two functions declare variables (non static) with the same name. No Yes Yes, But not a very efficient way to write programs. No, it gives a runtime error. 9 / 60 Which header file is used with input and output operations of C++ ? stdio.h stdio iostream None of the mentioned 10 / 60 How many indicators are available in C++ ? 4 3 2 1 11 / 60 What is the benefit of C++ input and output over c input and output ? Type Safety Exception Both a & b None of the mentioned 12 / 60 How many groups of output of operations are there in C++ ? 1 2 3 4 13 / 60 Pick out the correct objects about the instantiation of output stream ? cout cerr clog All of the mentioned 14 / 60 How Many types of output stream classes are there in C++ ? 1 2 3 4 15 / 60 Which of the following is not logical Operator ? & && || ! 16 / 60 Which of the following cannot be checked in a switch-case statement ? Character Integer Float enum 17 / 60 Which of the following cannot be checked in a switch-case statement ? Character Integer Float enum 18 / 60 Where does the execution of the Program starts ? user-defined function main function void function None of the Mentioned 19 / 60 What are the mandatory parts in function declaration? return type, function name return type, function name, parameters both a and b None of the mentioned 20 / 60 Which of the following is used to terminate the function declaration? : ) ; None of the Mentioned 21 / 60 How many max number of arguments can present in function in c99 compiler ? 99 90 102 127 22 / 60 Which is more effective while calling the functions ? call by value call by reference call by pointer None of the Mentioned 23 / 60 What is the scope of the variable declared in the user defined function ? whole Program only inside the { } block both a and b None of the Mentioned 24 / 60 How many minimum number of functions are need to be presented in C++ ? 0 1 2 3 25 / 60 Which of the following declares correctly an array ? int array[10]; int array; array{10}; array array[10]; 26 / 60 What is the index number of the last element of an array with 9 elements? 9 8 0 Programmer-defined 27 / 60 What is array ? An array is a series of elements of the same type in contiguous memory locations. An array is a series of element An array is a series of elements of the same type placed in non-contiguous memory locations. None of the Mentioned 28 / 60 Which of the following accesses the seventh element stored in array ? array[6]; array[7]; array(7); array; 29 / 60 Which of the following gives the memory address of the first element in array ? array[0]; array[1]; array(2); array; 30 / 60 Which of the Following is illegal ? int *ip; int i; double* dp=&i; string s, *sp = 0; int *pi = 0; 31 / 60 The data element in structure are also known as what ? objects member datas None of the Mentioned 32 / 60 What will be used when terminating a structure ? : } ; ;; 33 / 60 What will happen when the structure is declared ? it will not allocate any memory it will allocate the memory it will be declared and initialized None of the Mentioned 34 / 60 The Declaration of structure is also called as ? structure creator structure signifier structure specifier None of the Mentioned 35 / 60 Which of the following is properly defined structure ? struct {int a;} struct a_struct {int a;} struct a_struct int a; struct a_struct {int a;}; 36 / 60 Which of the following accesses a variable in structure *b ? b->var; b.var; b-var; b>var; 37 / 60 An object is Group of things Group of Funcitons Group of Data Members Group of Data Members and Functions 38 / 60 By default class members are Public Private Protected None of These 39 / 60 Class is a Variables Keyword Data Type Identifier 40 / 60 In Classes, C++ use which access specifiers Public, and Private Public, Private, Protected Public and Protected None of these 41 / 60 Which of the following is not member of class Static Functions Friend Functions Const Functions Virtual Functions 42 / 60 Which of the following term is used foe a function defined inside a class ? member variable member function class function classic function 43 / 60 Which of the following cannot be friend ? class object function operator function 44 / 60 Which of the following is correct about class and structure ? Class can have member functions while structure cannot. Class data members are public by default while that of structure are private. Pointer to structure or classes cannot be declared. Class data member are private by default while that of structure are public by default. 45 / 60 Which symbol is used to create multiple inheritance ? Dot Comma Dollar None of these 46 / 60 Which design Pattern benefit from the multiple inheritance ? Adapter and Observer Pattern Code Pattern Glue Pattern None of These 47 / 60 Which of the following permits function overloading in C++ ? Type Number of arguments Both of the Mentioned None of the Mentioned 48 / 60 In which of the following we cannot overload the function ? return function caller called function None of the Mentioned 49 / 60 Which of the following operators can not be overloaded ? . (Member Access or Dot Operator) ?: (Ternary and Conditional Operator) :: (Scope and Resolution Operator) .* (Pointer-to-member Operator) All of the Above 50 / 60 Which of the following operators are overloaded by default by the compiler ?Comparison Operator (==)Assignment Operator (=) Both 1 and 2 Only 1 Only 2 None of the Two 51 / 60 Which of the following keyword is used to overload an operator ? overload operator friend override 52 / 60 The binding of a function call at runtime is Static Binding Early Binding Late Binding Runtime Binding 53 / 60 Run time Polymorphism can be achieved with Virtual Base Class Container Class Virtual Function Both a and c 54 / 60 If a class contains pure virtual function, then it is termed as Virtual Class Sealed Class Pure Local Class Abstract Class 55 / 60 Which stream class is to only write on files ? ofstream ifstream fstream iostream 56 / 60 Which stream class is to only read from files ? ofstream ifstream fstream iostream 57 / 60 Which among following is used to open a file in Binary Mode ? ios:app ios:out ios:in ios::binary 58 / 60 Which keyword is used to handle the Exceptions ? try throw catch None of the Mentioned 59 / 60 Which Exception is thrown by dynamic_cast ? bad_cast bad_typeid bad_exception bas_alloc 60 / 60 What do you mean by "No Exception Specification" ? It Throws Nothing It can throw anything It can catch anything None of the Mentioned Your score isThe average score is 55% 0% Restart quiz
digitalcollegelibrary.com 17 March 2024 at 4:44 AM Thank You, and Check Your E-Mail Dude You get your certificate and Course. Reply
Yes, I’ve done the quiz
Thank You, and Check Your E-Mail Dude You get your certificate and Course.
I didn’t receive yet
Done.
IHAVE DONE MY QUIZ
Its good