int latitude = 45;
const char *location = "not at the Equator";
//условие должно быть в круглых скобках:
//if latitude == 0 { //<- Error: expected '(' before 'latitude'
//одиночный = присваивает вместо сравнения:
//latitude становится 0, а 0 - ложь;
//компилятор лишь предупреждает об этом (с -Wall)
if (latitude = 0) {
location = "Equator";
}
//latitude is 0
//location is "not at the Equator"
printf("latitude is %d\n", latitude);
printf("location is %s\n", location);