{"id":229,"date":"2020-04-05T08:50:50","date_gmt":"2020-04-05T08:50:50","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=229"},"modified":"2020-04-05T08:50:50","modified_gmt":"2020-04-05T08:50:50","slug":"computer-science-mcq-2","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=229","title":{"rendered":"Computer Science MCQ-2"},"content":{"rendered":"<p><strong>Q.16 main() {<br \/> long i = 30000;<br \/> printf(\u0393\u00c7\u00a3%d\u0393\u00c7\u00a5, i); }<br \/> the output is<\/strong><br \/> (A) 3000 (B) 30000<br \/> (C) 0 (D) -1<br \/> <strong>Ans:B<\/strong><\/p>\n<p> <strong>Q.17 The directive that can be used to test whether an expression evaluates to a nonzero value or not<br \/> is<\/strong><br \/> (A) #if (B) #elif<br \/> (C) #endif (D) #exit<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.18 main() {<br \/> printf(\u0393\u00c7\u00a3%p\\n\u0393\u00c7\u00a5, main());<br \/> }<\/strong><br \/> (A) Prints the address of main function.<br \/> (B) Prints 0.<br \/> (C) Is an error.<br \/> (D) Is an infinite loop.<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.19 The &lt;&lt; operator is used for<\/strong><br \/> (A) Right shifting (B) Left shifting<br \/> (C) Bitwise shifting (D) Bitwise complement<br \/> <strong>Ans:B<\/strong><\/p>\n<p> <strong>Q.20 The C language includes the header file standard input &amp; output in<\/strong><br \/> (A) stdlib.h library (B) stdio.h library<br \/> (C) conio.h library (D) #include library<br \/> <strong>Ans:B<\/strong><\/p>\n<p> <strong>Q.21 The value that follows the keyword CASE may only be<\/strong><br \/> (A) constants (B) variable<br \/> (C) number (D) semicolon<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.22 The statement which is used to terminate the control from the loop is<\/strong><br \/> (A) break (B) continue<br \/> (C) goto (D) exit<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.23 The machine registers are sometimes called<\/strong><br \/> (A) local variables (B) global variables<br \/> (C) accumulators (D) static variables<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.24 Set of values of the same type, which have a single name followed by an index is called<\/strong><br \/> (A) function (B) structure<br \/> (C) array (D) union<br \/> <strong>Ans:C<\/strong><\/p>\n<p> <strong>Q.25 An array of pointers is same as<\/strong><br \/> (A) pointer to array (B) pointers to pointers<br \/> (C) pointer to function (D) pointer to structure<br \/> <strong>Ans:B<\/strong><\/p>\n<p> <strong>Q.26 What is the output of the following program segment?<br \/> main()<br \/> {<br \/> long i = 65536;<br \/> printf(\u0393\u00c7\u00a3%d\\n\u0393\u00c7\u00a5, i);<br \/> }<\/strong><br \/> (A) 0 (B) 65536<br \/> (C) -1 (D) 65<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.27 What is the output of the following program segment?<br \/> main()<br \/> {<br \/> int i = 1;<br \/> do<br \/> { printf(\u0393\u00c7\u00a3%d..\u0393\u00c7\u00a5, i);<br \/> } while(i&#8211;);<br \/> }<\/strong><br \/> (A) 0..1.. (B) 1..0..<br \/> (C) 0 (D) -1<br \/> <strong>Ans:B<\/strong><\/p>\n<p> <strong>Q.28 What is the output of the following program segment?<br \/> main()<br \/> {<br \/> int i = ++2;<br \/> printf(\u0393\u00c7\u00a3%d\\n\u0393\u00c7\u00a5, i);<br \/> }<\/strong><br \/> (A) 3 (B) 2<br \/> (C) 0 (D) -1<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <em>It is a compilation error. However if we write \u0393\u00c7\u00a3i=2; ++i;\u0393\u00c7\u00a5 then value of i is printed as 3.<\/em><\/p>\n<p> <strong>Q.29 The name of all functions end with a<\/strong><br \/> (A) pair of parenthesis (B) semicolon<br \/> (C) braces (D) colon<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.30 A float variable can store any variable within the range of<\/strong><br \/> <em><strong>^ = raised to<\/strong><\/em><br \/> (A) -1.7 \u251c\u00f910^38 to\u00a0 1.7 \u251c\u00f910^38 (B)\u00a0 &#8211; 3.4 \u251c\u00f910^38 to 3.4 \u251c\u00f910^38<br \/> (C) &#8211; 7.2 \u251c\u00f910^38 to 7.2 \u251c\u00f910^38 (D)\u00a0 -1.2^38 \u251c\u00f910 to\u00a0 1.2 \u251c\u00f910^38<br \/> <strong>Ans:B<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q.16 main() { long i = 30000; printf(\u0393\u00c7\u00a3%d\u0393\u00c7\u00a5, i); } the output is (A) 3000 (B) 30000 (C) 0 (D) -1 Ans:B Q.17 The directive that can be used to test whether an expression evaluates to a nonzero value or not is (A) #if (B) #elif (C) #endif (D) #exit Ans:A Q.18 main() { printf(\u0393\u00c7\u00a3%p\\n\u0393\u00c7\u00a5,&#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":[22],"tags":[],"class_list":["post-229","post","type-post","status-publish","format-standard","hentry","category-computer-science-combined"],"_links":{"self":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/229","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=229"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/229\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}