C-Command Line Arguments Questions and Answers

Take Exam

Command line arguments in C allow passing values to a program at runtime through the main() function parameters argc and argv. This feature is essential for flexible and interactive program execution. Many programming questions and answers in coding interviews test this concept through practical applications and debugging scenarios. This section provides C command line argument questions with answers and explanations, helping learners strengthen their understanding of runtime input handling. These examples are useful for TCS, Tech Mahindra, and Wipro placement exams where efficiency and clarity of coding are tested.

C-Command Line Arguments

Showing 10 of 129 questions

91. When opeating system allocates memory from RAM for a file is called

  • Buffer
  • Streams
  • Node
  • None of the above
Show Answer Report

92. If stream is not loaded into memory the file descriptor returns

  • 0
  • 1
  • -1
  • None of these
Show Answer Report

93. When the current active file pointer is shifted to end of file, get() returns

  • 1
  • 0
  • -1
  • None of the above
Show Answer Report

94. Flowing of data from a device into buffer and buffer to devie is called

  • stdin
  • Stream
  • Buffer
  • FILE
Show Answer Report

95. The file handler of a file is of type

  • int
  • char
  • float
  • Generic
Show Answer Report

96. The function fseek() returns

  • A non zero value on success
  • A zero value on success
  • A zero value on failure.
  • None of the above
Show Answer Report

97. Operating system represents a file in two different ways, such as

  • Text file and binary file
  • Binary file
  • Text file
  • None of the above
Show Answer Report

98. The file present in disk is always in

  • Text format
  • Low level format
  • Binary format
  • None of the above
Show Answer Report

99. What is buffer size of a stream?

  • 256 bytes
  • 512 bytes
  • 1024 bytes
  • None of the above
Show Answer Report

100. Fseek command works in File pointer but which of the following command works in file handler

  • fseek
  • Iseek
  • hseek
  • None of the above
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test