C-Command Line Arguments Questions and Answers
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
101. FILE is a
- Name of a structure
- Name of a file
- It is a macro
- None of the above
102. When a file is able to keep information about file that is called
- header byte
- Footer byte
- Slack byte
- None of the above
104. What will be the contents of a file void main () { FILE *p p=fopen("letter.txt",w"); putc('D',p); putc('e',p); putc('a',p); putc('r',p); fseek(p,-3, SEEK_cur); putc('i',p); }
- Dear
- diar
- dear i
- None of the above
105. How many streams are opened when data is written from keyboard to buffer and bufer to file.
- One
- Two
- Three
- Four
107. When file is opened for read mode at that itme file pointer gives
- Fill level
- empty level
- Both a and b
- None of the above
109. 'putc' s a command to
- to write character into buffer
- to write character into stream
- to write character into monitor
- to read character into buffer
110. The file which contain main () function is called as
- Application file
- Module file
- Complete file
- None of these