Question: Problem 9 for Demonstration 1 . 1 ( 1 5 pts ) Write a C program which opens file 1 which only contains this line:

Problem 9 for Demonstration 1.1
(15 pts) Write a C program which opens file1 which only contains this line:
dcab
and then opens the empty file2. Your program should write acbd to file2. You may only declare one uninitialized char variable and may not have any loops, con- ditionals, or include statements, or library functions, and may not use lseek or do any arithmetic with ascii codes. No string constants (such as abcd or acbd should appear in the file). Solve the problem by only using system calls directly.
Enter your code (apart from headers) here:
int main(void){

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 Programming Questions!