
{"id":237,"date":"2018-09-20T16:00:24","date_gmt":"2018-09-20T16:00:24","guid":{"rendered":"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/?page_id=237"},"modified":"2018-09-20T16:00:57","modified_gmt":"2018-09-20T16:00:57","slug":"for-loop-glossary-entry","status":"publish","type":"page","link":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/glossary-2\/for-loop-glossary-entry\/","title":{"rendered":"for-loop (Glossary Entry)"},"content":{"rendered":"<p>The for-loop is one of the most commonly used looping structures.<\/p>\n<p>It executes a block of code while a condition is found to be true (non zero in C), and provides a convenient way to initialize and update loop counters.<\/p>\n<p>A simple example is given below:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-238 size-large\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts-1024x463.png\" alt=\"\" width=\"560\" height=\"253\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts-1024x463.png 1024w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts-300x136.png 300w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts-768x347.png 768w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts-560x253.png 560w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts-260x118.png 260w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts-160x72.png 160w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopCodeParts.png 1282w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>The output will be:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-239 size-large\" src=\"http:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput-1024x661.png\" alt=\"\" width=\"560\" height=\"361\" srcset=\"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput-1024x661.png 1024w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput-300x194.png 300w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput-768x496.png 768w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput-560x361.png 560w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput-260x168.png 260w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput-160x103.png 160w, https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-content\/uploads\/sites\/94\/2018\/09\/ForLoopConsoleOutput.png 1280w\" sizes=\"auto, (max-width: 560px) 100vw, 560px\" \/><\/p>\n<p>TO BE CONTINUED<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The for-loop is one of the most commonly used looping structures. It executes a block of code while a condition is found to be true (non zero in C), and provides a convenient way to initialize and update loop counters. A simple example is given below: The output will be: TO BE CONTINUED<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":153,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-237","page","type-page","status-publish","hentry","entry"],"_links":{"self":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/237","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/comments?post=237"}],"version-history":[{"count":1,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/237\/revisions"}],"predecessor-version":[{"id":240,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/237\/revisions\/240"}],"up":[{"embeddable":true,"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/pages\/153"}],"wp:attachment":[{"href":"https:\/\/blogs.plymouth.ac.uk\/embedded-systems\/wp-json\/wp\/v2\/media?parent=237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}