The problem that i'm having is that the condition always returns false and thus runs the second statement. code:
void main()
{
char a[20],b[20],c[20],d[20];
printf("enter your first name:");
scanf("%s",a);
printf("enter your second name:");
scanf("%s",b);
printf("enter your last name:");
scanf("%s",c);
(b=="none")?printf("%s %s",a,c):printf("%s %s %s",a,b,c);
}
in this (b=="none")
always returns false ,i also converted this into if else statement but the results were same.