#include
#include
using namespace std;
class addr {
char name [40];
char street [40];
char city [30];
char state [3];
char zip [10];
public:
void store (char *n, char *s, char *c, char *t, char *z);
void display();
};
void addr :: store (char *n, char *s, char *c, char *t, char *z)
{
strcpy (name, );
strcpy (street, s);
strcpy (city, c);
strcpy (state, t);
strcpy (zip, z);
}
void addr ::display()
{
cout << name << "\n";
cout << street << "\n";
cout << city << "\n";
cout << state << "n";
cout << zip << "\n\n";
}
int main ()
{
addr a;
a.store( "C. B Turkel", "11 Pinetree Lane", "Wausau",
"In", "46576");
a.display();
return 0;
Githiari answered the question on May 5, 2018 at 17:42
- Write a program that uses C++ style I/O to prompt the user for a string and then display its length.(Solved)
Write a program that uses C++ style I/O to prompt the user for a string and then display its length.
Date posted: May 5, 2018. Answers (1)
- Given the following new-style C++ program, show how to change it into its old-style form.#include using namespace std;into f(into a);into main(){cout << f(10);return 0;}int f(int...(Solved)
Given the following new-style C++ program, show how to change it into its old-style form.
#include
using namespace std;
into f(into a);
into main()
{
cout << f(10);
return 0;
}
int f(int a)
{
return a * 3.1416;
}
Date posted: May 5, 2018. Answers (1)
- Create a function in C++ language called rev_str() that reverses a string.Overload rev_str() so it can be called with either one character array or two.When...(Solved)
Create a function in C++ language called rev_str() that reverses a string.Overload rev_str() so it can be called with either one character array or two.When it is called with one string, have that one string contain the reversal.When it is called with two strings, return the reversed string in second argument.For example
char s1[80], s2[80];
strcpy (s1, "hello");
rev_str(s1, s2; //reversed string goes in s2, s1 untouched
rev_str(s1); //reversed string is returned in s1
Date posted: May 5, 2018. Answers (1)
- Outline four main steps in computer forensics(Solved)
Outline four main steps in computer forensics.
Date posted: May 4, 2018. Answers (1)
- Properties of a firewall (Solved)
Properties of a firewall
Date posted: May 4, 2018. Answers (1)
- Define controversial content(Solved)
Define controversial content.
Date posted: April 28, 2018. Answers (1)
- State the methods of verification giving examples(Solved)
State the methods of verification giving examples
Date posted: April 28, 2018. Answers (1)
- What is verification? (Solved)
What is verification?
Date posted: April 28, 2018. Answers (1)
- Why is authentication important?
(Solved)
Why is authentication important?
Date posted: April 28, 2018. Answers (1)
- State the examples of biometric devices (Solved)
State the examples of biometric devices
Date posted: April 28, 2018. Answers (1)
- What is authentication?
(Solved)
What is authentication?
Date posted: April 28, 2018. Answers (1)
- Why do we need privacy?
(Solved)
Why do we need privacy?
Date posted: April 28, 2018. Answers (1)
- How does computer technology threaten the privacy of our data? (Solved)
How does computer technology threaten the privacy of our data?
Date posted: April 28, 2018. Answers (1)
- Define privacy(Solved)
Define privacy
Date posted: April 28, 2018. Answers (1)
-
State the types of Intellectual Property Protection. (Solved)
State the types of Intellectual Property Protection.
Date posted: April 28, 2018. Answers (1)
- Define law(Solved)
Define law
Date posted: April 26, 2018. Answers (1)
- Define Ethics (Solved)
Define Ethics
Date posted: April 26, 2018. Answers (1)
- State the examples of unethical computer code of conducts
(Solved)
State the examples of unethical computer code of conducts
Date posted: April 26, 2018. Answers (1)
- Explain the impact of ICT on the society(Solved)
Explain the impact of ICT on the society.
Date posted: April 26, 2018. Answers (1)
- Explain the Usage of ICT in Daily Life(Solved)
Explain the Usage of ICT in Daily Life.
Date posted: April 26, 2018. Answers (1)