What does this program do?
```
// ex08_13.cpp
// What does this program do?
#include
using namespace std;
void mystery1(char*, const char*); // prototype
int main() {
char string1[80];
char string2[80];
cout << "Enter two strings: ";
cin >> string1 >> string2;
mystery1(string1, string2);
cout << string1 << endl;
}
// What does this function do?
void mystery1(char* s1, const char* s2) {
while (*s1 != '\0') {
++s1;
}
for (; (*s1 = *s2); ++s1, ++s2) {
; // empty statement
}
}
```
Enter two strings: string1 string2
string1string2
You might also like to view...
(Simple Calculator Application) In this exercise, you will add functionality to a simple calculator application. The calculator will allow a user to enter two numbers in the input JTextFields. There will be four JButtons, labeled +, -, / and *. When the user clicks the JButton labeled as + (addition), - (subtraction), * (multiplication) or / (division), the applica- tion will perform that operation on the numbers in the Enter first number: and Enter second number: input JTextFields and display the resultin the Result: output JTextField. Figure 5.34 displays the completed calculator.
a) Copying the template to your working directory. Copy the C:Examples Tutorial05ExercisesSimpleCalculator directory to your C:SimplyJava directory.
b) Opening the template file. Open the SimpleCalculator.java file in your text editor. c) Code the + JButton event handler. Scroll to the addJButtonActionPerformed
event handler (lines 215–218). After line 216 insert statements that obtain the user
input from firstNumberJTextField and secondNumberJTextField, convert those numbers to int values and assign the numbers to int variables number1 and number2, respectively. Next, insert a statement that adds the numbers and assigns the result to int variable result. Finally, insert a statement that displays the value of result in resultJTextField.
d) Code the - JButton event handler. Locate the subtractJButtonActionPerformed event handler (immediately following addJButtonActionPerformed). In the body of the event handler, insert statements that obtain the use
The ________ method creates a Graphics object.
a) NewGraphics b) CreateGraphics c) PaintGraphics d) InitializeGraphics
You can easily and readily change the data type of a field in a table without fear of losing data
Indicate whether the statement is true or false
Calculating the range and variance of a data set are all methods used to determine the ________ of a data set
A) concentration B) central tendency C) dispersion D) standard deviation