Answer:
It keeps saying servers fully loaded
Explanation:
The corresponding logical address is 200.
If a program is operating with execution-time binding, the physical address generated will be 300. However, if the relocation register is set to 100, the corresponding logical address will be 200.
This is because the relocation register is used to offset the physical address, so that it can be used to calculate the logical address.
Learn more here:
brainly.com/question/20355023
#SPJ4
Answer and Explanation:
Multiple-line comments :
Advantage :In the event that we need to remark out of zone of the given program , we can utilize it.
Disadvantage : In numerous line results are in reduced unwavering quality. It stretches out the remark as far as possible of the following comment.For least difficult approach to unintentionally leave off the last delimiter, which successfully expelling code from the program.
Single Line Comments :
Advantage :In the event that you need to close all the delimiter before close the program we utilize this kind of remarks.
Disadvantage : It put more burden on your program .It repeated on every line of a block of comments
Answer:
/*C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program */
//header files
#include <fstream>
#include<string>
#include <iostream>
#include <cstdlib> //needed for exit function
using namespace std;
//function prototype
int fileSum(string filename);
int main()
{
string filename;
cout << "Enter the name of the input file: ";
cin >> filename;
cout << "Sum: " << fileSum(filename) << endl;
system("pause");
return 0;
}
/*The function fileSum that takes the string filename and
count the sum of the values and returns the sum of the values*/
int fileSum(string filename)
{
//Create a ifstream object
ifstream fin;
//Open a file
fin.open(filename);
//Initialize sum to zero
int sum=0;
//Check if file exist
if(!fin)
{
cout<<"File does not exist ."<<endl;
system("pause");
exit(1);
}
else
{
int value;
//read file until end of file exist
while(fin>>value)
{
sum+=value;
}
}
return sum;
}//end of the fileSum
Explanation:
This is a C++ program that prompts user to enter the name of input file(input.txt in this example) and print the sum of the values in the file to console. If file dosnot exist, then close the program.
Check attachment for sample output screenshot.