C-Command Line Arguments Questions and Answers

Practice Mode
Showing 10 of 129 questions
Q21
The modes of open ( ) command declare in
  • A fcntr.h
  • B sys.h
  • C stat.h
  • D stdio.h
Answer: Option A
Q22
The 'w' mode of fopen( )
  • A it returns 0 if disk spce isavailable.
  • B it returns 1 if disk space is available.
  • C it returns offset address if disk space is available.
  • D None of these.
Answer: Option C
Q23
the process of establishing a connection between the program and a file is called
  • A Opening a stream
  • B Opening a file
  • C Creating a file
  • D All of the above
Answer: Option A
Q24
the mode "ab+" is used as
  • A To open a binary file
  • B to open a binary file in append mode.
  • C To open a binary file in write mode
  • D None of these
Answer: Option B
Q25
What this code do? #include "stdio.h" void main ( ) { FILE *p; p=fopen("xyz.txt",'w'); }
  • A This can open xyz text file in write mode
  • B This can open xyz text file in write mode and append at the end
  • C This can open xyz text file in read mode
  • D Compilation error
Answer: Option A
Q26
The mode "r+" can be used as
  • A To read, write and modiy existing data of a text file.
  • B to read, write and modify existing data of a binary file.
  • C Only to read the text file.
  • D Only to read the binary file.
Answer: Option B
Q27
Getw ( ) and putw() are
  • A Character I/O
  • B Integer I/O
  • C Formatted I/O
  • D String I/O
Answer: Option B
Q28
On successful execution of fputc() returns
  • A An integer representing the character written
  • B Current file position
  • C Current cursor position
  • D None of these
Answer: Option A
Q29
How many parameters sopen( )take
  • A 2
  • B 3
  • C 4
  • D 5
Answer: Option C
Q30
SH_DENYNO is declared in which header file ?
  • A stat.h
  • B share.h
  • C sys.h
  • D stdio.h
Answer: Option B
Questions and Answers for Competitive Exams Various Entrance Test