1. Given the following dennition of fun, what will be output by the call funi (4): void fun1(int n) { int i=0; * * } **** * if (n> 1) { * fun1(n-1); + } for (i = 0; i

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter10: Introduction To Inheritance
Section: Chapter Questions
Problem 12RQ
icon
Related questions
Question
1. Given the following definition of fun1, what will be output by the call fun1 (4)?
void fun1(int n) {
int i = 0;
if (n > 1) {
O O
* *
*
* *
★
*
*
* * *
*
*
*
*
*
*
fun1(n-1);
}
for (i = 0; i<n; i++) {
cout << "*";
}
cout << endl;
}
*
* *
* *
* * * *
* *
* *
* *
* * *
* * *
Transcribed Image Text:1. Given the following definition of fun1, what will be output by the call fun1 (4)? void fun1(int n) { int i = 0; if (n > 1) { O O * * * * * ★ * * * * * * * * * * * fun1(n-1); } for (i = 0; i<n; i++) { cout << "*"; } cout << endl; } * * * * * * * * * * * * * * * * * * * * *
A member variable declared in the private section of a base class can be directly accessed within a member function of a derived class that inherits from this base class.
True
False
Transcribed Image Text:A member variable declared in the private section of a base class can be directly accessed within a member function of a derived class that inherits from this base class. True False
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT