L24 Pointer Basics
L24 Pointer Basics
return 0;
}
11/06/2023 CSE 1001 Department of CSE 10
Declaring and initializing pointers
Example:
int *p; //declares a variable p as a pointer variable
that points to an integer data type.
Now…
v = 3; //assigns 3 to v
return 0;
11/06/2023
} CSE 1001 Department of CSE 16
Example - Accessing via pointers.
#include <stdio.h>
int main()
{
return 0;
}
11/06/2023 CSE 1001 Department of CSE 17
Reference and dereference operators
return 0;
} 11/06/2023 CSE 1001 Department of CSE 19
Summary
• Pointer concept
• Dereference operator *