filmov
tv
Lesson 29: C Programming - Simple introduction to POINTERS with 5 lines of code. #shorts.
Показать описание
Understand how pointers work in C programming.
dereference = access the value stored in a memory location, that is pointed to by a pointer variable
learn to use pointers to manipulate data stored in memory locations
Pointers allow us to access and manipulate data stored in memory locations
Lesson:
declares an integer variable called "num" and initializes it to the value 65.
prints out the value of num and the memory address where it is stored using the "%d" and "%p" format specifiers respectively.
the "&" operator is used to get the memory address of a variable. In this case, "&num" is the memory address where the integer value of "num" is stored.
"int *p;" declares a pointer variable called "p" that can hold the memory address of an integer variable.
the "*" operator can also be used to dereference a pointer and access the value stored in the memory location that it points to.
@SoftwareNuggets #softwarenuggets #shorts
dereference = access the value stored in a memory location, that is pointed to by a pointer variable
learn to use pointers to manipulate data stored in memory locations
Pointers allow us to access and manipulate data stored in memory locations
Lesson:
declares an integer variable called "num" and initializes it to the value 65.
prints out the value of num and the memory address where it is stored using the "%d" and "%p" format specifiers respectively.
the "&" operator is used to get the memory address of a variable. In this case, "&num" is the memory address where the integer value of "num" is stored.
"int *p;" declares a pointer variable called "p" that can hold the memory address of an integer variable.
the "*" operator can also be used to dereference a pointer and access the value stored in the memory location that it points to.
@SoftwareNuggets #softwarenuggets #shorts