Home Random Page


CATEGORIES:

BiologyChemistryConstructionCultureEcologyEconomyElectronicsFinanceGeographyHistoryInformaticsLawMathematicsMechanicsMedicineOtherPedagogyPhilosophyPhysicsPolicyPsychologySociologySportTourism






B. The location of variable in memory is passed to the function so that it can use the same memory area for its processing

c. The function declaration should contain ampersand (& in its type declaration

d. All of above

 

Question 8:

Overloaded functions are

a. Very long functions that can hardly run

b. One function containing another one or more functions inside it.

c. Two or more functions with the same name but different number of parameters or type.

D. None of above

 

Question 9:

Functions can be declared with default values in parameters. We use default keyword to specify the value of such parameters.

a. True

B. False

 

Question 10:

Examine the following program and determine the output

#include <iostream>

using namespace std;

int operate (int a, int b)

{

return (a * b);

}

float operate (float a, float b)

{

return (a/b);

}

int main()

{

int x=5, y=2;

float n=5.0, m=2.0;

cout << operate(x,y) <<"\t";

cout << operate (n,m);

return 0;

}

 

a. 10.0 5.0

b. 5.0 2.5

c. 10.0 5

D. 10 2.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 known as insertion operator?

a. ^

b. v

c. <<

d. >>

 

 

Question 3:

Regarding the use of new line character (/n) and endl manipulator with cout statement

a. Both ways are exactly same

B. Both are similar but endl additionally performs flushing of buffer

c. endl can’t be used with cout

d. \n can’t be used with cout

 

Question 4:

Which of the following is output statement in C++?

a. print

b. write

C. cout

d. cin

 

Question 5:

Which of the following is input statement in C++?

A. cin

b. input

c. get

d. none of above

 

Question 6:

By default, the standard output device for C++ programs is

a. Printer

B. Monitor

c. Modem

d. Disk

 

Question 7:

By default, the standard input device for C++ program is

A. Keyboard

b. Mouse

c. Scanner

d. None of these

 

Question 8:

Which of the following statement is true regarding cin statement?

a. cin statement must contain a variable preceded by >> operator

b. cin does not process the input until user presses RETURN key

c. you can use more than one datum input from user by using cin

D. all of above

 

Question 9:

Which of the following is extraction operator in C++?

a. ^

b. v

c. <<

d. >>

 

Question 10:

When requesting multiple datum, user must separate each by using

a. a space

b. a tab character

c. a new line character

D. all of above

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.


Date: 2016-03-03; view: 739


<== previous page | next page ==>
A. reads a line of string from cin into mystring | 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
doclecture.net - lectures - 2014-2024 year. Copyright infringement or personal data (0.007 sec.)