Hi, I'm learning C and I was trying to print this program using if-else statement:
void main()
{
char* opinions;
printf("What do you think of me?");
scanf("%s",&opinions);
if (opinions="Ugly")
{
printf("Huh, I'm way more beautiful than your heart");
}
else if (opinions="Blacksheep")
{
printf("Sometimes Blacksheeps end up shining the most!");
}
else if (opinions="Self-Centered")
{
printf("Mark time, I've planned to share the most during my whole life");
}
else
{printf("You just know less then 1% about me");
}
}
But when I run it, I get the output of "if" state. The "elseif" and "else" statements are not working. What's the issue and how to fix it?