You need a pointer to store the address of a variable. Fix the code to make it work. The value stored in the num variable should be output to the console.
Pointers
Address to pointer
Report a typo
Sample Input 1:
1Sample Output 1:
1Write a program in C++
#include <iostream>
using namespace std;
int main(){
int num;
cin >> num;
int ptr;
ptr = #
cout << ptr << endl;
return 0;
}
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.