Home / C Programming / C Fundamentals :: Discussion

Discussion :: C Fundamentals

  1. What number would be shown on the screen after the following statements of C are executed?

    char ch;

    int i;

    ch = 'G';

    i = ch-'A';

    printf("%d", i);

  2. A.

     5

    B.

     6

    C.

     7

    D.

     8

    E.

     9

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Since the ASCII value of G is 71 and the garbage value if A is 65 and hence the difference is 6.


Be The First To Comment