What output is produced from the following program? Include in your answer the c
ID: 3687800 • Letter: W
Question
What output is produced from the following program? Include in your answer the contents of any files created. Remember to create a file entitled TEST.DAT in the same directory as the c program which contains sample data such as: 2 4 6 8 10 12 14 16 18 Write a program that appends one file at the end of the other file. Create two files FILE1.DAT and FILE1.DAT in the same directory as the c program. Fill FILE1.DAT with: Goodbye! It was nice meeting you! Hope to see you soon! File FILE2.DAT with: Hello! My name is Flora. What is your name? After, File FILE2.DAT should look: Hello! My name is Flora. What is your name? Goodbye! It was nice meeting you! Hope to see you soon!Explanation / Answer
4. **2**4**6**8*10*12*14*16*18
explanation:
at first we are providing 3 padding. In single digit there are 2 padding left which are filled by two * and in two digits 1 padding is left which is filled by single *.
5.#include<stdio.h>
#iclude<stdlib.h>
int main(void)
{
FILE *fp1,fp2;
char ch;
fp1=fopen("FILE2.DAT","r");
fp2=fopen("FILE1.DAT","a");
do
{
ch=fgetc(fp1);
fputc(ch,fp2);
}
while(ch!=EOF)
fcloseall();
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.