{"id":166,"date":"2020-04-03T09:24:19","date_gmt":"2020-04-03T09:24:19","guid":{"rendered":"https:\/\/temp.ashkerala.com\/?p=166"},"modified":"2020-04-03T09:24:19","modified_gmt":"2020-04-03T09:24:19","slug":"c-mcq-9","status":"publish","type":"post","link":"https:\/\/temp.ashkerala.com\/?p=166","title":{"rendered":"C++ MCQ -9"},"content":{"rendered":"<p>Question 1:<\/p>\n<p> A function can not be overloaded only by its return type.<\/p>\n<p> a. True<\/p>\n<p> b. False<\/p>\n<p> \u00a0<br \/> Question 2:<\/p>\n<p> A function can be overloaded with a different return type if it has all the parameters same.<\/p>\n<p> a. True<\/p>\n<p> b. False<\/p>\n<p> \u00a0<br \/> Question 3:<\/p>\n<p> Inline functions involves some additional overhead in running time.<\/p>\n<p> a. True<\/p>\n<p> b. False<\/p>\n<p> \u00a0<br \/> Question 4:<\/p>\n<p> A function that calls itself for its processing is known as<\/p>\n<p> a. Inline Function<\/p>\n<p> b. Nested Function<\/p>\n<p> c. Overloaded Function<\/p>\n<p> d. Recursive Function<\/p>\n<p> \u00a0<br \/> Question 5:<\/p>\n<p> We declare a function with ______ if it does not have any return type<\/p>\n<p> a. long<\/p>\n<p> b. double<\/p>\n<p> c. void<\/p>\n<p> d. int<\/p>\n<p> \u00a0<br \/> Question 6:<\/p>\n<p> Arguments of a functions are separated with<\/p>\n<p> a. comma (,)<\/p>\n<p> b. semicolon (Wink<\/p>\n<p> c. colon (Smile<\/p>\n<p> d. None of these<\/p>\n<p> \u00a0<br \/> Question 7:<\/p>\n<p> Variables inside parenthesis of functions declarations have _____ level access.<\/p>\n<p> a. Local<\/p>\n<p> b. Global<\/p>\n<p> c. Module<\/p>\n<p> d. Universal<\/p>\n<p> \u00a0<br \/> Question 8:<\/p>\n<p> Observe following function declaration and choose the best answer:<\/p>\n<p> int\u00a0 divide ( int a, int b = 2 )<\/p>\n<p> a. Variable b is of integer\u00a0 type and will always have value 2<\/p>\n<p> b. Variable a and b are of int type and the initial value of both variables is 2<\/p>\n<p> c. Variable b is international scope and will have value 2<\/p>\n<p> d. Variable b will have value 2 if not specified when calling function<\/p>\n<p> \u00a0<br \/> Question 9:<\/p>\n<p> The keyword endl<\/p>\n<p> a. Ends the execution of program where it is written<\/p>\n<p> b. Ends the output in cout statement<\/p>\n<p> c. Ends the line in program. There can be no statements after endl<\/p>\n<p> d. Ends current line and starts a new line in cout statement.<\/p>\n<p> \u00a0<br \/> Question 10:<\/p>\n<p> Strings are character arrays. The last index of it contains the null-terminated character<\/p>\n<p> a. \\n<\/p>\n<p> b. \\t<\/p>\n<p> c. \\0<\/p>\n<p> d. \\1<\/p>\n<p> \u00a0<\/p>\n<p> \u00a0<br \/> Answers:<\/p>\n<p> 1. a. True<\/p>\n<p> 2. b. False<\/p>\n<p> 3. a. True<\/p>\n<p> 4. d. Recursive Function<\/p>\n<p> 5. c. Void<\/p>\n<p> 6. a. Comma (,)<\/p>\n<p> 7. a. Local<\/p>\n<p> 8. d. Variable b will have value 2 if not specified when calling function<\/p>\n<p> 9. d. Ends current line and starts a new line in cout statement<\/p>\n<p> 10. c. \\0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Question 1: A function can not be overloaded only by its return type. a. True b. False \u00a0 Question 2: A function can be overloaded with a different return type if it has all the parameters same. a. True b. False \u00a0 Question 3: Inline functions involves some additional overhead in running time. a. True&#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-166","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\/166","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=166"}],"version-history":[{"count":0,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/temp.ashkerala.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}