601.What will be the value of ‘a’ and ‘b’ after executing the following statements?
- A = 3;
- b = a++;
- 3, 4
- 4, 4
- 3, 3
- 4, 3
602.Consider the following code segment. What will be the output of following code?
Int add Value (int *a {
int b = (*a + 2;
return b;
}
main (
int x =6;
Cout << x << “,”;
Cout << add Value (&x << “,”;
Cout << x;
}
- 6,8,6
- 6,6,8
- 6,8,8
- 6,6,6
603…….is used to trace the logic of the program and correct the logical errors?
- Compiler
- Editor
- Linker
- Debugger
604. The new and delete are whereas Malloc and free are?
- Functions, operators
- Classes, operators
- Operators, functions
- Operators, classes
605. The member functions can also access the private data members of a class?
- Non-member functions
- Friend functions
- Any function outside class
- None of the given options
606.Which situation would require the use of a non-member overloaded operator?
- The overloaded operator is an Assignment operator.
- The left most operand is an object of a class.
- The left operand is built-in data type.
- The operator returns a reference.
607.The stream insertion and stream extraction operators are already overloaded for
- User-defined data types
- Built-in data types
- User-defined and built-in data types
- None of the given options
608.If we define an identifier with the statement #define PI 3.1415926 and execution will be?
- cannot be replaced
- None of the given options
- Remain constant can be changed by some operation
- none
609. The Assignment operator is associative?
- right
- left
- binary
- unary
610.When dynamic memory allocation is made in C/C++, it is freed?
- Explicitly
- Implicitly
- Both explicitly and implicitly
- None of the given options
- int
- char
- none of the given options.
612.Which of the following function do NOT initialize the chunk of memory to all zero?
- C allocation function
- M allocation function
- Both malloc and c allocation
- None of the above
613. The function free memory allocation to?
- stack
- heap
- stack and heap
- None of the given options
614.Width is function of?
- Cin object
- Both Cin and Cout object
- Cout object
- None of the given option
615.Templates are not type safe?
- False
- true
616.A Matrix can be composed of int, floats or doubles Write a separate class to handle each?
- Use strings to store all types
- Use template
- None of the given options
617. If structure the block of statements is executed only?
- When the condition is false
- When it contains arithmetic operators
- When the condition is true
- When it contains logical operators
618.Header file: f stream.h includes the definition of the stream classes?
- Ifstream and fstream, cout
- if stream, of streams, of stream
- fstream, cin, cout
- None of the above
619.To access the data members of structure is used?
- dot operator
- B*operator
- U operator
- None of given.
620. eof( bad( , good( , clear( all are manipulators?
- Yes
- No
621.Which kind of functions can access private member variables of a class?
- Friend functions of the class
- Private member functions of the class
- Public member functions of the class
- Friend, private and public functions
622. The return type of operator function always will be void?
- True
- False
623. Friend function of a class is?
- Member function
- Non-member function
- Private function
- Public function
624. The Function implementation of friend function must be defined outside the class.
- True
- False
625.The l Way of Cin object is?
- File
- Disk
- Keyboard
- RAM
626.Which is correct way to initialize a variable x of int type with value 10?
- int x ; x = 10
- int x = 10;
- int x, x = 10;
- x = 10;
627.Consider the following code segment. What will be the output of the following program?
int func(int ;
int num = 10;
int main {int num ; num = 5 ;
cout << num;
cout << function num ;
}
int func(int x{
return num;
}
- 5, 5
- 10, 5
- 5, 10
- 10, 10
628.With template function, the compiler automatically detects the past data and generates a new copy of function using passed data.
- True
- False
629.What will be the syntax to declare two-dimensional array of float data type?
- float arr{2}{2};
- float arr[2][2] ;
- float arr[2,2] ;
- float [2][2] arr;
630.The first parameter of operator function for << operator,
- Must be passed by value
- Must be passed by reference
- Can be passed by value or reference
- Must be object of class
631.Heap is constantly changing in size.
- True
- False
632. For calling function, the arguments are assigned to the parameters ? .
left to right 295
- right to left
- no specific order is followed
- none of the given options.
633.Classes defined inside other classes are called
- classes
- looped
- nested
- overloaded
- none of the given options.
634.If we will define an identifier with the statement the value of PI?
- cannot be replaced
- None of the given options
- Remain constant
- can be changed by some operation
635.Which value is returned by the destructor of a class?
- A pointer to the class.
- An object of the class.
- A status code determining whether the class was destructed correctly
- Destructors do not return a value
636.Every class contains
- Constructor
- Destructor
- Both a constructor and a destructor
- None of the given options
637.A template function must have?
- One or more than one argument
- Only one argument
- Zero arguments
- None of the given options
638.Structured Query Language will be for?
- Databases Management
- Networks
- Writing Operating System
- none of the given options
639.When a call to a user-defined function finishes, the variable defined inside the function?
- True
- False
640.The precedence of an operator can be changed by operator overloading?
- True
- False
641. Matrix can be composed of different data types which is best way for this?
- Use templates
- Use strings to store all types
- None of the given options
642. The “delete” operator is used to return memory to free store
- True
- False
643.The variable of the pointer will be stored?
- Data
- Memory Address
- Data Type
- Values
644.All preprocessor directives will be started with the symbol?
- *
- +
- @
- #
645.The class1=class2; class1 will call the assignment operator function and class2 will be passed as an argument to function.
- True
- False
646.What is the sequence of event?
- Only block of memory is de allocated for objects
- Only destructor is called for objects
- Memory is de allocated first before calling destructor
- Destructor is called first before de allocating memory
647.The second parameter of operator functions for << and >> are objects of the
- False
- true
648To include code from the library in the program such as directive using this command.
- #include “iostream.h”
- include <iostream.h>
- include <iostream.
- #include <iostream.h>
649.The number 544.53 must be stored in data type?
- int
- short
- float
- char
650.A template function can have different type of arguments?
- True
- False