Explore BrainMass
Share

Explore BrainMass

    C-Code Compilation

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Do you think that the following C code will compile? Why or why not? What will be printed by it?

    char c;
    c = '1';
    switch (c)
    {
    case 1 : printf("It is 1n");
    break;
    case 2 : printf("It is 2n");
    break;
    case 49: printf("It is 49n");
    }

    © BrainMass Inc. brainmass.com October 9, 2019, 6:52 pm ad1c9bdddf
    https://brainmass.com/computer-science/c/following-code-compile-100335

    Solution Preview

    Yes, the code will compile (assuming that this piece of code is written in main() function) as there are no ...

    Solution Summary

    Do you think that the following C code will compile?

    $2.19