What will be the output of the following C code? [code] #include <stdio.h> int main() { int x = 0; if (x ==

Huỳnh Hiền

New member
What will be the output of the following C code?
Code:
    #include <stdio.h>
    int main()
    {
        int x = 0;
        if (x == 0)
            printf("true, ");
        else if (x = 10)
            printf("false, ");
        printf("%d\n", x);
    }
A. false, 0
B. true, 0
C. true, 10
D. compile time error
 

Tìm kiếm

Back
Top