Question: Please fill in the blanks. No work need to be shown. It's in C++ Given an incomplete program below, complete the program by filling in

Please fill in the blanks. No work need to be shown. It's in C++

Please fill in the blanks. No work need to be shown. It's

in C++ Given an incomplete program below, complete the program by filling

Given an incomplete program below, complete the program by filling in the blanks with an appropriate C++ statement according to the instructions stated in the comments. This program intends to read the data from the input file ("input.txt") and to display the data into the output file (output.txt"). The data in the input file is shown in Figure 1 and the expected data in the output file is shown in Figure 2. Note: Please write C ++ statements WITHOUT blank spaces unless it is absolutely needed. Example: int num, ab; TAN TIN TUN SY A HAD A H QBAL Figure 1: Input file I QBAL SYAHADAH TAN TIN TUN Figure 2: Output file 11 12 3 4 #include #include #include using namespace std; int main() 15 6 7 8 23 char name[10] [40]; int cnt = 0; fstream inputfile, outputfile; 1/a) Open the input file named "input.txt" (2 marks) 10 11 12 13 114 115 116 17 118 119 1/b) Open the output file named "output.txt" (2 marks) 1/c) Check for successful opening file (2 marks) 20 21 if ( 1/b) Open the output file named "output.txt" (2 marks) 15 116 17 118 //C) check for successful opening file (2 marks) if ( cout =0; i--)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!