# Tutor profile: Sourav Kumar S.

## Questions

### Subject: Basic Math

The number of ways in which the letters of the word ARTICLE can be arranged taking 3 at a time is?

Here, we are going to use the concept of permutation. The answer regarding to this will be P(7,3). We know P(7,3) means we are going to find the number of ways to choose 3 objects out of total 7 objects available and also such that the arrangement matters. So, the value of P(7,3) = 7! / (7-3)! = 210. Hence, 210 is the required answer.

### Subject: C++ Programming

What is the output of the given program? #include <iostream> using namespace std; class student { public: int rno , m1 , m2 ; void get() { rno = 15, m1 = 10, m2 = 10; } }; class sports { public: int sm; void getsm() { sm = 10; } }; class statement:public student,public sports { int tot,avg; public: void display() { tot = (m1 + m2 + sm); avg = tot / 3; cout << tot; cout << avg; } }; int main() { statement obj; obj.get(); obj.getsm(); obj.display(); }

3010 Explanation: In this program, we are calculating the total and average marks of a student by using multiple inheritance. Here, both the classes student and sports have been inherited using the public access specifiers and hence, all the data variables in classes students and sports become available in class statement. So, we see the output of total being 30 and output of avg being 10.

### Subject: C Programming

What is the output of this C code? #include <stdio.h> int main() { int i = -3; int k = i % 2; printf("%d\n", k); }

-1 Explanation: k stores the remainder when -3 gets divided by 2, this is the work of the modulus operator. It just gives out the remainder, no need to worry about the quotient part.