<u>Solution and Explanation:</u>
//Header files
#include<iostream>
#include<string>
#include<fstream>
using namespace std;
int main()
{
fstream fin;
char str[]="";
string question;
char filename[20];
char choice;
string answer;
//seed for random number
unsigned seed=0;
srand(seed);
cout<<"Enter your file name : ";
cin>>filename;
cout<<endl;
//if file not exist then gives message
//reading file
do
{
fin.open(filename,ios::in);
if(!fin)
{
cout<<"couldnot find the file...";
std::system("pause");
return 0;
}
while(!fin.fail())
{
cout<<endl<<"Enter your quesion"<<endl;
fflush(stdin);
getline(cin,question);
answer="";
char ch;
while((ch=fin.get())!='\n'&&!fin.fail())
{
//reading line
answer+=ch;
if(ch=='#')
{
int randNum=1+rand()%18;
answer +=randNum+'0';
ch=fin.get();
}
}
cout<<answer<<endl;
}
fin.close();
cout<<"Do you want to continue (Y/y to continue) :";
cin>>choice;
}while(choice=='y'||choice=='Y');
//To pause the output
system("pause");
return 0;
}//end of main..
Answer:
Physical layer
Explanation:
The physical layer happens to be the lowest in the OSI model. And it meant for sending the bits from one device to another. And this is the layer that has no concern with the bits meaning, as it deals with the physical connection set up only in the network, and with the reception and transmission of the digital signal. And hence, it is the physical layer that describes the pin configuration for this medium.
I believe the technical term would be "packets". I chose packets because say your home router transmits and receives packets which then go into your phone line.
Answer:
Step 1 − Click anywhere on the paragraph you want to align and click the Align Text Left button available on the Home tab or simply press the Ctrl + L keys.
Left Alignment
Center Aligned Text
A paragraph's text will be said center aligned if it is in the center of the left and right margins. Here is a simple procedure to make a paragraph text center aligned.
Step 1 − Click anywhere on the paragraph you want to align and click the Center button available on the Home tab or simply press the Ctrl + E keys.
Center Alignment
Right-Aligned Text
A paragraph's text is right-aligned when it is aligned evenly along the right margin. Here is a simple procedure to make a paragraph text right-aligned.
Step 1 − Click anywhere on the paragraph you want to align and click the Align Text Right button available on the Home tab or simply press the Ctrl + R keys.
Right Alignment
Justified Text
A paragraph's text is justified when it is aligned evenly along both the left and the right margins. Following is a simple procedure to make a paragraph text justified.
Step 1 − Click anywhere on the paragraph you want to align and click the Justify button available on the Home tab or simply press the Ctrl + J keys.
Justify Alignment
When you click the Justify button, it displays four options, justify, justify low, justify high and justify medium. You need to select only the justify option. The difference between these options is that low justify creates little space between two words, medium creates a more space than low justify and high creates maximum space between two words to justify the text.