PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Pointers
Date: Sunday, 01 Mar 2020, 06:25:29


    > Message Posted By: Unknown
    >
    > What would the following mean?
    >
    > char* ptr, ptr1;

This declares ptr to be a char* and ptr1 to be a char.
=====

    > char *ptr; ptr1;

If ptr1 was not declared earlier, this induces an error
message; otherwise it declares ptr to be a char* (since
gcc skips the step of evaluating ptr1 and then throwing
the value away).

--Stan-
PREV INDEX NEXT