What Will Be The Output Of The Following Codep Pre Langc #1149
What will be the output of the following code?</p> <pre><code class="language-c"> #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; }</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs122 Data Communication and Computer Network. It can also be found in gs gs122 Number Theory - Generating Permutations - Quiz No.1.
Similar question(s) are as followings:
Online Quizzes of gs122 Data Communication and Computer Network
Sorting - Insertion Sort - Quiz No.1
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - Insertion Sort - Quiz No.2
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - Insertion Sort - Quiz No.3
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - LSD Radix Sort - Quiz No.1
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - MSD Radix Sort - Quiz No.1
gs gs122 Data Communication and Computer Network
Online Quizzes
Sorting - MSD Radix Sort - Quiz No.2
gs gs122 Data Communication and Computer Network
Online Quizzes