0

Who can tell me what's wrong with this code

#include <iostream> using namespace std; int main() { /*0x7ffe8650eecc , is an address of number 60*/ int*p=0x7ffe8650eecc; cout<<*p<<endl; return 0; }

28th May 2020, 8:17 PM
ALI Mamdouh Ahmad
ALI Mamdouh Ahmad - avatar
1 Answer
+ 5
You cannot assign a pointer to the place where its pointing in the system.... If you put '0x7ffe....' in double quotes then the value of pointer will be '0'
28th May 2020, 8:20 PM
Namit Jain
Namit Jain - avatar