c++ nullptr code example
Example 1: declare nullptr c++
int *ptr = NULL;
Example 2: null c++
//NULL is equal to 0
#include <iostream>
using namespace std;
int main(){
int x = NULL;
int y = 0;
cout << y << endl; // Outputs 0
cout << x << endl; // Outputs 0
return 0;
}