Answer:
"EF"
Step-by-step explanation:
Given
String1 = "ABCDEFGHI"
Substring : String1(4,2)
To solve this, one must understand the following
1. The function call operator () is used to overload objects of class type.
2. A copy constructor must receive its argument by reference to prevent an otherwise infinite recursion.
3. overload ( ), doesn't mean that one is not creating a new way to call a function; instead, it is a way to create an operator function that can be passed an arbitrary number of parameters
Having pointed out this,
The string to overload goes thus
String1 = "ABCDEFGHI"
The parameters goes thus
String1(4,2)
To represent this properly, we have
("ABCDEFGHI",4,2)
Which means to return 2 strings starting from the 4th index character.
It should be noted that index starts at 0.
So, the character at the 4th index is "E"
Then, we count 2 characters starting from E (i.e. E, inclusive)
This gives
"EF"
So, the returned string is "EF"
Answer:
10 + 9 = n
19 apples
Step-by-step explanation:
80 ÷ 8 = y and 56 ÷ 6 = a
n = y + a
80 ÷ 8 × 8 = y × 8
80 = 8y
80 ÷ 8 = 8y ÷ 8
y = 10
54 ÷ 6 = a
54 ÷ 6 × 6 = a × 6
6a = 54
6a ÷ 6 = 54 ÷ 6
a = 9
10 + 9 = n
19 = n
Given plane Π : f(x,y,z) = 4x+3y-z = -1
Need to find point P on Π that is closest to the origin O=(0,0,0).
Solution:
First step: check if O is on the plane Π : f(0,0,0)=0 ≠ -1 => O is not on Π
Next:
We know that the required point must lie on the normal vector <4,3,-1> passing through the origin, i.e.
P=(0,0,0)+k<4,3,-1> = (4k,3k,-k)
For P to lie on plane Π , it must satisfy
4(4k)+3(3k)-(-k)=-1
Solving for k
k=-1/26
=>
Point P is (4k,3k,-k) = (-4/26, -3/26, 1/26) = (-2/13, -3/26, 1/26)
because P is on the normal vector originating from the origin, and it satisfies the equation of plane Π
Answer: P(-2/13, -3/26, 1/26) is the point on Π closest to the origin.