+ 1

Help!!!

#include <iostream> using namespace std; int main() { int *p = new int[30]; int a[3]={22,55,666666666666}; *p = a[2]; cout << *p; delete p; return 0; }

5th Feb 2022, 8:58 PM
Anny
Anny - avatar
2 Respuestas
+ 1
Because int maximum size is 2147483647 Not 6666666666666666666
6th Feb 2022, 2:10 PM
Matin Nouri
Matin Nouri - avatar
+ 2
use long long int. use delete [] p;
5th Feb 2022, 9:12 PM
rodwynnejones
rodwynnejones - avatar