Create a free account on Computer Sir Ki Class and unlock access to valuable learning resources.
Exam Paper Downloads: After registering and logging in, you can download exam question papers in PDF format to practice and prepare for your exams.
Student Support: Get assistance with your doubts, queries, and questions related to your studies. Our support is here to help you understand topics and resolve your learning difficulties.
Register today and make your exam preparation easier and more effective!
Revert(A,B); //This will add 1,2,3,4,5 successively to number A making it 21,23,26,30 and 35 as per logic since B is 4 and it will allow loop to run for 5 times as Last will become 5
cout<<A<<“&”<<B<<endl; // This will print 35&4 as per logic
B–; //B reduced to 3 after this instruction Revert(A,B); //This will add 1,2 successively to number A which is now 35 (as A is passed by reference) making it 36,38 as per logic since B is 3 and it will allow loop to run for 2 times as Last will become 2
cout<<A<<“#”<<B<<endl; // This will print 38&3 as per logic
Revert(B); //This will add 1,2,3 successively to number B making it 4,6,9 as per logic since second param will take default value of 2 and it will allow loop to run for 3 times as Last will become 3 cout<<A<<“#”<<B<<endl; // This will print 38#9 as per logic
C. Sir| Created: 3-Dec-2018 | Updated: 22-Mar-2026|CBSE12A-2018