{"id":173,"date":"2020-04-03T09:27:14","date_gmt":"2020-04-03T09:27:14","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=173"},"modified":"2020-04-03T09:27:14","modified_gmt":"2020-04-03T09:27:14","slug":"c-mcq-16","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=173","title":{"rendered":"C++ MCQ-16"},"content":{"rendered":"<p><strong>Q.91\u00a0\u00a0 What will be the result of the expression 13 &amp; 25?<\/strong><br \/> (A) 38\u00a0 (B)\u00a0 25<br \/> (C)\u00a0 9\u00a0 (D)\u00a0 12<br \/> \u00a0<br \/> <strong>\u00a0\u00a0 Ans:C<\/strong><\/p>\n<p> <strong>\u00a0Q.92\u00a0\u00a0 Which of the following operator can be overloaded through friend function?<\/strong><br \/> (A)\u00a0 -&gt; \u00a0<br \/> (B)\u00a0 =<br \/> (C)\u00a0 ( ) \u00a0<br \/> (D)\u00a0 *\u00a0\u00a0\u00a0\u00a0 \u00a0<\/p>\n<p> <strong>\u00a0Ans:D<br \/> \u00a0<br \/> Q.93\u00a0 To access the public function fbase() in the base class, a statement in a derived class function fder() uses the statement.fbase(); <\/strong>\u00a0<br \/> (A) fbase(); \u00a0<br \/> (B)\u00a0 fder(); \u00a0<br \/> (C)\u00a0 base::fbase(); \u00a0<br \/> (D)\u00a0 der::fder();<br \/> \u00a0<br \/> <strong>\u00a0 Ans:A<br \/> \u00a0<br \/> Q.94 If a base class destructor is not virtual, then<\/strong><br \/> (A) It can not have a function body. \u00a0<br \/> (B) It can not be called.<br \/> (C) It can not be called when accessed from pointer.<br \/> (D) Destructor in derived class can not be called when accessed through a pointer to the base class.<br \/> \u00a0<br \/> <strong>\u00a0 Ans:D<br \/> \u00a0<br \/> Q.95 Maximum number of template arguments in a function template is<\/strong><br \/> (A)\u00a0 one \u00a0<br \/> (B)\u00a0 two<br \/> (C)\u00a0 three \u00a0<br \/> (D)\u00a0 many<br \/> \u00a0<br \/> <strong>\u00a0Ans:D<\/strong><\/p>\n<p> <strong>Q 96\u00a0 In access control in a protected derivation, visibility modes will change as follows:<\/strong><br \/> \u00a0\u00a0 (A) private, public and protected become protected<br \/> \u00a0\u00a0 (B) only public becomes protected.<br \/> \u00a0\u00a0 (C) public and protected become protected.<br \/> \u00a0\u00a0 (D) only private becomes protected.<br \/> \u00a0<br \/> <strong>\u00a0 Ans:C<br \/> \u00a0<br \/> Q 97\u00a0 Which of the following statement is valid?<\/strong><br \/> \u00a0\u00a0 (A) We can create new C++ operators.<br \/> \u00a0\u00a0 (B) We can change the precedence of the C++ operators.<br \/> \u00a0\u00a0 (C) We can change the associativity of the C++ operators.<br \/> \u00a0\u00a0 (D) We can not change operator templates.<br \/> \u00a0\u00a0 Ans:D<br \/> \u00a0<br \/> <strong>Q.98\u00a0\u00a0 What will be the output of the following program?<br \/> #include&lt;iostream.h&gt;<br \/> void main()<br \/> {<br \/> float x=5,y=2;<br \/> int result;<br \/> result=x % y;<br \/> cout&lt;&lt;result;<br \/> }<\/strong><br \/> \u00a0\u00a0 (A) 1\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (B)\u00a0 1.0<br \/> \u00a0\u00a0 (C)\u00a0\u00a0 Error message\u00a0 (D)\u00a0 2.5<br \/> \u00a0<br \/> <strong>\u00a0 Ans:C<br \/> \u00a0<br \/> Q.99 Which can be passed as an argument to a function?<\/strong><br \/> (A)\u00a0 constant\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 (B)\u00a0 expression<br \/> (C)\u00a0 another function\u00a0 (D)\u00a0 all of the above.<br \/> \u00a0<br \/> <strong>\u00a0 Ans:A<br \/> \u00a0<br \/> Q.100 Member functions, when defined within the class specification:<\/strong><br \/> (A)\u00a0 are always inline. \u00a0<br \/> (B)\u00a0 are not inline.<br \/> (C)\u00a0 are inline by default, unless they are too big or too complicated.<br \/> (D)\u00a0 are not inline by default.<br \/> \u00a0<br \/> <strong>\u00a0 Ans:A <\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q.91\u00a0\u00a0 What will be the result of the expression 13 &amp; 25? (A) 38\u00a0 (B)\u00a0 25 (C)\u00a0 9\u00a0 (D)\u00a0 12 \u00a0 \u00a0\u00a0 Ans:C \u00a0Q.92\u00a0\u00a0 Which of the following operator can be overloaded through friend function? (A)\u00a0 -&gt; \u00a0 (B)\u00a0 = (C)\u00a0 ( ) \u00a0 (D)\u00a0 *\u00a0\u00a0\u00a0\u00a0 \u00a0 \u00a0Ans:D \u00a0 Q.93\u00a0 To access the public function&#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-173","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\/173","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=173"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/173\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}