Following is the C++ code for the question given :-
#include <iostream>
#include<string>
using namespace std;
int main() {
string s1,s2;//two strings to store the words.
cin>>s1;//Input statement.
cin>>s2;//Input statement.
cout<<s1<<" "<<s2<<endl;//printing both words in one line separated by space.
return 0;
}
Input:-
make
choices
Output:-
make choices
Explanation:
I have taken two strings two store two words.After taking the input I have printed both the strings which contains the words entered by the user separated by space.
A program that uses two input statements to get two words as input:
char word1[50];
char word2[50];
cout<<”The program will get two words and print in a single line”
cout<<”Enter the first word”
cin>>word1;
cout<<”Enter the second word”;
cin>>word2;
cout<<”Words in single line:\n”;
cout<<word1 <<” “ << word2;
return;
}
In this program 2 character array variables are declared to get two inputs which is of string. The user is given a message to enter the first word. Then the user is prompted to enter the second word. Together the output is printed using “cout” operator.
The software that has no restrictions from copyright holder regarding modification of the software's internal and its redistribution is called an Open source software. They are being provided for use and redistribution for free, with no cost. They can be easily downloaded on the Internet.
Internal Fragmentation occurs when a process needs more space than the size of allotted memory block or use less space. External Fragmentation occurs when a process is removed from the main memory. Internal Fragmentation occurs when Paging is employed. External Fragmentation occurs when Segmentation is employed.
Great at producing photo quality prints and image-heavy documents, as inkjet printers do a better job of blending and producing vibrant colors than laser printers. The price of an inkjet printer is less than most laser printers.