Machine-translated by Google. Questions are authored in English.
Top

Discussion

In Turbo C/C++ under DOS if we want that any wild card characters in the command-line arguments should be appropriately expanded, are we required to make any special provision?

  • A.Yes
  • B.No

Answer: A

Correct answer: Yes

Under DOS the shell does not expand wildcards - a program invoked as prog *.c receives the literal string "*.c" and must expand it itself.

Turbo C supplies that facility in a separate object module, WILDARGS.OBJ, which has to be linked in explicitly; only then does the runtime expand the pattern into matching filenames before main is entered. Unix-like shells do the expansion themselves before the program starts, so no such provision is needed there.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.