下面哪个选项可以将“hello”字符写入文件file.txt的末尾?
举一反三
- 在Windows10中,以下文件名()是错误的. A: &file.txt B: file*.txt C: file.txt D: 文件.txt
- 将文件file.txt的所有使用者的文件执行权限删除,以下命令中(<br/>)是错的。 A: chmod a-x file.Txt B: chmod -x file.txt C: chmod o-x file.txt D: chmod ugo-x file txt
- 1.从键盘输入一串字符,把这串字符写入磁盘文件file.txt。
- 如何将字符串“Hello World”写入a.txt文件内?FILE *file; file = fopen("a.txt","w"); A: char str = "Hello World"; fputs(&str,file); B: char str = "Hello World"; fputc(&str,file); C: char str = "Hello World"; fput(&str,file); D: char str = "Hello World"; fputs(str,file);
- 以下哪条语句可以获取文件"file.txt"的上一级目录的名字 (). A: String name=File.getParentName("file.txt"); B: String name=(new File("file.txt")).getParent(); C: String name=(new File("file.txt")).getParentName(); D: String name=(new File("file.txt")).getParentFile(); E: Directory dir=(new File("file.txt")).getParentDir(); <br/>String name=dir.getName();