DIR Return Create A Forum - Home
---------------------------------------------------------
test
HTML https://testmalest4.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: General Discussion
*****************************************************
#Post#: 21--------------------------------------------------
You can display the address
By: asim km Date: September 3, 2023, 4:19 am
---------------------------------------------------------
The file name is placed between double quote characters:
Pointers and addresses of every piece of data in computer memory
Stored at some memory location or address. using the operator
placed before the variable name. Let's say I have a string
variable: This is how I display the address: This will print a
number that is the address of the character array in memory: In
fact, an array variable like this itself is equivalent to the
address of the array, So even though I'm not using the operator,
it still gives me the array address.
If I type this: ​ the same number (i.e. the address of the
character array) will be displayed: But let's say I have Phone
Number List
HTML https://agbdirectory.com/
another string declared like this:
​ Here, the asterisk or asterisk before the variable name
means that it is not an array itself, Rather, it is actually a
pointer to a memory location. Here it points to the starting
address of the memory containing the character. But unlike
(which is declared not as a pointer but as an array), it is not
the address of a character array. It is a pointer or reference
to that address.
[img]
HTML https://scontent.fdac5-2.fna.fbcdn.net/v/t39.30808-6/375057161_263421249912062_5916241705508741292_n.jpg?_nc_cat=101&ccb=1-7&_nc_sid=49d041&_nc_ohc=X8atlqaGutgAX82Qsso&_nc_ht=scontent.fdac5-2.fna&oh=00_AfC7LvvObNo1o0z7LPAzwR1_80uIRLyAnIbWEAoyTshxKw&oe=64F889F9[/img]
HTML https://agbdirectory.com/
So if I use the operator to display the address, the address I
get (the address of the pointer variable) is different from the
address the display points to (the address of the character
array). We can see this in the example below: This will display
two different numbers, for example: Pointers are one of the most
difficult features of a language to understand. In fact, most
modern object-oriented languages rarely, if ever, use pointers
explicitly. Even so, this doesn't mean that languages like , ,
and don't actually use pointers. Any computer program uses
pointers when running.
*****************************************************