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
The concept/theory where computer generated animation (especially humans) that is TOO life-like they become uncomfortable to us
Zolol [24]

Answer:

The concept/theory where computer generated animation (especially humans) that is TOO life-like they become uncomfortable to us as viewers instead of likeable cartoons is known as Uncanny valley

Explanation:

The uncanny valley is a concept that was introduced in the 1970s by Masahiro Mori. It is used to describe when a computer generated animated figure bears too much of a resemblance to humans, to the extent that the person viewing it may feel a sense of unease. The animated figure appearing almost human would likely elicit cold and eerie feelings in viewers.

7 0
3 years ago
Read 2 more answers
Kiara is using her software's graphic formats to create a line graph. As she
rewona [7]

Answer:

Correct the data she entered, and the software will adjust the  graph.

Explanation:

Software is used to work with ease and efficiency. If there is any mistake during data entry, we can easily change that particular data and make it correct. There is no need to delete whole data and re enter the data again. As most of the software are user friendly and have the option to edit the information that already has been entered.

In mentioned case, Kiara should edit the data, that has been entered incorrect. After the correction of data, the graph will be automatically updated with new values and she found correct graph.

8 0
3 years ago
Read 2 more answers
I NEED HELP QUICK
Serjik [45]

Answer: keeps confidential documents secure,

displays a GUI, allocates the computer's resources, and retrieves files

Explanation:

The operating system can be defined as the software installed in the system that provides the information and services to the users by controlling the hardware, software resources, and regulates the computer programs. It runs the applications and programs in the system, displays the graphic user interface for the services, stores, manipulates, and retrieves files. It prevents the unauthorized access to the data and programs by using passwords thus provides the security to the system and documents.

8 0
2 years ago
Which part of project management involves determining the required materials?
Katyanochek1 [597]
Resources I think because what u have all depends on resources
5 0
3 years ago
Read 2 more answers
Review universal data models and discuss how these are being used more widely today. Does a data modeling project using a packag
adell [148]

Answer:

2. A data modelling project using a packaged data model REQUIRES A GREATER SKILL than a project not using a packaged data model.

Explanation:

1a. Review of universal models:

A data model is an abstract model that organizes elements of data and standardizes how they relate to one another and to the properties of real world entities. It has become the standard approach used towards designing databases.

A universal data model is a template data model that can be reused as a starting point or a building block to jump-start development of a data modelling project, industry specific model, logical data models.

1b. Discuss how these are being used more widely today.

*Universal data models helps professional reduce development time, improve consistency and standardization while achieving high quality models.

*Higher quality: just as architects consider blue prints before constructing a building, one should also consider data before building an app. A data model helps define the problem, enabling one to consider different approaches and choose best ones.

*By properly modelling and organization's data, the database designer can eliminate data redundancies (needless repetitions) which are a key source for inaccurate information and ineffective systems.

2. Greater and advanced skills are adequate and required when data modelling project is done using packaged data model while fewer skills are required when data modelling is done without packaged data model.

7 0
3 years ago
Read 2 more answers
Other questions:
  • Descending selection sort with output during execution
    6·1 answer
  • You're working at a large industrial plant and notice a tag similar to the one shown in the figure above. Which of the following
    5·1 answer
  • What is the function of series-parallel circuit
    9·1 answer
  • Based upon what you know
    5·1 answer
  • Mario makes a check payable to "cash," intending to withdraw money from his bank. Kirby takes the check from Mario's notebook an
    10·2 answers
  • PLEASE HELP ASAP!!! 99 POINTS FOR 3 MULTIPLE CHOICE QUESTIONS!!! PLEASE ANSWER ALL!!!
    8·1 answer
  • Science Help
    11·1 answer
  • Which company provides a crowdsourcing platform for corporate research and development?
    9·1 answer
  • When you pass a double variable to a method, the method receives ______.a) a copy of the memory addressb) the reference of the v
    12·1 answer
  • Which of the following could be part of an algorithm?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!