+ 1
Why is the output of this code error?
4 Answers
+ 3
Use strcmp() instead.
https://code.sololearn.com/cAMTS01Thgzq/#c
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
int main(){
int a;
char name[20] = "cody";
a=1;
if(strcmp(name, "cody") == 0 && a==1){
printf("\n its working");
}
else{
printf("\n error");
}
return 0;
}
+ 3
You're welcome! Best of luck in your learning.
+ 2
Thank you
Now it's working



