What happens when the following code segment is Validated? int x = 20; Int main() { int x ; x = 10 ; return x ; }
Complies Successfully
Error Due to Duplicate Variables.
RunTime Error
Executes Successfully
What is the value of x when the below code segment is executed? int main() { int x , *z ; x = 10 ; z = &x ; x = 20 ; *z = 10 ; }
10
20
Compilation Error
RuntimeError
Which of the following statements are correct?
Relational and equality operators evaluate their operands to produce a true or false result.
The equality operators have the same level of precedence And associate right to left.
Relational operators all have the same level of precedence And associate right to left.
The precedence of relational operators is at a lower level Than the precedence of the equality operators.
Which of the following statements are correct about Function prototypes?
It resembles the header Of the function definition
It tells the compiler the Names of the parameters
It must be declared before its corresponding functions can be utilized
All the above are incorrect
Which of the following will occur when trying to validate the below code Segment? #define #define // GetSquareOfx function-prototype has the following defn // int GetSquareOfx(int) ; Int main() { int x =5 ; Cout << GetSquareOfx() ; return x ; }
Syntax Error
Linker Error
Runtme Error
No Error, It will be run successfully
Which of the following can be used to initialize a newly declared Variable from an existing variable?
Virtual Function
Namespaces
copy constructor
None of the Above
Which of the following are storage qualifiers in C++ ?
const
volatile
mutable
All the Above
Which of the following exists in C++?
virtual destructor
virtual constructor
Both A and B
A template can be instantiated by
Explicit Instantiation
Implicit instantiation
The member functions of a class can be defined outside the Class using
Extraction Operator
Insertion Operator
Scope resolution operator