Question
C language Your task for this activity is to implement the following functions: e. checkGuess(): This function should take two strings as input. If the
C language
Your task for this activity is to implement the following functions:
e. checkGuess(): This function should take two strings as input. If the two strings are equivalent, return a 1 from the function. If theyre different, return a 0. There are at least two ways to do this: you may use the strcmp() function from
Given:
#include
// Function prototype should be placed below
int main(void){ //TODO: compare two strings char s1[10]; char s2[10]; printf("Enter the first string: "); scanf("%s", &s1); printf("Enter the second string: "); scanf("%s", &s2); int c = checkGuess(s1, s2); // output if they are matched or not
return 0; }
/* Complete the function */
checkGuess(){
}
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started