Get premium membership and access questions with answers, video lessons as well as revision papers.
#include
#include
using namespace std;
//Overload string reversal function.
void rev_str (char *s); //reverse string in place
void rev_str (char *in, char *out); //put reversal into out
into main()
{
char s1[80], s2[80];
strcpy (s1, "This is a test");
rev_str(s1, s2);
cout << s2 << "\n";
return 0;
}
//Reverse string, put result in s.
void rev_str (char *s)
{
char temp[80];
int i, j;
for (i=strlen(s)-1, j=0; i>=0; i--, j++)
temp[j] = s[i];
temp [j] = '\0'; // null-terminate result
strcpy (s, temp);
}
// Reverse string, put result into out.
{
int i, j;
for (i=strlen (in) - 1, j=0; i>=0; i--, j++)
out [j] = in[i];
out [j] = '\0'; // null-terminate result
}
Githiari answered the question on May 5, 2018 at 17:36
- 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)
- Describe the evolution of computer(Solved)
Describe the evolution of computer
Date posted: April 26, 2018. Answers (1)
- There are two styles commonly used in LATEX to write bibliography. Name them and giving a valid reason explain which one is more flexible.(Solved)
There are two styles commonly used in LATEX to write bibliography. Name them and giving a valid reason explain which one is more flexible.
Date posted: April 24, 2018. Answers (1)
- State six risks to the information(Solved)
State six risks to the information.
Date posted: April 24, 2018. Answers (1)