new operator is used to allocate memory from the free store during
Select correct option:
Compile Time
Run Time
Link Time
None of the given options
The get member function, when passed no arguments, inputs an entire stream and returns it as the value of the function call.
Select correct option:
True
False
C++ provides member functions, which control the formatting to be performed during stream I/O operations.
Select correct option:
True
False
new operator allocates memory from free store and returns ___________.
Select correct option:
a pointer
a reference
an integer number
a float number
The endl and flush are _____
Select correct option:
Functions
Operators
Manipulators
Objects
What functionality the following program is performing? #include int main(0 { const int SIZE = 80; char buffer[SIZE]; cout <<" Enter a sentence : "<
Select correct option:
read and write member functions of cin and cout objects are used respectively to read a sentence from the key board and then print it on the screen.
read and put member functions of cin and cout objects are used respectively to read a sentence from the key board and then print it on the screen.
get and write member functions of cout and cin objects are used respectively to read a sentence from the key board and then print it on the screen.
read and write member functions of cin and cout objects are used respectively to read a word from the key board and then print it on the screen.
Suppose int i = 10; then what is the output of cout<< oct<
Select correct option:
10
11
12
13
If we use cin stream to read some value and store it in some integer variable and press some alphabet key instead of numeric keys. then what will happen?
Select correct option:
Its binary representation will be ignored and the character will be stored
Its binary representation will be ignored and the value will be stored
Its ASCII code will be stored inside the computer
Some error will occur and cin stream will detect this error.
Which of the following is normally a source for cin stream?
Select correct option:
Keyboard
Printer
Variable
Constant
Automatic variable are created on ______.
Select correct option:
Heap
Free store
static storage
stack
The static data members of a class can be accessed by ______
Select correct option:
only class
only objects
both class and objects
none of given options
The operator function for << (stream insertion) >> and stream extraction must be
Select correct option:
Member function of class
Non-member function of class
Both member and non-member function
None of the given options
When a variable is defined as static in a class then ___________.
Select correct option:
Separate copy of this variable is created for each object
Only one copy is created for all objects of this class
A copy of this variable is created for only static objects.
None of the given options
The get member function, when passed no arguments, inputs an entire stream and returns it as the value of the function call.
Select correct option:
True
False
The read and write member functions input or output some number of bytes to or from a character array in memory.
Select correct option:
True
False
What will be the output of following statement? cout << setfill('0') << setw(7) << 128 ;
Select correct option:
0128128
0000128
1280000
0012800
In statement Matrix m2 = m1 ;
Select correct option:
Assignment operator is being used
Copy constructor is being used.
Statement has syntax error
None of the given options
Stream operators are heavily overloaded means , they allow to handle int and character data type only.
Select correct option:
True
False
The pointer returned by the new operator points to ------------- of memory chunks allocated by the new operator
Select correct option:
First memory address
Second memory address
Last memory address
None of the above
To get the memory address of a variable we use __ .
Select correct option:
&
%
*
$
Suppose int i = 10; then what is the output of cout<< oct<< span=""> <>
Select correct option:
10
11
12
13
Which of the following is a destination of cout stream?
Select correct option:
Data type
Printer
Constant
Variable
The return type of the operator function for << operator is ________.
Select correct option:
class for which we overload operator
reference of ostream class (ostream&)
reference of istream class (istream&)
void
Static variable which is defined in a function is initialized ________.
Select correct option:
Only once during its life time
Every time the function call
Compile time of the program
None of the above
Automatic variable are created on ______.
Select correct option:
Heap
Free store
static storage
stack
new operator is used to allocate memory from the free store during
Select correct option:
Compile Time
Run Time
Link Time
None of the given options
A variable which is defined inside a function is called
Select correct option:
Global variable
Functional variable
None of the given option
Automatic variable
Which of the following is normally a destination for cin stream?
Select correct option:
Keyboard
Printer
Variable
Mouse
Which of the following is true about streams? A. It is a sequence of bytes B. It is an ordered sequence C. All bytes can go through the stream simultaneously D. Bytes that enters first into the stream will go out at last
Select correct option:
A only
C Only
A and B
A and D
The return type of the operator function for << operator is ________.
Select correct option:
class for which we overload operator
reference of ostream class (ostream&)
reference of istream class (istream&)
void
C++ offers type-safe I/O. The << and >> operators are overloaded to accept data items of specific types.
Select correct option:
true
false
Below is given a code snippet char name[50]; cin>>name; cout<
Select correct option:
Sohail Aslam
Aslam Sohail
Sohail
Aslam
The statement cin.get (); is used to,
Select correct option:
Read a string from keyboard
Read a character from the keyboard
Read a character from file
Read a String from file
new operator allocates memory from free store and returns ___________.
Select correct option:
a pointer
a reference
an integer number
a float number
The static data members of a class can be accessed by ______
Select correct option:
only class
only objects
both class and objects
none of given options
The operator function for << (stream insertion) >> and stream extraction must be
Select correct option:
Member function of class
Non-member function of class
Both member and non-member function
None of the given options
The endl and flush are _____
Select correct option:
Functions
Operators
Manipulators
Objects
What functionality the following program is performing ? #include int main(0 { const int SIZE = 80; char buffer[SIZE]; cout <<" Enter a sentence : "<
Select correct option:
get member function of cin object is used to read a sentence from the key board and then print it on the screen.
getline member function of cout object is used to read a sentence from the key board and then print it on the screen.
getline member function of cin object is used to read a sentence from the key board and then print it on the screen.
getline member function of cin object is used to read a word from the key board and then print it on the screen.
Static variable which is defined in a function is initialized ________.
Select correct option:
Only once during its life time
Every time the function call
Compile time of the program
None of the above
o get the memory address of a variable we use __ .
Select correct option:
&
%
*
$
he pointer returned by the new operator points to ------------- of memory chunks allocated by the new operator
Select correct option:
First memory address
Second memory address
Last memory address
None of the above
operator function for << (stream insertion) >> and stream extraction must be
Select correct option:
Member function of class
Non-member function of class
Both member and non-member function
None of the given options
new operator allocates memory from free store and returns ___________.
Select correct option:
a pointer
a reference
an integer number
a float number
The second parameter of operator function for >> operator must always be passed
Select correct option:
By reference
Function takes no argument
By value
None of the given options
If we have a program that writes the output data(numbers) to the disc ,and if we collect the output data and write it on the disc in one write operation instead of writing the numbers one by one. In the above situation the area where we will gather the number is called
Select correct option:
Heap
Stack
Buffer
Cache
Which of the following is the correct definition of streams ?
Select correct option:
It is an ordered sequence of bits
It is an unordered sequence of bits
It is an ordered sequence of bytes
It is an unordered sequence of bytes
The stream insertion and extraction operators are not already overloaded for ____
Select correct option:
Built-in data types
User-defined data types
Both built-in and user-defined types
None of the given options
The statement cin.get (); is used to,
Select correct option:
Read a string from keyboard
Read a character from the keyboard
Read a character from file
Read a String from file
ntroducing a new product into the market into the market refers to which one of the following concepts?
Select correct option:
Commercialization
Concept testing
Idea screening
Idea generation
Automatic variable are created on ______.
Select correct option:
Heap
Free store
static storage
stack
Which of the following is a source for cout stream?
Select correct option:
Keyboard
Screen
Printer
File
A variable which is defined inside a function is called
Select correct option:
Global variable
Functional variable
None of the given option
Automatic variable
We say, "Be one as Pakistani Nation and grow up for Pakistan's Future". Wish you all the best. Join www.vuaskari.com,
To post to this group, send email to vuaskari_com@googlegroups.com
Visit these groups:
This (Main) Group:http://groups.google.com/group/vuaskari_com?hl=en?hl=en
MIT/MCS Group: http://groups.google.com/group/vu_askarimit?hl=en?hl=en
HRM Group: http://groups.google.com/group/askari_hrm?hl=en?hl=en
Banking Group: http://groups.google.com/group/askari_banking?hl=en?hl=en
Management: https://groups.google.com/group/vuaskari_mgt?hl=en
Marketing: https://groups.google.com/group/vuaskari_mkt?hl=en
MIS Group: http://groups.google.com/group/askari_mis?hl=en
Comments
Post a Comment