{"id":199220,"date":"2025-03-10T20:27:55","date_gmt":"2025-03-10T20:27:55","guid":{"rendered":"https:\/\/learnexams.com\/blog\/?p=199220"},"modified":"2025-03-10T20:27:57","modified_gmt":"2025-03-10T20:27:57","slug":"in-a-selection-structure-the-structure-controlling-question-is","status":"publish","type":"post","link":"https:\/\/www.learnexams.com\/blog\/2025\/03\/10\/in-a-selection-structure-the-structure-controlling-question-is\/","title":{"rendered":"In a selection structure, the structure-controlling question is"},"content":{"rendered":"\n<p>In a selection structure, the structure-controlling question is.<\/p>\n\n\n\n<p>a. asked once at the beginning of the structure<br>b. asked once at the end of the structure<br>c. asked repeatedly until it is false<br>d. asked repeatedly until it is true<\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-ast-global-color-6-color\"><strong>The correct answer and explanation is :<\/strong><\/mark><\/p>\n\n\n\n<p>The correct answer is:<\/p>\n\n\n\n<p><strong>a. asked once at the beginning of the structure.<\/strong><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Explanation:<\/h3>\n\n\n\n<p>A selection structure, also known as a decision structure, is a fundamental concept in programming that allows a program to make choices based on certain conditions. These structures enable a program to execute different sets of instructions depending on whether a specified condition evaluates to <strong>true<\/strong> or <strong>false<\/strong>.<\/p>\n\n\n\n<p>Selection structures are commonly implemented using conditional statements such as <strong>if, if-else, and switch statements<\/strong> in programming languages like Python, Java, and C++. These statements help control the flow of execution by determining which block of code should run.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why is the correct answer (a)?<\/h4>\n\n\n\n<p>In a selection structure, the decision-making condition (or structure-controlling question) is evaluated <strong>once at the beginning<\/strong> of the structure. If the condition evaluates to <strong>true<\/strong>, one set of instructions is executed. If it evaluates to <strong>false<\/strong>, a different set of instructions (or none at all) may execute. This is characteristic of <strong>if-else<\/strong> statements.<\/p>\n\n\n\n<p>Here, the condition <code>age &gt;= 18<\/code> is evaluated <strong>once at the beginning<\/strong>. If the condition is <strong>true<\/strong>, the first block of code runs. If it is <strong>false<\/strong>, the second block executes.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Why are the other options incorrect?<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>(b) asked once at the end<\/strong> \u2013 This describes a looping structure with a <strong>do-while<\/strong> loop, not a selection structure.<\/li>\n\n\n\n<li><strong>(c) asked repeatedly until false<\/strong> \u2013 This is characteristic of a <strong>while loop<\/strong>, not a selection structure.<\/li>\n\n\n\n<li><strong>(d) asked repeatedly until true<\/strong> \u2013 This also represents a looping structure, such as a <strong>while or do-while loop<\/strong>, not a selection structure.<\/li>\n<\/ul>\n\n\n\n<p>Thus, in a selection structure, the condition is <strong>evaluated once at the beginning<\/strong>, making option <strong>(a) the correct choice<\/strong>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In a selection structure, the structure-controlling question is. a. asked once at the beginning of the structureb. asked once at the end of the structurec. asked repeatedly until it is falsed. asked repeatedly until it is true The correct answer and explanation is : The correct answer is: a. asked once at the beginning of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[25],"tags":[],"class_list":["post-199220","post","type-post","status-publish","format-standard","hentry","category-exams-certification"],"_links":{"self":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts\/199220","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/comments?post=199220"}],"version-history":[{"count":0,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/posts\/199220\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/media?parent=199220"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/categories?post=199220"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.learnexams.com\/blog\/wp-json\/wp\/v2\/tags?post=199220"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}