Q1) A binary stream is a sequence of:
- Bits
- Bytes
- Kilobyt
- Gigabytes
Answer:Bytes
Explanation:Bytes
Q2) The character conversion may occur in:
- Output stream
- Input stream
- Binary stream
- Text stream
Answer: Input stream
Explanation: Input stream
Q3) A sequence of characters from an input device of computer is called
- Binary stream
- Input stream
- Text stream
- from an existing file
Answer:Input stream
Explanation:Input stream
Q4) In ___ file opening mode, data can only be read:
- w
- w’
- R+
- r
Answer:r
Explanation:r
Q5) The fopen () function takes ______ Parameters
- 1
- 2
- 3
- 4
Answer:2
Explanation:2
Q6) In the Statement FILE *FP, the * represents to:
- Multiplication
- Parameter
- Pointer
- Variable
Answer:Pointer
Explanation: Pointer
Q7) Which memory location contains the address of another memory location?
- Function
- Program
- Variable
- pointer
Answer:pointer
Explanation:pointer
Q8) On successful closing a file, the fclose () returns:
- Null in 0
- zero
- One
- File pointer
Answer:Zero OR (0)
Explanation:The fclose() function returns 0 if it successfully closes the stream, or EOF if any errors were detected
Q9) Which of the given function is used to write a string to a file?
- puts
- put c () f gets()
- fputs ()
Answer:fputs ()
Explanation:The fwrite() function is used to write to a file. The first parameter of fwrite() contains the name of the file to write to and the second parameter is the string to be written.
Q10) Which of the method will close a file?
- Close all
- Close
- Append
- Exit
Answer:Close
Explanation:n C, a file is closed using the fclose() function. This returns 0 on success and EOF in the case of a failure.
Q11) A file is stored in: (
- RAM
- Hard disk
- Cache
- ROM
Answer:Hard disk
Explanation:A hard disk drive (HDD), hard disk, hard drive, or fixed disk, is an electro-mechanical data storage device that stores and retrieves digital data
Q12) A ________ can store text only:
- Binary File
- exe File
- Object File
- Text File
Answer:Text File
Explanation:A text file (sometimes spelled textfile; an old alternative name is flatfile) is a kind of computer file that is structured as a sequence of lines of electronic text.
Q13) In text file data is stored in:
- ASCll-code
- Binary code
- Octal-code
- Text code
Answer:Text code
Explanation:Text code only
Q14) Which of the following function is used to write a character to a file?
- getc ( )
- putc ()
- fputs ( )
- fgets ()
Answer:putc ()
Explanation:The putc() function converts c to unsigned char and then writes c to the output stream at the current position.
Q15) An array subscript should be:
- int
- float
- double
- real
Answer:int
Explanation:Array subscripts are treated as signed 32-bit integers.
Q16) Which of the following functions is used to copy a string to an array of characters:
- strcpy
- strpey
- stryep
- copy
Answer:strcpy
Explanation:The strcpy() function copies string2, including the ending null character, to the location that is specified by string1.
Q17) Which of the following character is used to mark the end of the string?
- \r
- \c
- \o
- /o
Answer:\o
Explanation:The escape sequence \o is a commonly used octal escape sequence, which denotes the null character, with value zero.
Q18) Which of the following function is used to read date from a file?
- fputc
- fputs
- fprintf()
- fscanf()
Answer:fscanf()
Explanation:The fscanf() function reads data from the current position of the specified stream into the locations that are given by the entries in argument-list, if any.
0 Comments