|
-
C++ Test Question
This question was on a AP Computer Science test recently:
The letters ABCDEF# will be entered in that order.
How many times will the function Mystery() be called while processing the above data?
void Mystery()
{
cin >> inChar;
if(inChar != '#')
Mystery();
cout << inChar;
}
a)6
b)7
c)8
d)9
Please respond...there has been much debate over this question in my class.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|