{"id":1360,"date":"2023-03-03T10:45:42","date_gmt":"2023-03-03T10:45:42","guid":{"rendered":"https:\/\/ibex.tech\/c\/?p=1360"},"modified":"2023-08-30T15:57:05","modified_gmt":"2023-08-30T14:57:05","slug":"file-functions-writing","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/c\/stream\/file-functions-writing","title":{"rendered":"File functions-Writing"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">fprintf()<\/h4>\n\n\n\n<p>fprintf(FILE *stream, const char *StringAndAnyVariableTags);<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\tchar MyString&#91;] = {\"world!\"};\n\tif (fprintf(File1, \"Hello %s\", MyString) &lt; 0)\n\t{\n\t\t\/\/An error occured\n\t}\n\n\tif (fprintf(File1, \"%s %s %d\", \"Hello\", \"world\", 1234) &lt; 0)\n\t{\n\t\t\/\/An error occured\n\t}<\/code><\/pre>\n\n\n\n<p>For the tags you can use see <a href=\"\/c\/c\/console\/printf\">here<\/a>.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">fputc<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">fputs<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\tfputs(\"Hello there\\r\\n\", File1);\n\n\tchar MyString&#91;] = {\"world!\"};\n\tfputs(&amp;MyString&#91;0], File1);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">fwrite<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">fflush()<\/h4>\n\n\n\n<p>fflush(FILE *stream);<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\tfflush(File1);<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>fprintf() fprintf(FILE *stream, const char *StringAndAnyVariableTags); For the tags you can use see here. fputc fputs fwrite fflush() fflush(FILE *stream);<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[114],"tags":[],"class_list":["post-1360","post","type-post","status-publish","format-standard","hentry","category-stream"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1360","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/comments?post=1360"}],"version-history":[{"count":5,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1360\/revisions"}],"predecessor-version":[{"id":1482,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1360\/revisions\/1482"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=1360"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=1360"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=1360"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}