C-Command Line Arguments Questions and Answers

Practice Mode
Showing 10 of 129 questions
Q111
What is the name of the active file pointer of file in Turbo C?
  • A buffer
  • B curp
  • C istemp
  • D level
Answer: Option B
Q112
The first argument argc in main () function counts
  • A The no. of command line strings including the execution command.
  • B the no.of command line strings excluding the execution command.
  • C the no. of lines in a program
  • D the no. of characters in a program.
Answer: Option A
Q113
The argument argv [] is used to
  • A Count the no. of command line arguments.
  • B pass strings to the programs including the execution command.
  • C Pass strings to the programs excluding the execution command.
  • D Both a and b
Answer: Option B
Q114
What is the file extension for font files?
  • A .font
  • B .txt
  • C .bgi
  • D .chr
Answer: Option D
Q115
puts(argv[0])
  • A Prints the name of the source code file.
  • B Prints argv
  • C Prints the name of the executable code file
  • D prints the number o command line arguments.
Answer: Option C
Q116
Which of the following header file must included to use functions with variable number of arguments?
  • A vararg.h
  • B stdlib.h
  • C stdarg.h
  • D All of the above
Answer: Option C
Q117
Find the output void main () { char s[ ] = '"rama"; strcpy(stdout,s); strcat (stdout,"shyama"); printf("%s",stdout); }
  • A rama
  • B shyama
  • C ramashyama
  • D None of these
Answer: Option D
Q118
Without function parameter as argudment counter, we can achieve argument counter using
  • A extern int __argc;
  • B extern int_argc;
  • C extern int & argc;
  • D None of the above
Answer: Option B
Q119
Stream oriented files are called as
  • A Low level files
  • B High level files
  • C System oriented files
  • D All of these
Answer: Option B
Q120
What type is argv?
  • A char *
  • B int
  • C char **
  • D None
Answer: Option C
Questions and Answers for Competitive Exams Various Entrance Test