{"id":164,"date":"2020-04-03T09:23:25","date_gmt":"2020-04-03T09:23:25","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=164"},"modified":"2020-04-03T09:23:25","modified_gmt":"2020-04-03T09:23:25","slug":"c-mcq-7","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=164","title":{"rendered":"C++ MCQ -7"},"content":{"rendered":"<p>Question 1<\/p>\n<p> A variable is\/are<\/p>\n<p> a.\u00a0\u00a0\u00a0 String that varies during program execution<\/p>\n<p> b.\u00a0\u00a0\u00a0 A portion of memory to store a determined value<\/p>\n<p> c.\u00a0\u00a0\u00a0 Those numbers that are frequently required in programs<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of these<\/p>\n<p> \u00a0<br \/> Question 2<\/p>\n<p> Which of the following can not be used as identifiers?<\/p>\n<p> a.\u00a0\u00a0\u00a0 Letters<\/p>\n<p> b.\u00a0\u00a0\u00a0 Digits<\/p>\n<p> c.\u00a0\u00a0\u00a0 Underscores<\/p>\n<p> d.\u00a0\u00a0\u00a0 Spaces<\/p>\n<p> Question 3<\/p>\n<p> Which of the following identifiers is invalid?<\/p>\n<p> a.\u00a0\u00a0\u00a0 papername<\/p>\n<p> b.\u00a0\u00a0\u00a0 writername<\/p>\n<p> c.\u00a0\u00a0\u00a0 typename<\/p>\n<p> d.\u00a0\u00a0\u00a0 printname<\/p>\n<p> Question 4<\/p>\n<p> Which of the following can not be used as valid identifier?<\/p>\n<p> a.\u00a0\u00a0\u00a0 bitand<\/p>\n<p> b.\u00a0\u00a0\u00a0 bittand<\/p>\n<p> c.\u00a0\u00a0\u00a0 biand<\/p>\n<p> d.\u00a0\u00a0\u00a0 band<\/p>\n<p> Question 5<\/p>\n<p> The difference between x and \u0393\u00c7\u00ffx\u0393\u00c7\u00d6 is<\/p>\n<p> a.\u00a0\u00a0\u00a0 The first one refers to a variable whose identifier is x and the second one refers to the character constant x<\/p>\n<p> b.\u00a0\u00a0\u00a0 The first one is a character constant x and second one is the string literal x<\/p>\n<p> c.\u00a0\u00a0\u00a0 Both are same<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of above<\/p>\n<p> Question 6<\/p>\n<p> Which of the following is not a valid escape code?<\/p>\n<p> a.\u00a0\u00a0\u00a0 \\t<\/p>\n<p> b.\u00a0\u00a0\u00a0 \\v<\/p>\n<p> c.\u00a0\u00a0\u00a0 \\f<\/p>\n<p> d.\u00a0\u00a0\u00a0 \\w<\/p>\n<p> Question 7<\/p>\n<p> Which of the following statement is true?<\/p>\n<p> a.\u00a0\u00a0\u00a0 String Literals can extend to more than a single line of code by putting a backslash sign at the end of each unfinished line.<\/p>\n<p> b.\u00a0\u00a0\u00a0 You can also concatenate several string constants separating them by one or several blank spaces, tabulators, newline or any other valid blank character<\/p>\n<p> c.\u00a0\u00a0\u00a0 If we want the string literal to explicitly made of wide characters, we can precede the constant with the L prefix<\/p>\n<p> d.\u00a0\u00a0\u00a0 All of above<\/p>\n<p> Question 8<\/p>\n<p> Regarding #difine which of the following statement is false?<\/p>\n<p> a.\u00a0\u00a0\u00a0 It is not C++ statement but the directive for the preprocessor<\/p>\n<p> b.\u00a0\u00a0\u00a0 This does not require a semicolon at the end of line<\/p>\n<p> c.\u00a0\u00a0\u00a0 It is a C++ statement that declares a constant in C++<\/p>\n<p> d.\u00a0\u00a0\u00a0 None of the above<\/p>\n<p> Question 9<\/p>\n<p> Regarding following statement\u00a0 which of the statements is true?<\/p>\n<p> const int pathwidth=100;<\/p>\n<p> a.\u00a0\u00a0\u00a0 Declares a variable pathwidth with 100 as its initial value<\/p>\n<p> b.\u00a0\u00a0\u00a0 Declares a construction pathwidth with 100 as its initial value<\/p>\n<p> c.\u00a0\u00a0\u00a0 Declares a constant pathwidth whose value will be 100<\/p>\n<p> d.\u00a0\u00a0\u00a0 Constructs an integer type variable with pathwidth as identifier and 100 as value<\/p>\n<p> Question 10<\/p>\n<p> In an assignment statement<\/p>\n<p> a.\u00a0\u00a0\u00a0 The lvalue must always be a variable<\/p>\n<p> b.\u00a0\u00a0\u00a0 The rvalue might be a constant, a variable, an expression or any combination of these<br \/> c.\u00a0\u00a0\u00a0 The assignment always takes place from right to left and never the other way<\/p>\n<p> d.\u00a0\u00a0\u00a0 All of above<\/p>\n<p> Answers<\/p>\n<p> 1.\u00a0\u00a0\u00a0\u00a0 b. A portion of memory to store a determined value<\/p>\n<p> 2.\u00a0\u00a0\u00a0\u00a0 d.\u00a0 Spaces<\/p>\n<p> 3.\u00a0\u00a0\u00a0\u00a0 c. Typename<\/p>\n<p> 4.\u00a0\u00a0\u00a0\u00a0 a. Bitand<\/p>\n<p> 5.\u00a0\u00a0\u00a0\u00a0 a. The first one refers to a variable whose identifier is x and the second one refers to the character constant x<\/p>\n<p> 6.\u00a0\u00a0\u00a0\u00a0 d. \\w<\/p>\n<p> 7.\u00a0\u00a0\u00a0\u00a0 d. All of above<\/p>\n<p> 8.\u00a0\u00a0\u00a0\u00a0 c. It is a C++ statement that declares a constant in C++<\/p>\n<p> 9.\u00a0\u00a0\u00a0 c. Declares a constant pathwidth whose value will be 100<\/p>\n<p> 10. d. All of above<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question 1 A variable is\/are a.\u00a0\u00a0\u00a0 String that varies during program execution b.\u00a0\u00a0\u00a0 A portion of memory to store a determined value c.\u00a0\u00a0\u00a0 Those numbers that are frequently required in programs d.\u00a0\u00a0\u00a0 None of these \u00a0 Question 2 Which of the following can not be used as identifiers? a.\u00a0\u00a0\u00a0 Letters b.\u00a0\u00a0\u00a0 Digits c.\u00a0\u00a0\u00a0 Underscores d.\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-164","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\/164","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=164"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/164\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}