{"id":232,"date":"2020-04-05T08:52:20","date_gmt":"2020-04-05T08:52:20","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=232"},"modified":"2020-04-05T08:52:20","modified_gmt":"2020-04-05T08:52:20","slug":"computer-science-mcq-5","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=232","title":{"rendered":"Computer Science MCQ-5"},"content":{"rendered":"<p><strong>Q.61 C language was invented by<\/strong><br \/> (A) Abacus (B) Charles babage<br \/> (C) Thomson (D) Dennis Ritchie<br \/> <strong>Ans:D<\/strong><\/p>\n<p> <strong>Q.62 The given FOR loop is<br \/> for ( ; ; )<br \/> {<br \/> printf(\u0393\u00c7\u00a3 \u0393\u00c7\u00a5);<br \/> }<\/strong><br \/> (A) valid (B) indefinite<br \/> (C) invalid (D) displays runtime errors<br \/> <strong>Ans:D<\/strong><\/p>\n<p> <em>The given for loop displays runtime errors because no test condition is given. Test condition is<br \/> must inside for loop.<\/em><\/p>\n<p> <strong>Q.63 The following code displays<br \/> main( )<br \/> {<br \/> int *p;<br \/> p = (int*) malloc(sizeof(int));<br \/> *p = 10;<br \/> printf(\u0393\u00c7\u00a3p = %d\\n\u0393\u00c7\u00a5, *p);<br \/> }<\/strong><br \/> (A) 10 (B) 1542 (address of p)<br \/> (C) 20 (D) None of the above<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.64 The _______ operator is a technique to forcefully convert one data type to the others<\/strong><br \/> (A) Cast (B) Conversion<br \/> (C) Type (D) Uniary<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.65 The output of the following will be<br \/> for (x=1, y=5; x+y&lt;=10; x++)<br \/> {<br \/> printf(\u0393\u00c7\u00a3%d%d\u0393\u00c7\u00a5, x,y);<br \/> y++;<br \/> }<\/strong><br \/> (A) 1 5 (B) 1 5<br \/> 2 6 2 6<br \/> 3 7 3 7<br \/> 4 8<br \/> (C) 1 5 (D) 1 5<br \/> 1 6 2 5<br \/> 1 7 3 5<br \/> 1 8 4 5<br \/> 1 9 5 5<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.66 The __________ statement causes immediate exit from the loop overriding the condition test<\/strong><br \/> (A) Exit (B) Break<br \/> (C) Goto (D) None of the above<br \/> <strong>Ans:B<\/strong><\/p>\n<p> <strong>Q.67 The output of the following code is<br \/> a = 5;<br \/> a &lt;&lt; 1;<br \/> printf(\u0393\u00c7\u00a3%d\u0393\u00c7\u00a5, a);<\/strong><br \/> (A) 5 (B) 6<br \/> (C) 2 (D) 3<br \/> <strong>Ans:A<\/strong><\/p>\n<p> <strong>Q.68 The purpose for mode \u0393\u00c7\u00a3w+b\u0393\u00c7\u00a5 in file operation is<\/strong><br \/> (A) create a binary file for write<br \/> (B) create a binary file for read\/write<br \/> (C) open a binary file for writing<br \/> (D) open a binary file for reading\/writing<br \/> <strong>Ans:B<\/strong><\/p>\n<p> <strong>Q.69 The operators &lt;&lt; and &gt;&gt; are<\/strong><br \/> (A) assignment operator (B) relational operator<br \/> (C) logical operator (D) bitwise shift operator<br \/> <strong>Ans D<\/strong><\/p>\n<p> <strong>Q.70 Which of the following numerical value is invalid constant<\/strong><br \/> (A) .75 (B) 9.3e2<br \/> (C) 27,512 (D) 123456<br \/> <strong>Ans C<\/strong><\/p>\n<p> <strong>Q.71 A C program contains the following declaration int i=8, j=5 what would be the value of<br \/> following expression?<\/strong><br \/> <strong>abs(i-2*j)<\/strong><br \/> (A) 2 (B) 4<br \/> (C) 6 (D) 8<br \/> <strong>Ans A<\/strong><\/p>\n<p> <strong>Q.72 What will be the output of the following program<br \/> main( )<br \/> {<br \/> int k, num=30;<br \/> k=(num&gt;5 ? (num&lt;= 10 ? 100:200):500);<br \/> printf(\u0393\u00c7\u00a3\\n%d\u0393\u00c7\u00a5, num);<br \/> }<\/strong><br \/> (A) 100 (B) 5<br \/> (C) 30 (D) 500<br \/> <strong>Ans C<\/strong><\/p>\n<p> <strong>Q.73 What is the output of the following code<br \/> int n = 0, m=1;<br \/> do<br \/> {<br \/> printf(\u0393\u00c7\u00a3%d\u0393\u00c7\u00a5, m);<br \/> m++;<br \/> }<br \/> while(m&lt;=n);<\/strong><br \/> (A) 0 (B) 2<br \/> (C) 1 (D) 4<br \/> <strong>Ans C<\/strong><\/p>\n<p> <strong>Q.74 If a=8 and b=15 then the statement<br \/> x= (a&gt;b) ? a:b;<\/strong><br \/> (A) assigns a value 8 to x (B) gives an error message<br \/> (C) assigns a value 15 to x (D) assigns a value 7 to x<br \/> <strong>Ans C<\/strong><\/p>\n<p> <strong>Q.75 What is the output of the following code<br \/> int n=0, m;<br \/> for (m=1; m&lt;=n+1; m++)<br \/> printf(\u0393\u00c7\u00a3%d\u0393\u00c7\u00a5, m);<\/strong><br \/> (A) 2 (B) 1<br \/> (C) 0 (D) 6<br \/> <strong>Ans B<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Q.61 C language was invented by (A) Abacus (B) Charles babage (C) Thomson (D) Dennis Ritchie Ans:D Q.62 The given FOR loop is for ( ; ; ) { printf(\u0393\u00c7\u00a3 \u0393\u00c7\u00a5); } (A) valid (B) indefinite (C) invalid (D) displays runtime errors Ans:D The given for loop displays runtime errors because no test condition is&#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-232","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\/232","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=232"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/232\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=232"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=232"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}