// Code derived from Stroustrup's PPP2 book// § 3.9.1 Safe conversions// -beginning on p 79#include<iostream>usingstd::cout;intmain(){charc='x';inti1=c;inti2='x';charc2=i1;cout<<c<<' '<<i1<<' '<<c2<<'\n';cout<<i2<<'\n';doubled1=2.3;doubled2=d1+2;// 2 is converted to 2.0 before addingif(d1<0)// 0 is converted to 0.0 before comparisoncout<<"d1 is negative";cout<<d1<<'\n'//<<d2<<'\n';}