In this infinite loop which terminates when 0 is entered, when I'm entering anything outside the range of int say 2147483648(range of int + 1) this program keeps on running infinitely.
#include<iostream>
using namespace std;
int main(){
int n;
while(1){
cout<<"enter n: ";
cin>>n;
if(n==0) break;
}
return 0;
}