Write, Then Append

Easy · Pipelines & Redirection · Redirection

Problem

Write first into out.txt, then add second to it, then print the file.

out.txt may already contain something — the first write must replace it.

Approaches

Related problems

Start free on Cariara · Coding problems · System design studio

Coding practice is in SolveMe.Open