MCQOPTIONS
Bookmark
Saved Bookmarks
→
Technical MCQs
→
2D Transformation And Answers in Technical MCQs
→
Select a function which is used to write a string ..
1.
Select a function which is used to write a string to a file?
A.
pits()
B.
putc()
C.
fputs()
D.
fgets()
Answer» D. fgets()
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
In fopen(), the open mode "wx" is sometimes preferred "w" because. 1) Use of wx is more efficient. 2) If w is used, old contents of file are erased and a new empty file is created. When wx is used, fopen() returns NULL if file already exists.
which Is data type of file pointer is?
<pre class="result notranslate">#include <stdio.h>int main(){ int i=3; printf("i=%*d", i, i); return 0;}</pre>28.stderr, stdin, stdout are FILE pointers
Select text file in which data is stored in
Select a function which is used to write a string to a file?
<pre class="result notranslate">#include <stdio.h>int main(){ char c; FILE *fp; fp=fopen("demo.txt","a+"); // demo.txt : hello you are reading a file fprintf(fp," demo"); fclose(fp); fp=fopen("myfile.txt","r"); while((c=fgetc(fp))!=EOF) printf("%c",c); fclose(fp); return 0;}</pre>22.A data of the file is stored in?
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply