Answers for "pointer meaning in c"

C
4

pointer operators in c

&  ==> address operator
*  ==> dereference operator

// Example
int a = 1;
int *ptr; // int * defines a pointer variable pointing at an int
ptr = &a; // the address of 'a' is assigned to the pointer

// 'ptr' is now equal to the address of 'a'
// when dereferenced using *, it returns the value at that address

printf("value of a: %d", *ptr); // prints "value of a: 1"
Posted by: Guest on September-10-2021
2

how to make pointers in c

datatype *var;

variable var actually holds the address of the data(memory where it is stored)
*var lets you access the data stored at that address
Posted by: Guest on May-02-2021

Code answers related to "C"

Browse Popular Code Answers by Language