Home / C Programming / Strings :: Discussion

Discussion :: Strings

  1. Is there any difference between the two statements?
    char *ch = "FresherGATE";
    char ch[] = "FresherGATE";

  2. A.

    Yes

    B.

    No

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    In first statement the character pointer ch stores the address of the string "IndiaBIX".
    The second statement specifies the space for 7 characters be allocated and that the name of location is ch.


Be The First To Comment