1,746 views
1 votes
1 votes
#include <iostream>
using namespace std;

void quiz(int w)
{
if(w>1)
{ quiz (w/2);
quiz(w/2);
}
cout<<"*";
}
int main() {
  quiz(5);	
return 0;
}

how many asterisks are printed by the function call quiz(5)?

ans is 7. Please explain.

1 Answer

1 votes
1 votes

cout<<"*"; is not the part of else statement.....

No related questions found