Select the correct option to test your answer:
Computer
Miscellaneous On Data Structures
Difficulty: Medium
What will be the output of the following code? #include <iostream> #include <string> using namespace std; void func1(string input,string output) { if(input.length()==0) { cout<<output<<","; return; } for(int i=0;i<=output.length();i++) func1(input.substr(1),output.substr(0,i) + input[0] + output.substr(i)); } int main() { char str[] = "AB"; func1(str, ""); return 0; }
More Computer Questions
Which statement about the 'finally' block in C++ exception handling is true?
What is the unique feature of LinkedHashSet?
The principles of structured programming forbid the use of
The toupper() function converts a . . . . . . . . to the corresponding . . . . . . . .
A file which contains readymade styles that can be used for a presentation is called