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
amm1812
3 years ago
7

Explain what the problems with the implementation of the function are, and show a way to fix them.// return true if two C string

s are equalbool match(const char str1[], const char str2[]){bool result = true;while (str1 != 0 && str2 != 0) // zero bytes at ends{if (str1 != str2) // compare corresponding characters{result = false;break;}str1++; // advance to the next characterstr2++;}if (result) {result = (str1 == str2); // both ended at same time?}return( result );}int main(){char a[10] = "pointy";char b[10] = "pointless";if (match(a,b)){cout << "They're the same!" << endl;}}
Computers and Technology
1 answer:
Nataly [62]3 years ago
7 0

Answer:

The code is not dereferencing the pointers. You have to place an asterisk in front of the pointer to read the value the pointer points to.

Explanation:

So "if (str1 != str2)" must be "if (*str1 != *str2)".

likewise:

   while (*str1 != 0 && *str2 != 0)

and

     result = (*str1 == *str2);

You might be interested in
When i add someone to canvas course, do they get an invitation?.
stira [4]
<h2>Read</h2>

Explanation:

Canvas generates a course invitation when an enrollment is manually added to the course. (Find that in goggle)

Knew that I'm just bad at explaining lol

5 0
2 years ago
A leading pharmaceutical company is launching a major transformation of its entire Cloud operations in order to more quickly and
Deffense [45]

A cloud-first strategy helps this client by providing a data-centric approach that offers more speed, agility, and security. Thus, the correct option is B.

<h3>What is a Cloud-first strategy?</h3>

A cloud-first strategy may be defined as an operational strategy that allows the users to reposition all or most of their infrastructure to cloud-computing platforms.

A cloud-first strategy helps this client in numerous ways. It provides a data-centric approach that offers more speed, agility, and security to its customers or clients in a facilitated manner.

Therefore, the correct option for this question is B.

To learn more about the Cloud-first strategy, refer to the link:

brainly.com/question/24719487

#SPJ1

7 0
2 years ago
In database software, which option is the most appropriate menu choice or command to use if you want to change the format of the
sleet_krkn [62]

Answer:

I think it's d

Explanation:

             

4 0
3 years ago
Why would students most likely need to collect data? Check all that apply.
viva [34]
To support a position
It’s the only answer that makes sense so you’ll have to figure out the rest but to support a position is definitely correct
5 0
3 years ago
Read 2 more answers
Maria wants to create an image for a Web page. Maria should use _____. help me
Inessa [10]
Graphics software
Hope it helps
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following is not considered as part of technology literacy?
    8·1 answer
  • Oday's color display devices represent color using the ______ color model.â
    13·1 answer
  • Approximately, what percentage of Smartphone owners in America uses their mobile devices to access social media platforms?
    7·1 answer
  • Suppose that you want to write a program that inputs customer data and displays a summary of the number of customers who owe mor
    14·1 answer
  • Whats the answer to this question?
    7·1 answer
  • Which type of development metrics does Instagram most improve when it releases an update in the App Store to fix errors its cust
    15·1 answer
  • I need help with question 3 I’ll give brainliest
    10·2 answers
  • 15. Feelings (maps, coins, clues, etc.) and the invisClue books were some innovative ways used to keep __________ players engage
    8·2 answers
  • calculate how many turns of cable you will need on the drum for your cage and skip to move up and down by 500 m​
    12·1 answer
  • Why media is far from government​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!