Edits in the document are called, C. Track changes
Answer:
#include <iostream>
using namespace std;
class Digits
{
public:
int num;
int read() //method to read num from user
{
cout<<"Enter number(>0)\n";
cin>>num;
return num;
}
int digit_count(int num) //method to count number of digits of num
{
int count=0;
while(num>0) //loop till num>0
{
num/=10;
count++; //counter which counts number of digits
}
return count;
}
int countDigits(int num) //method to return remainder
{
int c=digit_count(num); //calls method inside method
return num%c;
}
};
int main()
{
Digits d; //object of class Digits is created
int number=d.read(); //num is read from user
cout<<"\nRemainder is : "<<d.countDigits(number); //used to find remainder
return 0;
}
Output :
Enter number(>0)
343
Remainder is : 1
Explanation:
As program is missing to find errors , a logically write program is written to find the remainder when a number is divided by its number of digits. A class Digits is constructed which has public variable num and methods read(), digit_count(), countDigits().
- read() - This method reads value of num from the user and return num.
- digit_count() - This method takes a integer as parameter and counts the number of digits of a number passed as argument. while loop is used to increement the counter until num<0. This returns the value of count.
- countDigits() - This method takes a integer as a parameter and returns remainder when the argument is divided by number of digits of argument. Number of digits is calculated by using method digit_count().
At last in main method , object of Digits class is created and its methods are used to find the output.
Answer:
1.the program is moved from secondary storage to memory.
Explanation:
Secondary storage media generally have greater storage capacity than RAM (random access memory), for this reason the data and program are stored there.
but ram memories are much faster, for example, a solid state disk (SSD) with SATA III connection can have read and write speeds of approximately 500 MB/s, while a DDR III RAM can have speeds between 12 and 18 GB/S, that is, more than 20 times faster.
So that the flow of data at the time of running a program is optimal, the data from the secondary storage unit is copied to the RAM and this ensures that the speed at which the programs run is at least 20 times faster, and our processes run better.
Answer:
To make the group of four we can write 100011 as 00100011
Now, the two groups are:- 0010 and 0011
And 0010 in binary corresponds to 3 in Hexadecimal
And 0011 in binary corresponds to 4 in Hexadecimal.
So, 100011 of binary corresponds to 34 of hex.
Answer:
I believe the answer would be C
Explanation: