Showing posts with label integral. Show all posts
Showing posts with label integral. Show all posts

Sunday, 27 November 2011

Are there any problems with performing mathematical operations on different variable types?

C has three categories of built-in data types: pointer types, integral types, and floating-point types.

Pointer types are the most restrictive in terms of the operations that can be performed on them. They are limited to

" -  " subtraction of two pointers, valid only when both pointers point to elements in the same array. The result is the same as subtracting the integer subscripts corresponding to the two pointers.

" + " addition of a pointer and an integral type. The result is a