1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
adell [148]
2 years ago
11

The program that solves problem 2 (a) on p.275 should be named as proj4_a.c. It must include and implement the following functio

n prototypes to solve problem 2 (a). void get_msg(char [], int *); bool palindrome(char [], int);
Computers and Technology
1 answer:
avanturin [10]2 years ago
7 0

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;

}

You might be interested in
Activities called ___________ involve the microprocessor receiving commands as software carries out tasks and while input arrive
Damm [24]

I guess the answer in the blank is processes.

Activities called processes involve the microprocessor receiving commands as software carries out tasks and while input arrives from the keyboard, mouse, and other devices.

6 0
3 years ago
What are the 2 levels of formatting in a word document
goldfiish [28.3K]

Answer:

Paragraph Styles and character formatting (font, color, etc.)

7 0
2 years ago
_________________: informal messages that are passed on from person to person
sasho [114]

Answer:

Grapevine is the answer

4 0
2 years ago
I WILL GIVE THE CROWN IF CORRECT
alisha [4.7K]

Answer:

foundations

Explanation:

7 0
2 years ago
Read 2 more answers
When was the phone Built
quester [9]
The first phone was made in 1854 by <span>Antonio Meucci.

Other inventors like </span>Johann Philipp Reis, <span>Alexander Graham Bell, Elisha Gray, and Thomas Edison reinvented the telephone or enhanced it.</span>
3 0
3 years ago
Read 2 more answers
Other questions:
  • Mobile devices typically come pre installed with standard apps like web browsers , media players, and mapping programs true or f
    9·1 answer
  • What is one difference between a web page and a web application? Web pages provide information, while web applications allow the
    8·1 answer
  • Bullets in a text box will do which of the following?
    9·2 answers
  • What is a computer network that provides connectivity in a geographic area or region larger than that covered by a local area ne
    7·1 answer
  • Explain the functions of a VDU?
    6·1 answer
  • How did you generate a random number for the user to guess?
    9·1 answer
  • Demonstrate the register addressing mode for the following instructions. Also what addressing mode belongs to these instructions
    11·1 answer
  • which program monitors the computer by looking for known trouble makers as well as suspicious behavior​
    11·1 answer
  • The Texas Department of Education has offices throughout the state covering more than 268,000 square miles. State documents are
    11·1 answer
  • suppose a malloc implementation returns 8-byte aligned addresses and uses an explicit free list where the next and previous poin
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!