C++ MCQ-12

Q.1   The address of a variable temp of type float is          (A) *temp  (B) &temp     (C) float& temp  (D) float temp&     Ans: B   Q.2   What is the output of the following code           char symbol[3]={ΓÇÿaΓÇÖ,ΓÇÿbΓÇÖ,ΓÇÿcΓÇÖ};            for (int index=0; index<3; index++)         cout << symbol…

C++ MCQ-11

Q.31  Use of virtual functions implies (A)  overloading.  (B)  overriding. (C)  static binding.  (D)  dynamic binding. Ans: D   Q.32   this pointer      (A)  implicitly points to an object.    (B)  can be explicitly used in a class. (C)  can be used to return an object.   (D)  All of the above.    Ans: D…

C++ MCQ-10

Q.16   If we create a file by ΓÇÿifstreamΓÇÖ, then the default mode of the file is _________    (A)  ios :: out  (B)  ios :: in (C)  ios :: app  (D)  ios :: binary     Ans: B   Q.17   A variable defined within a block is visible        (A) from the point of…

C++ MCQ -9

Question 1: A function can not be overloaded only by its return type. a. True b. False   Question 2: A function can be overloaded with a different return type if it has all the parameters same. a. True b. False   Question 3: Inline functions involves some additional overhead in running time. a. True…

C++ MCQ -8

Question 1 Identify the correct statement a. Programmer can use comments to include short explanations within the source code itself. b. All lines beginning with two slash signs are considered comments. c. Comments very important effect on the behaviour of the program d. both   Question 2 The directives for the preprocessors begin with a.   …

C++ MCQ -7

Question 1 A variable is/are a.    String that varies during program execution b.    A portion of memory to store a determined value c.    Those numbers that are frequently required in programs d.    None of these   Question 2 Which of the following can not be used as identifiers? a.    Letters b.    Digits c.    Underscores d.   …

C++ MCQ -6

Question 1 In an assignment statement a=b; Which of the following statement is true? a.    The variable a and the variable b are equal. b.    The value of b is assigned to variable a but the later changes on variable b will not effect the value of variable a c.    The value of b is…

C++ MCQ -5

Question 1 Streams are a.       Abstraction to perform input and output operations in sequential media b.      Abstraction to perform input and output operations in direct access media c.       Objects  where a program can either insert or extract characters to and from it d.      Both a and c   Question 2 Which of the following is…

C++ MCQ -4

Question 1:   cin extraction stops execution as soon as it finds any blank space character   a.       true b.      false   Question 2:   Observe the following statements and decide what do they do.   string mystring;   getline(cin, mystring);   a.       reads a line of string from cin into mystring b.      reads a…

C++ MCQ -3

Question 1: Find out the error in following block of code. If (x = 100)     Cout << ΓÇ£x is 100ΓÇ¥; a.       100 should be enclosed in quotations b.      There is no semicolon at the end of first line c.       Equals to operator mistake d.      Variable x should not be inside quotation   Question 2:…