write a short note on pointer declarationa simple


Write a short note on pointer declaration

A simple variable in a program is stored in a certain number of bytes at a particular memory location, or address, in the machine. Pointers are used in programs to access memory and manipulate addresses.

The first things to do with pointers are to declare a pointer variable, set it to point somewhere, and finally manipulate the value that it points to. A simple pointer declaration looks like this:

int *ip;

The asterisk means that ip, the variable we're declaring, is not of type int, but rather of type pointer-to-int. (Another way of looking at it is that *ip, which as we'll see is the value pointed to by ip, will be an int.)

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: write a short note on pointer declarationa simple
Reference No:- TGS0305439

Expected delivery within 24 Hours