Cadence Design Systems interview question

Some questions on file handling using Tcl language.