Question from the C++ - Fundamentals test

Write a C++ program that prints 'else ...' if a is 0.

Hard

What does the following code return ?

int main() {
    int a = 0;
    if (a=0) {
        std::cout << "if ..." << std::endl;
    } else {
        std::cout << "else ..." << std::endl;
    }
    return 0;
}
Author: SamuelStatus: PublishedQuestion passed 351 times
Edit
-1
Community EvaluationsNo one has reviewed this question yet, be the first!