#include int mystery3( const char 's1, const char 's2 ); int main() char string1[ 80 J;: char string2[ 80 ]: printf( "Enter two strings: " ); scanf( "%s%s", string1, string2 );: printf( "The result is %din", mystery3( string1, string2 ) ); return 0; int mystery3( const char "s1, const char 's2) for (: "s1 != 10 && "s2 != \0"; s1++, s2++) { if ( "s1 1= "s2 ) { return 0:

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter2: Basic Elements Of C++
Section: Chapter Questions
Problem 23SA: The following program has syntax errors. Correct them. On each successive line, assume that any...
icon
Related questions
Question
Question 6: Determine what does this program perform?
#include <stdio.h>
int mystery3( const char "s1, const char *s2 );
int main()
{
char string 1[ 80 ];
char string2[ 80 ]):
printf( "Enter two strings: " );
scanf( "%s%s", string1, string2 );
printf( "The result is %d\n", mystery3( string1, string2 ) );
return 0;
int mystery3( const char *s1, const char "s2 )
{
for (; "s1 != \0' && "s2 != \0°; s1++, s2++ ) {
if ( "s1 != "s2 ) {
return 0;
return 1;
Answer:
Transcribed Image Text:Question 6: Determine what does this program perform? #include <stdio.h> int mystery3( const char "s1, const char *s2 ); int main() { char string 1[ 80 ]; char string2[ 80 ]): printf( "Enter two strings: " ); scanf( "%s%s", string1, string2 ); printf( "The result is %d\n", mystery3( string1, string2 ) ); return 0; int mystery3( const char *s1, const char "s2 ) { for (; "s1 != \0' && "s2 != \0°; s1++, s2++ ) { if ( "s1 != "s2 ) { return 0; return 1; Answer:
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 4 images

Blurred answer
Knowledge Booster
Program on Numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning