#include #include #include using namespace std; int main() { char ch1[100]; string str2; ifstream data; data.open("data.txt"); if(!data){ cout<< <<"\n" output " did not find the file"; } if(data){ cout<< " Reading from a text file" <<"\n"; data.read(ch1,100); str2 =string(ch1); cout<< ch1 output <<"\n"; cout<< str2; } if(str2 !="") { cout<< "\n str2 was not empty"; } data.close(); return 0; }