Exam 5: Functions for All Sub Tasks

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

What is the value of choice after the following statements? Void getChoiceint& par_choice,in par_count); Int choice,count=3; GetChoicechoice,count); Void getChoiceint& par_choice,in par_count) { Ifpar_count<0) Par_choice =0; Ifpar_count = 0) Par_choice=-1; Else Par_choice=99; Return; }

(Multiple Choice)
4.8/5
(49)

Call-by-reference should be used

(Multiple Choice)
4.7/5
(34)

If you need a function to get both the number of items and the cost per item from a user,which would be a good function declaration to use?

(Multiple Choice)
5.0/5
(41)

Which of the following function prototypes are not valid?

(Multiple Choice)
4.8/5
(31)

You should make a parameter a reference parameter if:

(Multiple Choice)
4.9/5
(39)

A void function can return any value

(True/False)
4.9/5
(40)

When the address of the actual argument is passed to the formal parameter,this is called __________________________

(Short Answer)
4.8/5
(36)

A void function can be used in an assignment.

(True/False)
4.7/5
(36)

Testing your program should be done

(Multiple Choice)
4.8/5
(30)

Which of the following comments would be the best post-condition for this swap function void swap int& left,int&right);

(Multiple Choice)
4.8/5
(35)

Given the following function definition Void shiftint& a,int&b) { A=b; B=a; } What is the output after the following function call? Int first=0,second=10; Shiftfirst,second); Cout << first <<" "<< second << endl;

(Multiple Choice)
4.8/5
(37)

Given the following function definitions and program fragments,what is the output? Void f1int& z,int &q) { Int temp; Temp=q; Q=z; Z=temp; } Void f2 int& a,int& b) { If a<b) F1a,b); Else A=b; } Int x=3,y=4; F2y,x); Cout << x <<" " << y << endl;

(Multiple Choice)
4.8/5
(32)

What symbol is used to signify that a parameter is a reference parameter? ______

(Short Answer)
4.8/5
(41)
Showing 41 - 53 of 53
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)