{"id":1330,"date":"2023-02-06T13:43:09","date_gmt":"2023-02-06T13:43:09","guid":{"rendered":"https:\/\/ibex.tech\/c\/?p=1330"},"modified":"2023-02-06T13:45:06","modified_gmt":"2023-02-06T13:45:06","slug":"static","status":"publish","type":"post","link":"https:\/\/ibex.tech\/c\/c\/memory\/static","title":{"rendered":"Static"},"content":{"rendered":"\n<p><\/p>\n\n\n<p>A static variable inside a function keeps its value between calls.<\/p>\n<p>A static global variable or function is &#8220;seen&#8221; only in the file it&#8217;s declared in.<\/p>\n<p style=\"padding-left: 40px;\">You can have a variable or function in some other file and it will be treated as a different global variable or function, the linker won&#8217;t match the two.<\/p>","protected":false},"excerpt":{"rendered":"<p>A static variable inside a function keeps its value between calls. A static global variable or function is &#8220;seen&#8221; only in the file it&#8217;s declared in. You can have a variable or function in some other file and it will be treated as a different global variable or function, the linker won&#8217;t match the two.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1330","post","type-post","status-publish","format-standard","hentry","category-memory"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1330","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=1330"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1330\/revisions"}],"predecessor-version":[{"id":1333,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/posts\/1330\/revisions\/1333"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/media?parent=1330"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/categories?post=1330"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/c\/wp-json\/wp\/v2\/tags?post=1330"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}