Exam 5: Functions for All Sub Tasks
Exam 1: Introduction to Computer and C Programming55 Questions
Exam 2: C++ Basics54 Questions
Exam 3: More Flow of Control44 Questions
Exam 4: Procedural Abstraction and Functions That Return a Value51 Questions
Exam 5: Functions for All Sub Tasks53 Questions
Exam 6: Io Streams As an Introduction to Objects and Classes51 Questions
Exam 7: Arrays34 Questions
Exam 8: Strings and Vectors63 Questions
Exam 9: Pointers and Dynamic Arrays40 Questions
Exam 10: Defining Classes50 Questions
Exam 11: Friends, overloaded Operators, and Arrays in Classes49 Questions
Exam 12: Separate Compilation and Namespaces38 Questions
Exam 13: Pointers and Linked Lists51 Questions
Exam 14: Recursion43 Questions
Exam 15: Inheritance53 Questions
Exam 16: Exception Handling47 Questions
Exam 17: Templates33 Questions
Exam 18: Standard Template Library57 Questions
Select questions type
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)
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)
When the address of the actual argument is passed to the formal parameter,this is called __________________________
(Short Answer)
4.8/5
(36)
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
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)