单选题Which of the following will occur if an operator types the command vi file.out?()A If the file exists it will be opened for editing. If the file does not exist an error message will be displayed.B If the file exists it will be opened for editing. If th

题目
单选题
Which of the following will occur if an operator types the command vi file.out?()
A

If the file exists it will be opened for editing. If the file does not exist an error message will be displayed.

B

If the file exists it will be opened for editing. If the file does not exist a new file with the name file.out will be created and opened for editing.

C

If the file exists an error message will be displayed. If the file does not exist a new file with the name file.out will be created and opened for editing.

D

If the file exists the operator will be asked whether to open the file or overwrite the file. If the file does not exist a new file with the name file.out will be created and opened for editing.

如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

Which statements are true, given the code new FileOutputStream("data", true) for creating an object of class FileOutputStream?()  

  • A、FileOutputStream has no constructors matching the given arguments.
  • B、An IOExeception will be thrown if a file named "data" already exists.
  • C、An IOExeception will be thrown if a file named "data" does not already exist.
  • D、If a file named "data" exists, its contents will be reset and overwritten.
  • E、If a file named "data" exists, output will be appended to its current contents.

正确答案:E

第2题:

A file named "core" exists in the current directory.  Which of the following commands should be used to determine what created the "core" file?()

  • A、 dump -t core 
  • B、 strings core 
  • C、 trace -a core 
  • D、 crash core /unix_up

正确答案:B

第3题:

Which of the following will occur if an operator types the command vi file.out?()

A. If the file exists it will be opened for editing. If the file does not exist an error message will be displayed.

B. If the file exists it will be opened for editing. If the file does not exist a new file with the name file.out will be created and opened for editing.

C. If the file exists an error message will be displayed. If the file does not exist a new file with the name file.out will be created and opened for editing.

D. If the file exists the operator will be asked whether to open the file or overwrite the file. If the file does not exist a new file with the name file.out will be created and opened for editing.


参考答案:B

第4题:

The file “file.txt” exists on the file system and contsins ASCII text.  Given:   try {   File f = new File(“file.txt”);    OutputStream out = new FileOutputStream(f, true);   }    catch (IOException) {}   What is the result?()

  • A、 The code does not compile.
  • B、 The code runs and no change is made to the file.
  • C、 The code runs and sets the length of the file to 0.
  • D、 An exception is thrown because the file is not closed.
  • E、 The code runs and deletes the file from the file system.

正确答案:A

第5题:

Which of the following will occur if an operator types the command vi file.out?()

  • A、If the file exists it will be opened for editing. If the file does not exist an error message will be displayed.
  • B、If the file exists it will be opened for editing. If the file does not exist a new file with the name file.out will be created and opened for editing.
  • C、If the file exists an error message will be displayed. If the file does not exist a new file with the name file.out will be created and opened for editing.
  • D、If the file exists the operator will be asked whether to open the file or overwrite the file. If the file does not exist a new file with the name file.out will be created and opened for editing.

正确答案:B

第6题:

A user reports their system is displaying an error message ‘NTLDR is missing’. Which of the following is the MOST likely cause for this error?()

  • A、BOOT.INI file is configured incorrectly
  • B、Corrupt MBR
  • C、Boot sector virus
  • D、System file is missing components

正确答案:B

第7题:

Operator needs to remove all leading comments # from shell.script file. Which of the following vi sub-command can achieve this?()

  • A、:r/^#//g
  • B、:1,$ s/^#//g
  • C、:sed s/^#//g
  • D、:sub s/^#//g

正确答案:D

第8题:

Operator needs to remove all leading comments from shell.script file. Which of the following vi sub-command can achieve this?()

A. :r/^#//g

B. :1,$ s/^#//g

C. :sed s/^#//g

D. :sub s/^#//g


参考答案:D

第9题:

Which determines if “prefs” is a directory and exists on the file system?()  

  • A、 Boolean exists=Directory.exists (“prefs”);
  • B、 Boolean exists=(new File(“prefs”)).isDir();
  • C、 Boolean exists=(new Directory(“prefs”)).exists();
  • D、 Boolean exists=(new File(“prefs”)).isDirectory();
  • E、 Boolean exists=true;  Try{  Directory d = new Directory(“prefs”);  } catch (FileNotFoundException e) {  exists = false;  }

正确答案:D

第10题:

Consider the following scenario: You have a directory, data, under the disk group tdgroupA. You want to create an alias for one of the data files and you execute the following command: ALTER DISKGROUP tdgroupA  ADD ALIAS ’+tdgroupA/data/datafile.dbf’  FOR ’+tdgroupA.231.45678’;  Which task would be accomplished by the command?()

  • A、The command drops the file +tdgroupA·231.45678.
  • B、The command physically relocates the file to +tdgroupA/data and renames the file to datafile.dbf.
  • C、The command creates a copy of the +tdgroupA·231.45678 file and places it in +tdgroupA/data after renaming the file to datafile.dbf.
  • D、The command creates an alias, datafile.dbf, and places it in +tdgroupA/data and does not remove the +tdgroupA·231.45678 file.
  • E、The command creates a file, datafile.dbf, in +tdgroupA/data and removes the references for +tdgroupA·231.45678 from the data dictionary views.

正确答案:D

更多相关问题