c programming style

Niket K. Patwardhan lcc.niket at UCLA-LOCUS.ARPA
Fri Jul 19 21:12:01 AEST 1985


I am not sure whether you implied C does not interpret

argv = argv + n

as

argv = argv + n*sizeof(argv *)   (treating everything like an int).
According to the reference manual, adding an int to a pointer (however you do
it) adds enough to the pointer that the new value points to the object n
elements away from the original object pointed to. Thus C does the same thing
as DASL.



More information about the Comp.lang.c mailing list