Home / General Knowledge / Testing New :: Discussion

Discussion :: Testing New

  1. Determine Output:

    #include<stdio.h>

    void main()

    {

    register i=5;

    char j[]= "hello";

    printf("%s %d", j, i);

    }

  2. A.

     hello 5

    B.

     hello garbage value

    C.

     Error

    D.

     None of These

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    If you declare i as register compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory.


Be The First To Comment