{"id":158,"date":"2020-04-03T09:20:09","date_gmt":"2020-04-03T09:20:09","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=158"},"modified":"2020-04-03T09:20:09","modified_gmt":"2020-04-03T09:20:09","slug":"c-mcq-1","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=158","title":{"rendered":"C++ MCQ -1"},"content":{"rendered":"<p>Question 1.<\/p>\n<p> What is the correct value to return to the operating system upon the successful completion of a program?<br \/> A. -1<br \/> B. 1<br \/> C. 0<br \/> D. Programs do not return a value.<\/p>\n<p> \u00a0<br \/> Question 2.<\/p>\n<p> What is the only function all C++ programs must contain?<br \/> A. start()<br \/> B. system()<br \/> C. main()<br \/> D. program()<\/p>\n<p> \u00a0<br \/> Question 3.<\/p>\n<p> What punctuation is used to signal the beginning and end of code blocks?<br \/> A. { }<br \/> B. -&gt; and &lt;-<br \/> C. BEGIN and END<br \/> D. ( and )<\/p>\n<p> \u00a0<br \/> Question 4.<\/p>\n<p> What punctuation ends most lines of C++ code?<br \/> A. . (dot)<br \/> B. ; (semi-colon)<br \/> C. : (colon)<br \/> D. &#8216; (single quote)<\/p>\n<p> \u00a0<br \/> Question 5.<\/p>\n<p> Which of the following is a correct comment?<br \/> A. *\/ Comments *\/<br \/> B. ** Comment **<br \/> C. \/* Comment *\/<br \/> D. { Comment }<\/p>\n<p> \u00a0<br \/> Question 6.<\/p>\n<p> Which of the following is not a correct variable type?<br \/> A. float<br \/> B. real<br \/> C. int<br \/> D. double<\/p>\n<p> \u00a0<br \/> Question 7.<\/p>\n<p> Which of the following is the correct operator to compare two variables?<br \/> A. :=<br \/> B. =<br \/> C. equal<br \/> D. ==<\/p>\n<p> \u00a0<br \/> Question 8.<\/p>\n<p> Which of the following is true?<br \/> A. 1<br \/> B. 66<br \/> C. .1<br \/> D. -1<br \/> E. All of the above<\/p>\n<p> \u00a0<br \/> Question 9.<\/p>\n<p> Which of the following is the boolean operator for logical-and?<br \/> A. &amp;<br \/> B. &amp;&amp;<br \/> C. |<br \/> D. |&amp;<\/p>\n<p> \u00a0<br \/> Question 10.<\/p>\n<p> Evaluate !(1 &amp;&amp; !(0 || 1)).<br \/> A. True<br \/> B. False<br \/> C. Unevaluatable<\/p>\n<p> <u><strong>Answers<\/strong><\/u><\/p>\n<p> 1. C. 0<\/p>\n<p> 2. C. main()<\/p>\n<p> 3. A. { }<\/p>\n<p> 4. B. ;<\/p>\n<p> 5. C. \/* Comment *\/<\/p>\n<p> 6. B. real<\/p>\n<p> 7. D. ==<\/p>\n<p> 8. E. All of the above<\/p>\n<p> 9. B. &amp;&amp;<\/p>\n<p> 10. A. True<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question 1. What is the correct value to return to the operating system upon the successful completion of a program? A. -1 B. 1 C. 0 D. Programs do not return a value. \u00a0 Question 2. What is the only function all C++ programs must contain? A. start() B. system() C. main() D. program() \u00a0&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[15],"tags":[],"class_list":["post-158","post","type-post","status-publish","format-standard","hentry","category-c-and-c-programming-language"],"_links":{"self":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=158"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/158\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}