_______ operators are the ones that require two operands on both sides of the operator.
Double
Two sided
Binary
None of the given options
--
--
Please visit www.vuzs.net For Current & Old Papers, Quizzes, Assignments and study material.
--
You received this message because you are subscribed to the Google
Groups "vuZs" group.
--
To post a new message on this group, send email to vu...@googlegroups.com
--
Message Posting Rules: http://groups.google.com/group/vuZs/web/vuzs-basic-rules-for-posting-messages
--
To unsubscribe from this group, send email to vuZs+uns...@googlegroups.com
--
For more info, visit the main page of vuZs group at http://groups.google.com/group/vuZs
--
To join this group Send blank email from your virtual university email address to
vuZs+su...@googlegroups.com
or visit
http://groups.google.com/group/vuZs/subscribe?hl=en
--
Once we have defined a symbolic constant value using #define, that value _________during program execution
Can be changed
Cannot be changed
Varies
Become zero
Look at the program code and identify the error. 1 #include 2 #define PI 3.1415926; // Defining PI 3 main() { 4 int radius = 5; 5 cout << "Area of circle with radius " << radius << " = " << PI * radius * radius; }
(a)It will be compiled successfully and will not generate
(b)It will be compiled and returns nothing
©Error exists in line number. Semi colon is not allow
(d)The value of PI cannot be defined in the beginningThe cs201 subjective will be from past papers.From where you have prepared the subjective
An instance of a class is called ________________.
Structure
Data type
Object
Member function
If you create a header file of your own and you save it in the “Headerfiles” folder which is located on the current working directory then you must enclose your header file within _________
Braces
Quotation marks
#sign
Angle brackets
The memory allocation in C++ is carried out with the help of _______________.
NULL pointer
New operator
Dot operator
+operator
A reference cannot be _____________.
1
Zero
NULL
Integer
The object code of our program is combined with the _______________
Source program
Machine code of the operating system
Object code of the library functions
With header files
A pointer with value NULL is defined in the header files _____________and ___________.
Conio.h, iostream.h
Conio.c ,getche ()
Stdlib.h ,stddef.h
Process.h, stdi.h
new operator can be used for ______________.
Only integer data type
Only char and integer data types
Integer,float,char and double data types
Dot operator
The function calloc takes two arguments, first argument is the ______________ and the second argument is the ____________.
Required space in terms of numbers, size of space
Size of space,number of bytes
Space in term of string character,size of list
Size of array ,number of bytes
free function is available in _______________ header file.
Conio.h
Iostream.h
String.h
Stdlib.h
Care must be taken about the correct ______________ of operator while overloading.
Semantic
Complexity
Both semantic and complexity
None of the given options
While using _________________ operator we do not need to supply number of bytes allocated.
Insertion
Dot
Malloc
New
Once the _______________ are created, they exist for the life time of the program
Local variables
Non static variables
Static variables
Automatic variables
Operator overloading is to allow the same operator to be bound to more than one implementation, depending on the types of the _________.
Compilers
Operands
Function names
Applications
The friend functions are _____________.
Not member of a class
Member of a class
Inline functions
Void functions
Look
at the program code and identify the error.
1 #include
2 #define PI 3.1415926; // Defining PI 3
main() {
4 int radius = 5;
5 cout << "Area of circle with radius " << radius << " = " << PI * radius * radius; }
(a)It will be compiled successfully and will not generate
(b)It will be compiled and returns nothing
©Error exists in line number. Semi colon is not allow
(d)The value of PI cannot be defined in the beginningLook
at the program code and identify the error.
1 #include
2 #define PI 3.1415926; // Defining PI 3
main() {
4 int radius = 5;
5 cout << "Area of circle with radius " << radius << " = " << PI * radius * radius; }
(a)It will be compiled successfully and will not generate
(b)It will be compiled and returns nothing
©Error exists in line number. Semi colon is not allow
(d)The value of PI cannot be defined in the beginning
What will be the output of the given code? #include #define MAX( A, B ) ((A) > (B) ? (A) : (B)) void main() { int i, x, y; x = 23; y = 45; i = MAX( x++, y++ ); // Side-effect: // larger value incremented twice cout << "x = " << x << " y = " << y << '\n'; }
X=23 y=45
X=24 y=46
X=24 y=47
X=22 y=47
The function overloading requires__________________.
No arguments
The argument list to be the same
The arguments of integer type only
The argument list to be different
Windows operating system may itself takes memory from ___________.
Stack
Array
Lists
Heap
An instance of a class is called ________________.
Structure
Data type
Object
Member function
Ref:
In reality, an object is an instance of a class
The memory allocation in C++ is carried out with the help of _______________.
NULL pointer
New operator
Dot operator
+operator
The object code of our program is combined with the _______________
Source program
Machine code of the operating system
Object code of the library functions
With header files
Is this answer is right according to handouts see the attach file
Symbolic constant PI can be defined as:
#define PI 3.14;
#define PI 3.14
#define PI =3.14
#include pi=3.14
The friend functions are _____________.
Not member of a class
Member of a class
Inline functions
Void functions
Ref: Friend functions are not considered class members; they are normal external functions that are given special access privileges.
A reference cannot be _____________.
1
Zero
NULL
Integer
Ref:
new operator can be used for ______________.
Only integer data type
Only char and integer data types
Integer,float,char and double data types
Dot operator
Ref: Similarly, new operator can be used for other data types like char, float and double etc.
Once the _______________ are created, they exist for the life time of the program
Local variables
Non static variables
Static variables
Automatic variables
The function overloading requires__________________.
No arguments
The argument list to be the same(ref page no.301)
The arguments of integer type only
The argument list to be different
An instance of a class is called ________________.
Structure
Data type
Object(classes consists of method (functions) and object)
Member function
If you create a header file of your own and you save it in the “Headerfiles” folder which is located on the current working directory then you must enclose your header file within _________
Braces
Quotation marks(In case of user defined header file )
#sign
Angle brackets
The memory allocation in C++ is carried out with the help of _______________.
NULL pointer
New operator(used for dynamic memory allocation)
Dot operator
+operator
A reference cannot be _____________.
1
Zero
NULL
Integer
The object code of our program is combined with the _______________
Source program
Machine code of the operating system
Object code of the library functions
With header files
A pointer with value NULL is defined in the header files _____________and ___________.
Conio.h, iostream.h(valid header files)
Conio.c ,getche ()
Stdlib.h ,stddef.h
Process.h, stdi.h
new operator can be used for ______________.
Only integer data type
Only char and integer data types
Integer,float,char and double data types(can be used for any native data type)
Dot operator
The function calloc takes two arguments, first argument is the ______________ and the second argument is the ____________.
Required space in terms of numbers, size of space(ref Book Page 281)
If overloaded plus operator is implemented as non-member function then which of the following statement will be true for the statement given below?
obj3 = obj1 + obj2 ;
► obj2 will be passed as an argument to + operator whereas obj2 will drive the + operator
► obj1 will drive the + operator whereas obj2 will be passed as an argument to + operator
► Both objects (obj1, obj2) will be passed as arguments to the + operator
► Any of the objects (obj1, obj2) can drive the + operator
The region of memory, available for allocation at run time in C language is called
________ memory whereas in C++ language is called as ________________.
►
Heap, Stack►
Stack, Free Store►
Heap, Free Store►
None of above
The region of memory, available for allocation at run time in C language is called
________ memory whereas in C++ language is called as ________________.
►
Heap, Stack►
Stack, Free Store►
Heap, Free Store►
None of abovewatch attached file
The object code of our program is combined with the _______________
Source program
Machine code of the operating system(not this is correct|)
Object code of the library functions(this is the correct answer)
With header files#undef is used for __________.
Defining a symbol
Making a symbol undefined
Defining a macro
Defining a header file
#undef is used for __________.
Defining a symbol
Making a symbol undefined(pg no 289)
--
Look at the statement given below int & a; and tell what will happen ?
Compiler will compile successfully
Compiler will show a warning to you
Null value will be assigned to a
Compiler will generate an error: ‘a’ declared as reference
The ____________ is called automatically when an object destroys
Destructor
Constructor
Main program
Default constructor