Friday, October 16, 2009

SCALE FACTOR

When we increment a pointer , its value is increased by the length of the data type that it points to .this length is called SCALE FACTOR .[i,e.ptr = ptr + 1 or ptr++].The no of bytes used to stored various data types can be found by making use of "SIZE OF" operator . For example , if X is a variable , the size of (X) returns the number of bytes needed for the variable.

1 comment:

  1. Hi,

    Don't you mean sizeof(X) ?

    Also, maybe you could provide an example of iterating through an array by incrementing a pointer.

    ReplyDelete