{"id":165,"date":"2020-04-03T09:23:55","date_gmt":"2020-04-03T09:23:55","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=165"},"modified":"2020-04-03T09:23:55","modified_gmt":"2020-04-03T09:23:55","slug":"c-mcq-8","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=165","title":{"rendered":"C++ MCQ -8"},"content":{"rendered":"<p>Question 1<\/p>\n<p> Identify the correct statement<\/p>\n<p> a. Programmer can use comments to include short explanations within the source code itself.<\/p>\n<p> b. All lines beginning with two slash signs are considered comments.<\/p>\n<p> c. Comments very important effect on the behaviour of the program<\/p>\n<p> d. both<\/p>\n<p> \u00a0<br \/> Question 2<\/p>\n<p> The directives for the preprocessors begin with<\/p>\n<p> a.\u00a0\u00a0\u00a0 Ampersand symbol (&amp;Wink<\/p>\n<p> b.\u00a0\u00a0\u00a0 Two Slashes (\/\/)<\/p>\n<p> c.\u00a0\u00a0\u00a0 Number Sign (#)<\/p>\n<p> d.\u00a0\u00a0\u00a0 Less than symbol (&lt;Wink<\/p>\n<p> \u00a0<br \/> Question 3<\/p>\n<p> The file iostream includes<\/p>\n<p> a.\u00a0\u00a0\u00a0 The declarations of the basic standard input-output library.<\/p>\n<p> b.\u00a0\u00a0\u00a0 The streams of includes and outputs of program effect.<\/p>\n<p> c.\u00a0\u00a0\u00a0 Both of these<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of these<\/p>\n<p> \u00a0<br \/> Question 4<\/p>\n<p> There is a unique function in C++ program by where all C++ programs start their execution<\/p>\n<p> a.\u00a0\u00a0\u00a0 Start()<\/p>\n<p> b.\u00a0\u00a0\u00a0 Begin()<\/p>\n<p> c.\u00a0\u00a0\u00a0 Main()<\/p>\n<p> d.\u00a0\u00a0\u00a0 Output()<\/p>\n<p> \u00a0<br \/> Question 5<\/p>\n<p> Every function in C++ are followed by<\/p>\n<p> a.\u00a0\u00a0\u00a0 Parameters<\/p>\n<p> b.\u00a0\u00a0\u00a0 Parenthesis<\/p>\n<p> c.\u00a0\u00a0\u00a0 Curly braces<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of these<\/p>\n<p> \u00a0<br \/> Question 6<\/p>\n<p> Which of the following is false?<\/p>\n<p> a.\u00a0\u00a0\u00a0 Cout represents the standard output stream in c++.<\/p>\n<p> b.\u00a0\u00a0\u00a0 Cout is declared in the iostream standard file<\/p>\n<p> c.\u00a0\u00a0\u00a0 Cout is declared within the std namespace<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of above<\/p>\n<p> \u00a0<br \/> Question 7<\/p>\n<p> Every statement in C++ program should end with<\/p>\n<p> a.\u00a0\u00a0\u00a0 A full stop (.)<\/p>\n<p> b.\u00a0\u00a0\u00a0 A Comma (,)<\/p>\n<p> c.\u00a0\u00a0\u00a0 A Semicolon (Wink<\/p>\n<p> d.\u00a0\u00a0\u00a0 A colon (Smile<\/p>\n<p> \u00a0<br \/> Question 8<\/p>\n<p> Which of the following statement is true about preprocessor directives?<\/p>\n<p> a.\u00a0\u00a0\u00a0 These are lines read and processed by the preprocessor<\/p>\n<p> b.\u00a0\u00a0\u00a0 They do not produce any code by themselves<\/p>\n<p> c.\u00a0\u00a0\u00a0 These must be written on their own line<\/p>\n<p> d.\u00a0\u00a0\u00a0 They end with a semicolon<\/p>\n<p> \u00a0<br \/> Question 9<\/p>\n<p> A block comment can be written by<\/p>\n<p> a.\u00a0\u00a0\u00a0 Starting every line with double slashes (\/\/)<\/p>\n<p> b.\u00a0\u00a0\u00a0 Starting\u00a0 with \/* and ending with *\/<\/p>\n<p> c.\u00a0\u00a0\u00a0 Starting with \/\/* and ending with *\/\/<\/p>\n<p> d.\u00a0\u00a0\u00a0 Starting with &lt;!- and ending with -!&gt;<\/p>\n<p> \u00a0<br \/> Question 10<\/p>\n<p> When writing comments you can<\/p>\n<p> a.\u00a0\u00a0\u00a0 Use code and\u00a0 \/* comment on the same line<\/p>\n<p> b.\u00a0\u00a0\u00a0 Use code and \/\/ comments on the same line<\/p>\n<p> c.\u00a0\u00a0\u00a0 Use code and \/\/* comments on the same line<\/p>\n<p> d.\u00a0\u00a0\u00a0 Use code and &lt;!- comments on the same line<\/p>\n<p> Answers<\/p>\n<p> Basics of C++ &#8211; Objective Questions (MCQs) Set &#8211; 2<br \/> Multiple Choice Questions (MCQs) &#8211; C++ Programming Language<br \/> E-mail Print PDF<\/p>\n<p> Following are the multiple choice questions from C++. Please scroll down to check the answers.<br \/> Set 2<br \/> Questions<\/p>\n<p> \u00a0<\/p>\n<p> \u00a0<\/p>\n<p> Question 1<\/p>\n<p> Identify the correct statement<\/p>\n<p> a. Programmer can use comments to include short explanations within the source code itself.<\/p>\n<p> b. All lines beginning with two slash signs are considered comments.<\/p>\n<p> c. Comments very important effect on the behaviour of the program<\/p>\n<p> d. both<\/p>\n<p> \u00a0<br \/> Question 2<\/p>\n<p> The directives for the preprocessors begin with<\/p>\n<p> a.\u00a0\u00a0\u00a0 Ampersand symbol (&amp;Wink<\/p>\n<p> b.\u00a0\u00a0\u00a0 Two Slashes (\/\/)<\/p>\n<p> c.\u00a0\u00a0\u00a0 Number Sign (#)<\/p>\n<p> d.\u00a0\u00a0\u00a0 Less than symbol (&lt;Wink<\/p>\n<p> \u00a0<br \/> Question 3<\/p>\n<p> The file iostream includes<\/p>\n<p> a.\u00a0\u00a0\u00a0 The declarations of the basic standard input-output library.<\/p>\n<p> b.\u00a0\u00a0\u00a0 The streams of includes and outputs of program effect.<\/p>\n<p> c.\u00a0\u00a0\u00a0 Both of these<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of these<\/p>\n<p> \u00a0<br \/> Question 4<\/p>\n<p> There is a unique function in C++ program by where all C++ programs start their execution<\/p>\n<p> a.\u00a0\u00a0\u00a0 Start()<\/p>\n<p> b.\u00a0\u00a0\u00a0 Begin()<\/p>\n<p> c.\u00a0\u00a0\u00a0 Main()<\/p>\n<p> d.\u00a0\u00a0\u00a0 Output()<\/p>\n<p> \u00a0<br \/> Question 5<\/p>\n<p> Every function in C++ are followed by<\/p>\n<p> a.\u00a0\u00a0\u00a0 Parameters<\/p>\n<p> b.\u00a0\u00a0\u00a0 Parenthesis<\/p>\n<p> c.\u00a0\u00a0\u00a0 Curly braces<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of these<\/p>\n<p> \u00a0<br \/> Question 6<\/p>\n<p> Which of the following is false?<\/p>\n<p> a.\u00a0\u00a0\u00a0 Cout represents the standard output stream in c++.<\/p>\n<p> b.\u00a0\u00a0\u00a0 Cout is declared in the iostream standard file<\/p>\n<p> c.\u00a0\u00a0\u00a0 Cout is declared within the std namespace<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of above<\/p>\n<p> \u00a0<br \/> Question 7<\/p>\n<p> Every statement in C++ program should end with<\/p>\n<p> a.\u00a0\u00a0\u00a0 A full stop (.)<\/p>\n<p> b.\u00a0\u00a0\u00a0 A Comma (,)<\/p>\n<p> c.\u00a0\u00a0\u00a0 A Semicolon (Wink<\/p>\n<p> d.\u00a0\u00a0\u00a0 A colon (Smile<\/p>\n<p> \u00a0<br \/> Question 8<\/p>\n<p> Which of the following statement is true about preprocessor directives?<\/p>\n<p> a.\u00a0\u00a0\u00a0 These are lines read and processed by the preprocessor<\/p>\n<p> b.\u00a0\u00a0\u00a0 They do not produce any code by themselves<\/p>\n<p> c.\u00a0\u00a0\u00a0 These must be written on their own line<\/p>\n<p> d.\u00a0\u00a0\u00a0 They end with a semicolon<\/p>\n<p> \u00a0<br \/> Question 9<\/p>\n<p> A block comment can be written by<\/p>\n<p> a.\u00a0\u00a0\u00a0 Starting every line with double slashes (\/\/)<\/p>\n<p> b.\u00a0\u00a0\u00a0 Starting\u00a0 with \/* and ending with *\/<\/p>\n<p> c.\u00a0\u00a0\u00a0 Starting with \/\/* and ending with *\/\/<\/p>\n<p> d.\u00a0\u00a0\u00a0 Starting with &lt;!- and ending with -!&gt;<\/p>\n<p> \u00a0<br \/> Question 10<\/p>\n<p> When writing comments you can<\/p>\n<p> a.\u00a0\u00a0\u00a0 Use code and\u00a0 \/* comment on the same line<\/p>\n<p> b.\u00a0\u00a0\u00a0 Use code and \/\/ comments on the same line<\/p>\n<p> c.\u00a0\u00a0\u00a0 Use code and \/\/* comments on the same line<\/p>\n<p> d.\u00a0\u00a0\u00a0 Use code and &lt;!- comments on the same line<\/p>\n<p> \u00a0<br \/> \u00a0<br \/> Answers<\/p>\n<p> \u00a0<\/p>\n<p> 1.\u00a0\u00a0\u00a0 b.\u00a0 All lines beginning with two slash signs are considered comments.<\/p>\n<p> 2.\u00a0\u00a0\u00a0 c. Number Sign (#)<\/p>\n<p> 3.\u00a0\u00a0\u00a0 a. The declarations of the basic standard input-output library.<\/p>\n<p> 4.\u00a0\u00a0\u00a0 c. Main()<\/p>\n<p> 5.\u00a0\u00a0\u00a0 b. Parenthesis<\/p>\n<p> 6.\u00a0\u00a0\u00a0 d. None of above<\/p>\n<p> 7.\u00a0\u00a0\u00a0 c. A semicolon<\/p>\n<p> 8.\u00a0\u00a0\u00a0 d. They end with a semicolon<\/p>\n<p> 9.\u00a0\u00a0\u00a0 b. Starting\u00a0 with \/* and ending with *\/<\/p>\n<p> 10.\u00a0\u00a0\u00a0 b. Use code and \/\/ comments on the same line<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question 1 Identify the correct statement a. Programmer can use comments to include short explanations within the source code itself. b. All lines beginning with two slash signs are considered comments. c. Comments very important effect on the behaviour of the program d. both \u00a0 Question 2 The directives for the preprocessors begin with a.\u00a0\u00a0\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-165","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\/165","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=165"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/165\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=165"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=165"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=165"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}