Computer Science, asked by harshavardhanch79501, 1 year ago

Which function is used to write a string to a file?

Answers

Answered by BrainlyHeroic
3

Hello!

You can use any specifiers with any data type as we use in normal scanf() function. Declaration: int fprintf(FILE *fp, const char *format, …) fprintf() function is used to write formatted data into a file.

Thanks!☺

Answered by shilpa85475
0

fprintf

Explanation:

A string is a series of characters terminated with a null person .

For example: char c[] = "c string"; When the compiler encounters a series of characters enclosed withinside the double citation marks, it appends a null person on the give up via way of means of default.

The string may be described because the one-dimensional array of characters terminated via way of means of a null ('').

The person array or the string is used to control textual content which includes phrase or sentences. Each person withinside the array occupies one byte of memory, and the closing person ought to usually be 0.

Similar questions