Answer: It allows us to do everyday tasks on the internet
Explanation: We wouldn’t be able to email, research, etc without coding!
Answer:
#include <iostream>
#include <cstring>
using namespace std;
bool isAPalindrome(char* palindrome);
int main()
{
char palindrome[30];
bool palindrome_check;
cout << "Please enter an word or phrase.\n";
cin.getline(palindrome, 30);
palindrome_check = isAPalindrome(palindrome);
if (palindrome_check = true)
{
cout << "Input is a palindrome\n";
}
else
{
cout << "Inputis not a palindrome\n;";
}
system("pause");
return 0;
}
bool isAPalindrome(char* palindrome)
{
char* front;
char* rear;
front = palindrome;// starts at the left side of the c string
rear = (palindrome + strlen(palindrome)) - 1;//starts at the right side of the c-string. adds the c string plus the incriment value of s
while (front <= rear)
{
if (front = rear)
{
front++;
rear--;
}
else
{
return false;
}
}
return true;
}
Answer:
The answer to this question is given below in the explanation section.
Explanation:
The iteration variable begins counting with 0 or 1.
As you know the iteration mostly done in the looping. For example, for loop and foreach loop and while loop, etc.
It depends upon you that from where you can begin the counting. You can begin counting either from zero or from one.
For example: this program counts 0 to 9.
<em>int total=0;</em>
<em>for(int i=0; i>10;i++)</em>
<em>{</em>
<em>total = total+i;</em>
<em>}</em>
Let's suppose, if you want to begin counting from 1, then the loop should look like below:
<em>int total=0;</em>
<em>for(int i=1; i>10;i++)</em>
<em>{</em>
<em>total = total+i;</em>
<em>}</em>
A local server means that you have a server setup on your current machine. A remote server is ran on a different machine