subject

Explain what the problems with the implementation of the function are, and show a way to fix them.// return true if two C strings 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;}}

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:10
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
In which phase does software coding and testing happen in the spiral model? the spiral model does not have a separate testing phase. both, software coding and testing occurs during the phase.
Answers: 3
question
Computers and Technology, 24.06.2019 09:30
Retype the statements, correcting the syntax errors. system.out.println("num: " + songnum); system.out.println(int songnum); system.out.println(songnum " songs"); note: these activities may test code with different test values. this activity will perform two tests: the first with songnum = 5, the second with songnum = 9. see how to use zybooks.
Answers: 1
question
Computers and Technology, 24.06.2019 14:30
Alison is having a hard time at work because hee inbox is flooded with emails every day. some of these emails are unsolicited. some of other she don’t need. which action should she take to better manager her emails?
Answers: 1
You know the right answer?
Explain what the problems with the implementation of the function are, and show a way to fix them.//...
Questions
question
Mathematics, 03.10.2019 04:50
Questions on the website: 13722361