Computer Science, asked by siya05919, 8 months ago

4. If p is an integer pointer,is this statement invalid?
cout<<&p;​

Answers

Answered by rohit991912
0

Pointer is a variable in C++ that holds the address of another variable. They have data type just like variables, for example an integer type pointer can hold the address of an integer variable and an character type pointer can hold the address of char variable/*

This pointer p can hold the address of an integer  

* variable, here p is a pointer and var is just a

* simple integer variable

*/

int *p, var

/* This is how you assign the address of another variable

* to the pointer

*/

p = &var;

Similar questions