Question: C++ Task 3 - Understanding reference types. [3 pointsl The code below shows the numberofDigits function, which returns the number of digits of a given

C++  C++ Task 3 - Understanding reference types. [3 pointsl The code

Task 3 - Understanding reference types. [3 pointsl The code below shows the numberofDigits function, which returns the number of digits of a given number (data type long). For example, the number 890786786690656798 has 18 number of digits, the function numberofDigits will return the number 18. Every time the function is called, another copy of the parameter passed (long number) will be created. 2 #include 3 using namespace std; 5 int numberOfDigits (long number)f int digit-e while (number) number number / 10; digit+ti 10 return digit; 12 13 14 int main) 15 long x890786786698656798 cout

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!