{"id":25489,"date":"2022-02-16T19:15:01","date_gmt":"2022-02-16T13:45:01","guid":{"rendered":"https:\/\/infinitylearn.com\/surge\/?p=25489"},"modified":"2024-09-21T14:59:02","modified_gmt":"2024-09-21T09:29:02","slug":"important-questions-for-class-12-computer-science-c-c-revision-tour","status":"publish","type":"post","link":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/","title":{"rendered":"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_37 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><label for=\"item\" aria-label=\"Table of Content\"><span style=\"display: flex;align-items: center;width: 35px;height: 30px;justify-content: center;\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/label><input type=\"checkbox\" id=\"item\"><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' style='display:block'><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#Important_Questions_for_Class_12_Computer_Science_C_-_C_Revision_Tour\" title=\"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour\">Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour<\/a><ul class='ez-toc-list-level-3'><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#Topic_-_1_Fundamentals\" title=\"Topic \u2013 1  \n Fundamentals\">Topic \u2013 1  \n Fundamentals<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#Topic_-_2_Control_Flow_and_Functions_Control_Flow\" title=\"Topic \u2013 2  \nControl Flow and Functions Control Flow\">Topic \u2013 2  \nControl Flow and Functions Control Flow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#Previous_Years_Examination_Questions_Topic_3\" title=\"Previous Years Examination Questions (Topic 3)\">Previous Years Examination Questions (Topic 3)<\/a><ul class='ez-toc-list-level-4'><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#1_Mark_Questions\" title=\"(1 Mark Questions)\">(1 Mark Questions)<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#2_Marks_Questions\" title=\" (2 Marks Questions)\"> (2 Marks Questions)<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#3_Marks_Questions\" title=\"3 Marks Questions\">3 Marks Questions<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Important_Questions_for_Class_12_Computer_Science_C_-_C_Revision_Tour\"><\/span><span style=\"color: #00ccff;\"><strong>Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour<\/strong><\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Topic_-_1_Fundamentals\"><\/span><span style=\"text-decoration: underline;\"><span style=\"color: #0000ff; text-decoration: underline;\">Topic \u2013 1 <\/span><\/span><br \/>\n<span style=\"text-decoration: underline;\"> <span style=\"color: #0000ff; text-decoration: underline;\">Fundamentals<\/span><\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: center;\"><span style=\"color: #0000ff;\"><strong>Previous Years Examination &amp; Important Questions<br \/>\n2 Marks Questions<\/strong><\/span><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 1:<\/strong><\/span><br \/>\nWrite the type of C++ tokens (keywords and user defined identifiers) from the following: <strong>All Indio 2017<\/strong><\/p>\n<ol>\n<li>new<\/li>\n<li>While<\/li>\n<li>case<\/li>\n<li>Num_2<\/li>\n<\/ol>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<ol>\n<li>new \u2192 keyword<\/li>\n<li>While \u2192 user defined identifier<\/li>\n<li>case \u2192 keyword<\/li>\n<li>Num_2 \u2192 user defined identifier<\/li>\n<\/ol>\n<p><span style=\"color: #eb4924;\"><strong>Question 2:<br \/>\n<\/strong><\/span>Out of the following, find those identifiers, which cannot be used for naming Variable, Constants or Functions in a C++ program: <strong>Delhi 2016<\/strong><br \/>\nCost, Price*Qty, float, Switch, Address One. Delete, Number12, do<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>Price*Qty, float, do and Address One cannot be used for naming variables, constants or functions in a C++ program.<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 3:<br \/>\n<\/strong><\/span>Rewrite the following C++ code after removing any\/all syntactical errors with each correction underlined. <strong>Delhi 2016<\/strong><br \/>\nNOTE:  Assume all required header files are already being included in the program.<\/p>\n<pre>#define Equation(p,q)=p+2*q \r\nvoid main()\r\n{\r\nfloat A=3.2;B=4.1;\r\nC=Equation(A,B); \r\ncout&lt;&lt;'Output =\u2019&lt;&lt;C&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\n#define Equation(p,q)<span style=\"text-decoration: underline;\">(P+2*Q)<\/span>\r\nvoid main()\r\n{\r\nfloat A=3.2,B=4.1; \r\nfloat C=Equation(A,B); \r\ncout&lt;&lt;\"<span style=\"text-decoration: underline;\">0utput =<\/span>\"&lt;&lt;C&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 4:<br \/>\n<\/strong><\/span>Out of the following, find those identifiers, which cannot be used for naming Variables, Constants or Functions in a C++ program: <strong>All India 2016<\/strong><br \/>\nFatal*Tax, double, Case, My Name, NeW, switch, Column31,_Amount<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>Fatal*Tax, double, My Name, switch cannot be used for naming variables, constants or functions in a C++program.<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 5:<br \/>\n<\/strong><\/span>Rewrite the following C++ code after removing any\/all syntactical errors with each correction underlined. <strong>All India 2016<\/strong><br \/>\nNOTE Assume all required header files are already<br \/>\nbeing included in the program.<\/p>\n<pre>#define Formula(a,b)=2*a+b \r\nvoid main()\r\n{\r\nfloat X=3.2;Y=4.1;\r\nZ=Formula(X,Y);\r\ncout&lt;&lt;'Result='&lt;&lt;Z&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\n#define Formula(a.b)<span style=\"text-decoration: underline;\">(2*a+b)<\/span>\r\nvoid main()\r\n{\r\nfloat <span style=\"text-decoration: underline;\">X=3.2.Y=4.1<\/span>: \r\nfloat Z=Forinula(X.Y): \r\ncout&lt;&lt;\"<span style=\"text-decoration: underline;\">Result=<\/span>\"&lt;&lt;Z&lt;&lt;endl:\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 6:<br \/>\n<\/strong><\/span>Rewrite the following C++ code after removing any\/all syntactical errors with each correction underlined. <strong>All Indio 2016C<\/strong> NOTE Assume all required header files are already<br \/>\nbeing included in the program.<\/p>\n<pre>define formula(a,b,c)a+2*b+3*c; \r\nvoid main()\r\n{\r\nint L=1,M=2,N=3,\r\nJ=Formula(L,M,N); \r\ncout&lt;&lt;'output ='&lt;&lt;J&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\n#define Formula(a,b,c)<span style=\"text-decoration: underline;\">a+2*b+3*c<\/span> \r\nvoid main()\r\n{\r\nint L=1,M=2,N=3:\r\n<span style=\"text-decoration: underline;\">int J=<\/span>formula(L,M,N);\r\ncout&lt;&lt;<span style=\"text-decoration: underline;\">\"0utput=\"<\/span>&lt;&lt;j&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 7:<br \/>\n<\/strong><\/span>Find the correct identifiers Out of the following, which can be used for naming Variable, Constants or Functions in a C ++ program: <strong>Delhi 2015<\/strong><br \/>\nWhile, for, Float, new, 2ndName, A%B, Amountl2, _Counter<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span> The correct identifiers are as follows:<br \/>\nWhile, Float, Amount 12 and_Counter<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 8:<br \/>\n<\/strong><\/span>Find the correct identifiers out of the following, which can be used for naming Variables, Constants or Functions in a C++<br \/>\nFor, while, INT, NeW, delete, 1stName, Add+Subtract, name1<br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>The correct identifiers are as follows:<br \/>\nFor, INT, NeW and name1<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 9:<br \/>\n<\/strong><\/span>Observe the following C++ code carefully and rewrite the same after removing all the syntax error(s) present in the code. Ensure that you underline each correction in the code. <strong>All India 2013<\/strong><br \/>\nImportant Note:<br \/>\n(i) All the desired header files are already included, which are required to run the code.<br \/>\n(ii) Correction should not change the logic of the program.<\/p>\n<pre>\/\/define Change(A,B)2*A+B; \r\nvoid maint()\r\n{\r\nFloat X,Y,F; \r\ncin&gt;&gt;X&gt;&gt;Y ;\r\nF=Change[X,Y]; \r\ncout&lt;&lt;\"Result:\"&lt;&lt;F&lt;endline;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\n#define Change (A.B)<span style=\"text-decoration: underline;\">(2*A+B)<\/span> \r\nvoid main() \r\n{\r\n<span style=\"text-decoration: underline;\">float<\/span> X.Y.F: \r\ncin&gt;&gt;X&gt;&gt;Y;\r\nF=Chanae<span style=\"text-decoration: underline;\">(X.Y)<\/span>:\r\ncout&lt;&lt;\"Result:\u201d&lt;&lt;F&lt;&lt;<span style=\"text-decoration: underline;\">end1<\/span>:\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 10:<br \/>\n<\/strong><\/span>Observe the following OH- code carefully and rewrite the same after removing all the syntax error(s) present in the code. Ensure that you underline each correction in the code.<br \/>\nImportant Note:<br \/>\n(i) All the desired header files are already included, which are required to run the code.<br \/>\n(ii) Correction should not change the logic of the program. <strong>Delhi 2013<\/strong><\/p>\n<pre>\/\/define Convert(P,Q)P+2*Q; \r\nvoid main()\r\n{\r\nFloat A,B,Result: \r\ncin&gt;&gt;A&gt;&gt;B;\r\nResult=Convert[A,B]; \r\ncout&lt;&lt;\"Output:\"&lt;&lt;Result&lt;endl:\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\n#define Convert(P,Q)<span style=\"text-decoration: underline;\">(P+2*Q)<\/span> \r\nvoid main()\r\n{\r\n<span style=\"text-decoration: underline;\">float<\/span> A,B,Result; \r\ncin &gt;&gt;A&gt;&gt;B;\r\nResult=Convert<span style=\"text-decoration: underline;\">(A.B)<\/span>: \r\ncout&lt;&lt;\"0utput\"&lt;&lt;Result&lt;&lt;endl:\r\n)<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 11:<br \/>\n<\/strong><\/span>Give the difference between the type casting and automatic type conversion. Also, give a suitable C++ code to illustrate both. <strong>All India 2012,2011 Delhi 2010<\/strong><br \/>\n<span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>Type casting It is used by the programmer to convert the value of one type to another type,<br \/>\ne.g. float X=(float) 15\/6:<br \/>\nAutomatic type conversion It is automatically done by the compiler itself wherever required.<br \/>\ne.g. float X=3;<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 12:<br \/>\n<\/strong><\/span>What is the difference between local variable and global variable? Also, give a suitable C++ code to illustrate both. <strong>Delhi 2011<br \/>\n<\/strong> <span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>A variable which is declared within the body of a function and accessible only within the function is known as local variable.<br \/>\nA variable which is declared outside any function and accessible to all functions in a program is known as global variable.<br \/>\nTo illustrate this, below is given programming example:<\/p>\n<pre>#include&lt;iostream.h&gt;\r\nfloat area;     \/\/Global variable\r\nvoid cirarea()\r\n{\r\nfloat r;   \/\/Local variable\r\ncin&gt;&gt;r\r\narea=3.14*r*r; \r\ncout&lt;&lt;area; \r\n}\r\nvoid rectarea()\r\n{\r\nfloat l,b; \/\/Local variables\r\ncin&gt;&gt;l&gt;&gt;b;\r\narea=l*b;\r\ncout&lt;&lt;area;\r\n}\r\nvoid main()\r\n{\r\ncirarea(); \r\nrectarea();\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 13:<br \/>\n<\/strong><\/span>What is the function of typedef in C++? Also, give a suitable C++ code to illustrate it. <strong>Delhi 2011C<br \/>\n<\/strong><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>typedef keyword is used to assign alternative names to existing types.<br \/>\ne.g. typedef int in;<br \/>\nNow, whenever we want to declare a variable of type integer, rather than using int we can use \u2018in\u2019<br \/>\nkeyword in place of int.<br \/>\ne.g.<\/p>\n<pre>void main()\r\n{\r\ntypedef int in;\r\n\/\/in is an alternative name to int in a=10;\r\n\/\/a is of type integer cout&lt;&lt;a;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 14:<br \/>\n<\/strong><\/span>What is the function of #define keyword? Give an example to illustrate its use. <strong>Delhi 2009C<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/span><\/strong>#define keyword is a preprocessor directive that is used to define a macro or a symbolic constant.<br \/>\nSyntax<br \/>\n#define macroname expression<br \/>\nor<br \/>\n#define symbolic constant-value<br \/>\ne.g.<br \/>\n#define Area(R) 3.14*R*R<br \/>\n#define Max 100<\/p>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Topic_-_2_Control_Flow_and_Functions_Control_Flow\"><\/span><span style=\"color: #0000ff;\">Topic \u2013 2 <\/span><br \/>\n<span style=\"color: #0000ff;\">Control Flow and Functions Control Flow<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p style=\"text-align: center;\"><span style=\"color: #0000ff;\"><strong>1 Mark Questions<\/strong><\/span><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 1:<br \/>\n<\/strong><\/span>Ronica Jose has started learning C++ and has typed the following program. When she compiled the following code written by her, she discovered that she needs to include some header files to successfully compile and execute it. Write the names of those header files, which are required to be included in the code.<\/p>\n<pre>void main() \r\ndouble X,Times,Result; \r\ncin&gt;&gt;X&gt;&gt;Times;\r\nResult=pow(X,Times); \r\ncout&lt;&lt;Result&lt;&lt;endl ;<\/pre>\n<p><strong>All India 2016<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><\/strong><br \/>\nCiostream. h&gt;\u2192cout, cin<br \/>\n&lt;math. h&gt;\u2192pow()<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 2:<\/strong><\/span><br \/>\nJayapriya has started learning C++ and has typed the following program. When she compiled the following code written by her, she discovered that she needs to include some header files to successfully compile and execute it. Write the names of those header files, which are required to be included in this code.<\/p>\n<pre>void main()\r\n{\r\nfloat A,Number,Outcome; \r\ncin&gt;&gt;A&gt;&gt;Number;\r\nOutcome=pow(A,Number); \r\ncout&lt;&lt;Outcome&lt;&lt;endl;\r\n} <strong>Delhi 2016<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>&lt;iostream.h&gt;\u2192cout, cin<br \/>\n&lt;math.h&gt;\u2192pow( )<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 3:<br \/>\n<\/strong><\/span>Ahmad has started learning C++ and has typed the following program. When he compiled the following code written by him, he discovered that he needs to include some header files to successfully compile and execute it. Write the names of those header files, which are required to be included in the code.<\/p>\n<pre>void main() \r\nfloat Radians,Value; \r\ncin&gt;&gt;Radians;\r\nValue=sin(Radians); \r\ncout&lt;&lt;value&lt;&lt;endl;\r\n} <strong>All India 2016C<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>&lt;iostream.h&gt;\u2192cout, cin<br \/>\n&lt;math.h&gt;\u2192sin( )<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 4:<br \/>\n<\/strong><\/span>Observe the following C ++ code and write the name(s) of the header file(s), which will be essentially required to run it in a C ++ compiler.<\/p>\n<pre>void main()\r\n{\r\nfloat Area,Side;\r\ncin&gt;&gt;Area;\r\nSide=sqrt(Area);\r\ncout&lt;&lt;\"0ne Side of the Square:\"&lt;&lt;Side&lt;&lt;endl;\r\n} <strong>All India 2013<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>&lt;iostream.h&gt;\u2192 cout,cin<br \/>\n&lt;math.h&gt; \u2192sqrt( )<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 5 :<br \/>\n<\/strong><\/span>Observe the following C ++ code and write the name(s) of the header file(s), which will be essentially required to run it in a C++ compiler.<\/p>\n<pre>void main()\r\n{\r\nint Number;\r\ncin&gt;&gt;Number;\r\nif(abs(Number) == Number); \r\ncout&lt;&lt;\"Positive\"&lt;&lt;endl;\r\n} <strong>Delhi 2013<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>&lt;iostream.h&gt;\u2192 cout, cin<br \/>\n&lt;math.h&gt;\u2192abs( )<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 6:<br \/>\n<\/strong><\/span>Name the header file(s), which are essentially required to run the following program segment.<\/p>\n<pre>void main()\r\n}\r\nchar A='K',B;\r\nif(islower(A))\r\nB=toupper(A);\r\nelse\r\nB='*';\r\ncout&lt;&lt;A&lt;&lt;\"turned to\"&lt;&lt;B&lt;&lt;endl:\r\n} <strong>Delhi 2013C<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>&lt;iostream.h&gt;\u2192cout,cin<br \/>\n&lt;ctype.h&gt;\u2192 islower( ); i supper( )<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 7:<br \/>\n<\/strong><\/span>Write the names of the header files to which the following belong:<\/p>\n<ol>\n<li>puts( )<\/li>\n<li>sin( ) <strong>Delhi2009<\/strong><\/li>\n<\/ol>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>puts( )\u2192&lt;stdio.h&gt;<br \/>\nsin( )\u2192&lt;math.h&gt;<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 8:<br \/>\n<\/strong><\/span>Write the names of the header files to which the following belong:<\/p>\n<ol>\n<li>setw( )<\/li>\n<li>sart( ) All India 2009<\/li>\n<\/ol>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span> setw( )\u2192&lt;iomanip.h&gt;<br \/>\nsqrt( )\u2192&lt;math.h&gt;<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 9:<br \/>\n<\/strong><\/span>Write the names of the header files to which the following belong:<\/p>\n<ol>\n<li>puts( )<\/li>\n<li>randomizer( ) <strong>Delhi2009c<\/strong><\/li>\n<\/ol>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>puts( )\u2192&lt;stdio.h&gt;<br \/>\nrandomize( )\u2192&lt;stdlib.h&gt;<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><span style=\"color: #0000ff;\"><strong>2 Marks Questions<\/strong><\/span><\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 10:<br \/>\n<\/strong><\/span>Rewrite the following C++ code after removing any\/all syntactical errors with each correction underlined.<br \/>\nNOTE: Assume all required header files are already being included in the program.<\/p>\n<pre>void main()\r\n{\r\ncout&lt;&lt;\"Enter an Alphabet:\"; \r\ncin&gt;&gt;CH ;\r\nswitch(CH) \r\ncase 'A' cout&lt;&lt;\"Ant\";Break; \r\ncase \u2019B' cout&lt;&lt;\"Bear\u201d;Break;\r\n} <strong>All India 2017<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\nvoid main()\r\n{\r\nchar CH:\r\ncout&lt;&lt;\u201dEnter an Alphabet:\";\r\ncin&gt;&gt;CH ;\r\nswitch(CH)\r\n{\r\ncase 'A': cout\u00ab\"Ant\"; break:\r\ncase 'B'x cout&lt;&lt;\"Bear\"; break:\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 11:<br \/>\n<\/strong><\/span>Observe the following C++ code very carefully and rewrite it after removing any\/all syntactical errors with each correction underlined.<br \/>\nNOTE Assume all required header files are already being included in the program.<\/p>\n<pre>#Define float MaxSpeed = 60.5; \r\nvoid main()\r\nint MySpeed \r\nchar A!ert =\u2018N\u2019; \r\ncin&gt;&gt;MySpeed; \r\nif MySpeed&gt;MaxSpeed \r\nAlert ='Y\u2019; \r\ncout&lt;&lt;Alert&lt;&lt;endline;\r\n} <strong>All India 2015<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\n#define float Max Speed = 60.5; \r\nvoid main() \r\n{\r\nint MySpeedi;\r\nchar Alert = 'N'; \r\ncin&gt;&gt;My Speed; \r\nif(MySpeed&gt;MaxSpeed) \r\nAlert = 'y';\r\ncout&lt;&lt;Alert&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 12:<br \/>\n<\/strong><\/span>Write the output of the following C ++ program code:<br \/>\nNOTE Assume all required header files are already being included in the program.<\/p>\n<pre>void Location(int &amp;X, int Y=4) \r\nY += 2;\r\nX += Y;\r\n}\r\nvoid main()\r\n{\r\nint PX=10, PY=2;\r\nLocation(PY); \r\ncout&lt;&lt;PX&lt;&lt;\",\"&lt;&lt;PY&lt;&lt;endl; \r\nlocation(PX,PY); \r\ncout&lt;&lt;PX&lt;&lt;\",\"&lt;&lt;PY&lt;&lt;endl;\r\n} <strong>All Indio 2015<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>The output will be<br \/>\n10, 8<br \/>\n20, 8<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 13:<br \/>\n<\/strong><\/span>Observe the following C++ code very carefully and rewrite it after removing any\/all syntactical errors with each correction underlined.<br \/>\nNOTE Assume all required header files are already being included in the program.<\/p>\n<pre>\/\/Define float Max=70.0;\r\nVoid main()\r\n{\r\nint Speed \r\nchar Stop='N'; \r\ncin&gt;&gt;Speed; \r\nif Speed&gt;Max\r\nStop='Y;\r\ncout&lt;&lt;Stop&lt;&lt;end;\r\n} <strong>Delhi 2015<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<\/span><\/strong><\/span><\/p>\n<pre>The correct code is:\r\n#define float Max = 70.0;\r\nvoid main()\r\n{\r\nint Speed; \r\nchar stop = 'N'; \r\ncin&gt;&gt;Speed; \r\nif(Speed&gt;Max)\r\nStop = 'Y'; \r\ncout&lt;&lt;Stop&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 14:<br \/>\n<\/strong><\/span>Write the output of the following C++ program code:<br \/>\nNOTE Assume all required header files are already being included in the program.<\/p>\n<pre>void Position(int &amp;Cl,int C2=3)\r\n{ \r\nCl+=2;\r\nC2+=Y;\r\n}\r\nvoid main()\r\n{\r\nint P1=20, P2=4; \r\nPosition(P1); \r\ncout&lt;&lt;Pl&lt;&lt;\",\"&lt;&lt;P2&lt;&lt;endl; \r\nPosition(P2,P1); \r\ncout&lt;&lt;Pl&lt;&lt;\",\"&lt;&lt;P2&lt;&lt;endl;\r\n} <strong>Delhi 2015<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span> This program code will give error, i.e Y is undefined symbol.<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 15:<br \/>\n<\/strong><\/span>Write the output of the following C ++ program code:<br \/>\nNOTE Assume all required header files are already being included in the program.<\/p>\n<pre>void Draw(int &amp; N, CharMark='#')\r\n{\r\nfor(int 1=1;I&lt;=N;I++)\r\ncout&lt;&lt;Mark&lt;&lt;endl;\r\nN++;\r\n}\r\nvoid main()\r\n{\r\nint Count=3; char Sign='*';\r\nDraw(count);\r\nDraw(Count,Sign);\r\nDraw(Count,'&amp;');\r\n} <strong>All India 2015C<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span> The output will be:<br \/>\n#<br \/>\n#<br \/>\n#<br \/>\n*<br \/>\n*<br \/>\n*<br \/>\n*<br \/>\n&amp;<br \/>\n&amp;<br \/>\n&amp;<br \/>\n&amp;<br \/>\n&amp;<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 16:<br \/>\n<\/strong><\/span>Write a user defined function DIVT( ) which takes an integer as parameter and returns whether it is divisible by 13 or not. The function should return 1 if it is divisible by 13, otherwise it should return 0. <strong>All India 2014C<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<\/span><\/span><\/strong><\/p>\n<pre>int DIVT(intx)\r\n{ \r\nif(%u == 0)\r\nreturn 1; \r\nelse\r\nreturn 0;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 17:<br \/>\n<\/strong><\/span>What is the difference between actual and formal parameter? Give a suitable example to illustrate using a C++ code.<br \/>\n<strong>Delhi 2014<\/strong><br \/>\n<strong>or<\/strong><br \/>\nDifference between the actual parameters and formal parameters. Also, give a suitable C++ code to illustrate both.<br \/>\n<strong>Delhi 2013C; Delhi 2012; All India 2009<br \/>\n<span style=\"color: #eb4924;\"><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/span><\/strong>Differences between actual and formal parameters are as follows:<\/p>\n<table border=\"2\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\"><strong>Actual Parameter<\/strong><\/td>\n<td style=\"text-align: center;\"><strong>Formal Parameter<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\">Parameters provided at the time of function calling are called actual parameters. These parameters contain actual values.<\/td>\n<td>\n<p style=\"text-align: center;\">Parameters provided at the time of function definition are called formal parameters.<\/p>\n<p style=\"text-align: center;\">These parameters are simple variable declarations, i.e. they do not contain actual values.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<pre>e.g. #inc1ude&lt;iostream.h&gt; \r\n#include&lt;conio.h&gt; \r\nvoid swap(int n1, int n2)   \/\/Formal Parameters\r\n{\r\nint temp = n1; \r\nn1=n2; \r\nn2=temp;\r\ncout&lt;&lt;\"Values of numl and num2 after swapping:\"; \r\ncout&lt;&lt;n1&lt;&lt;\" \"&lt;n2;\r\n}\r\nvoid main()\r\n{\r\nint num1, num2; \r\ncout&lt;&lt;\"Enter two numbers:\"; \r\ncin&gt;&gt;num1&gt;&gt;num2; \r\nswap(num1,num2);   \/\/Actual Parameters\r\ngetch();\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 18:<br \/>\n<\/strong><\/span>Find the output of the following program: <strong>All India 2014C<\/strong><\/p>\n<pre>#include&lt;iostream.h&gt;\r\nvoid in(int x, int y, int &amp;z)\r\n}\r\nx+=y;\r\ny--;\r\nz*=(x-y);\r\n}\r\nvoid out(int z, int y, int &amp;x)\r\n{\r\nx*=y; \r\ny ++;\r\nz\/=(x+y); \r\n}\r\nvoid main()\r\n{\r\nint a=20, b=30, c=10; \r\nout(a,c,b);\r\ncout&lt;&lt;a&lt;&lt;\"#\"&lt;&lt;b&lt;&lt;\"#\"&lt;&lt;c&lt;=&gt;&lt;\"#\"&lt;&lt;endl: \r\nin(b,c,a):\r\ncout&lt;&lt;a&lt;&lt;\"@\"&lt;&lt;b&lt;&lt;''@\"&lt;&lt;c=&gt;&lt;&lt;\"#\"&lt;&lt;endl; \r\nout(a,b,c);\r\ncout&lt;&lt;a&lt;&lt;\"$\"&lt;&lt;b&lt;&lt;\"$\"&lt;&lt;c&lt;&lt;\u201d=&gt;$\"&lt;&lt;endl;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>Output<br \/>\n20#300#10#<br \/>\n602 0@ 3 0 0@10@<br \/>\n6020$300$3000$<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 19:<br \/>\n<\/strong><\/span>What is the benefit of using default parameter\/argument in a function? Give a suitable example to illustrate it using C++ code. <strong>All Indio 2013<br \/>\n<\/strong><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>A default parameter is a function parameter that has a default value provided to it. If the user does not supply a value for this parameter, the default value will be used. If the user supply a value for the default parameter, the user-supplied value is used. Consider the following program:<\/p>\n<pre>void PrintValues(int nValue1, int nValue2=10) \r\n{\r\ncout&lt;&lt;\"1st value:\"&lt;&lt;nValue1&lt;&lt;endl; \r\ncout&lt;&lt;\"2nd value :\"&lt;&lt;nValue2&lt;&lt;endl;\r\n}\r\nvoid main()\r\n{\r\nPrintValues(1);   \/\/nValue2 will use default parameter of 10\r\nPrintValues(3.4);  \/\/override default value for nValue2\r\n}\r\nThis program produce the following output :\r\n1st value: 1 \r\n2nd value: 10 \r\n1st value: 3 \r\n2nd value: 4<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 20:<br \/>\n<\/strong><\/span>What is the benefit of using function prototype for a function? Give a suitable example to illustrate it using a C++ code<br \/>\n<strong>Delhi 2013<br \/>\n<\/strong><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>The function prototype serve to ensure that calls to the function are made with the proper number and types of arguments. In the case of function overloading, the different prototypes serve to distinguish which version of the function to call. The computer will complain with an error, if no function prototype is found for any particular call to function.<\/p>\n<pre>e.g.\r\n#include&lt;iostream.h&gt;\r\nint square(int);    \/\/Function prototype\r\nvoid main()\r\nfor(int x=l;x&lt;=10;x++) \r\ncout&lt;&lt;square(x)&lt;&lt;\" \":\r\ncout&lt;&lt;endl;\r\n}\r\nint square(int y)   \/\/Function definition\r\n{\r\nreturn y*y;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 21:<br \/>\n<\/strong><\/span>Find out the expected correct output(s) from the options (i) to (iv) for the following C++ code. Also, find out the minimum and the maximum value that can be assigned to the variable stop used in the code.<\/p>\n<pre>void main()\r\n{\r\nrandomize();\r\nint Begin=3,stop;\r\nfor(int Run=l;Run&lt;4;Run++)\r\n{\r\nstop=random(Begin)+6; \r\ncout&lt;&lt;Begin++&lt;&lt;stop&lt;&lt;\u201d*\";\r\n}\r\n}\r\n(i) 36*46*59*\r\n(ii) 37*46*56*\r\n(iii) 37*48*57* \r\n(iv) 35*45*57* <strong>Delhi 2013C<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>Expected output : (ii), (iii)<br \/>\nMinimum value is 6<br \/>\nMaximum value is 8<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 22:<br \/>\n<\/strong><\/span>Go through the C++ code shown below and find out the possible output or output from the suggested output (i) to (iv). Also, write the least value and highest value, which can be assigned to the variable Guess.<\/p>\n<pre>#include&lt;iostream.h&gt; \r\n#include&lt;stdlib.h&gt; \r\nvoid main()\r\n{\r\nrandomze(); \r\nint Guess, High=4; \r\nGuess=random(High)+50; \r\nfor(int C=Guess;C&lt;=55;C++) \r\ncout&lt;&lt;C&lt;&lt;\"#\";\r\n(i) 50#51#52#53#54#55#\r\n(ii) 52#53#54#55#\r\n(iii) 53#54#\r\n(iv) 51#52#53#54#55 <strong>Delhi 2011<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>Possible outputs are (i), (ii)<br \/>\nLeast value of Guess = 50<br \/>\nHighest value of Guess = 53<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 23:<br \/>\n<\/strong><\/span>Go through the C++ code shown below, and find out the possible output or output from the suggested Output Options (i) to<br \/>\n(iv) . Also, write the minimum and maximum values, which can be assigned to the variable MyNum.<\/p>\n<pre>#include&lt;iostream.h&gt;\r\n#include&lt;stdlib.h&gt; \r\nvoid main()\r\n{\r\nrandomize(); \r\nint MyNum,Max=5; \r\nMyNum=20+random(Max); \r\nfor(int N=MyNum;N&lt;=25;N++) \r\ncout&lt;&lt;N&lt;&lt;\"*\";\r\n}\r\n(i) 20*21*22*23*24*25 \r\n(ii) 22*23*24*25*\r\n(iii) 23*24*\r\n(iv) 21*22*23*24*25 <strong>All India 2011<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>The possible outputs is (ii)<br \/>\nThe minimum value of MyNum = 20<br \/>\nThe maximum value of MyNum = 24<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 24:<br \/>\n<\/strong><\/span>The following code is from game, which generates a set of 4 random numbers. Yallav is playing this game, help him to identify the correct option(s) out of the four choices given below as the possible set of such numbers generated from the program code, so that he wins the game. Justify your answer.<\/p>\n<pre>#include&lt;iostream.h&gt; \r\n#include&lt;stdlib.h&gt; \r\nconst int Low=15; \r\nvoid main()\r\n{\r\nrandomize();\r\nint P0INT=5,Number;\r\nfor(int 1=1;I&lt;=4;I++)\r\n{\r\nNumber=Low+random(POINT); \r\ncout&lt;&lt;Number&lt;&lt;\":\";\r\n(i) 19 : 16 : 15 : 18 :\r\n(ii) 14 : 18 : 15 : 16 :\r\n(iii) 19 : 16 : 14 : 18 :\r\n(iv) 19 : 16 : 15 : 16 : <strong>Delhi 2010<\/strong>\r\n<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswers:<\/span><\/strong><\/span><br \/>\n(iv) 19 : 16 : 15 : 16 :<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 25:<\/strong><\/span><br \/>\nThe following code is from a game, which generates a set of 4 random numbers. Praful is playing this game, help him to identify the correct option(s) out of the four choices given below as the possible set of such numbers generated from the program code, so that he wins the game. Justify your answer.<\/p>\n<pre>#include&lt;iostream.h&gt; \r\n#include&lt;stdlib.h&gt; \r\nconst int Low=25; \r\nvoid main()\r\n{\r\nrandomize();\r\nint P0INT=5,Number;\r\nfor(int I=1;I&lt;=4;I++)\r\n{\r\nNumber=Low + random(POINT); \r\ncout\u00abNumber&lt;&lt;\":\u201d; \r\nPOINT--;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswer:<br \/>\n<\/span><\/strong><\/span>(iv) 29 : 26 : 25 : 26 :<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 26:<\/strong><\/span><br \/>\nStudy the following program and select the possible output from it<\/p>\n<pre>#include&lt;iostream.h&gt; \r\n#include&lt;stdlib.h&gt; \r\nconst int LIMIT=4; \r\nvoid main()\r\n{\r\nrandomize(); \r\nint Points;\r\nPoints=100+random(LIMIT); \r\nfor(int P=Points';P&gt;=100;P--) \r\ncout&lt;&lt;P&lt;&lt;\"#\"; \r\ncout&lt;&lt;endl;\r\n}\r\n(i) 103 # 102 # 101 # 100 #\r\n(ii) 100 # 101 # 102 # 103 #\r\n(iii) 100 # 101 # 102 # 103 # 104 #\r\n(iv) 104 # 103 # 102 # 101 # 100 # <strong>Delhi 2009<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswers:<br \/>\n<\/span><\/strong><\/span>(i) 103 # 102 # 101 # 100#<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 27:<br \/>\n<\/strong><\/span>Study the following program and select the possible output from it<\/p>\n<pre>#include&lt;iostream.h&gt; \r\n#include&lt;stdlib.h&gt; \r\nconst int MAX=3; \r\nvoid main()\r\n{\r\nrandomize(); \r\nint Number;\r\nNumber=50+random(MAX); \r\nfor(int P=Number;P&gt;=50;P--) \r\ncout&lt;&lt;P&lt;&lt;\"#\u201d; \r\ncout&lt;&lt;endl;\r\n}\r\n(i) 53 # 52 # 51 # 50\r\n(ii) 50 # 51 # 52 #\r\n(iii) 50 # 51 #\r\n(iv) 51 # 50 # All <strong>India 2009<\/strong><\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswers:<br \/>\n<\/span><\/strong><\/span>(iv) 51 # 50 #<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 28:<br \/>\n<\/strong><\/span>In the following program, find the correct possible output(s) from the options<\/p>\n<pre>#include&lt;iostream.h&gt;\r\n#include&lt;stdlib.h&gt; \r\nvoid main()\r\n{\r\nrandomize(); \r\nint x=125,y=99; \r\nint a=random(3)+4; \r\nint b=random(2)+2; \r\nfor(int i=0;i&lt;a;i++) \r\ncout&lt;&lt;\"&amp;\u201d; \r\ncout&lt;&lt;x&lt;&lt;\",\";\r\nfor(i=0;i&lt;b;i++) \r\ncout&lt;&lt;\"*\"; \r\ncout&lt;&lt;y&lt;&lt;endl;\r\n}\r\n(i) &amp;&amp;125,*99 \r\n(ii) &amp;&amp;125,**99\r\n(iii) &amp;&amp;&amp;&amp;&amp;&amp;125,**99 \r\n(iv) &amp;&amp;&amp;&amp;125,***99<\/pre>\n<p><span style=\"color: #eb4924;\"><strong><span style=\"color: #008000;\">\u0410nswers:<br \/>\n<\/span><\/strong><\/span>(iii) &amp;&amp;&amp;&amp;&amp;&amp;125, **99<br \/>\n(iv) &amp;&amp;&amp;&amp;125, ***99<\/p>\n<p>&nbsp;<\/p>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"Previous_Years_Examination_Questions_Topic_3\"><\/span><span style=\"color: #0000ff;\">Previous Years Examination Questions (Topic 3)<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"1_Mark_Questions\"><\/span><span style=\"color: #0000ff;\">(1 Mark Questions)<\/span><span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong><span style=\"color: #eb4924;\">Question 1:<\/span><\/strong><br \/>\nAnil typed the following C++ code and during compilation he found three errors as follows:<\/p>\n<p style=\"padding-left: 30px;\"><strong>(i)<\/strong> Function strlen should have prototype<br \/>\n<strong>(ii)<\/strong> Undefined symbol cout<br \/>\n<strong>(iii)<\/strong> Undefined symbol endl <span style=\"text-decoration: underline;\"><strong> All India 2017<\/strong><\/span><\/p>\n<p>On asking, his teacher told him to include necessary header files in the code. Write the names of the header files, which Anil needs to include, for successful compilation and execution of the following code:<\/p>\n<pre>void main()\r\n {\r\n char Txt [ ] = \"Weicome\"; \r\nfor (int C=0; (Xstrlen(Txt);C++) \r\nTxt [C] = Txt[C]+1: \r\ncout&lt;&lt;Txt&lt;&lt;endl:\r\n}<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>For strlen \u2192 &lt;string.h&gt; \r\n<strong>For cout<\/strong>, endl \u2192 &lt;iostream.h&gt;<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 2:<\/span><\/strong><br \/>\nObserve the following program very carefully and write the names of those header file(s), which are essentially needed to compile and execute the following program successfully. <strong>All India 2015 <\/strong><\/p>\n<pre>typedef char STRING[80] ;\r\n void main( )\r\n (\r\n STRING Txt [] = \"We love Peace\"; \r\nint Count = 0: \r\nwhile(Txt [Count]! = \"\\0\")\r\n if(isalpha (Txt[Count]) )\r\n Txt [Count++] = \"@\";\r\n else\r\n Txt [Count++] = \"#\";\r\nputs (Txt);\r\n }<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;ctype.h&gt; \u2192 isalpha \r\n&lt;stdio.h&gt; \u2192 puts<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 3:<\/span><\/strong><br \/>\nObserve the following program very carefully and write the names of those<br \/>\nheader file(s), which are essentially needed to<br \/>\ncompile and execute the following program successfully. <span style=\"text-decoration: underline;\"><strong>Delhi 2015<\/strong><\/span><\/p>\n<pre>typedef char TEXT[80]; \r\nvoid main()\r\n{\r\nTEXT Str [ ]=\"Peace is supreme\"; \r\nint Index = 0; \r\nwhile(Str[Index]1= \"\\0\") \r\nif(isupper(Str [Index])) Str[Index++] = \"#\" ;\r\nelse\r\nStr[Index++]=\"*\" ; puts(Str);\r\n}<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;ctype.h&gt;\u2192isupper \r\n&lt;stdio.h&gt;\u2192 puts<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 4:<\/strong><\/span><br \/>\nName the header files that shall be needed for successful compilation of the following C++ code <span style=\"text-decoration: underline;\"><strong>All Indio 2014 C<\/strong><\/span><\/p>\n<pre>void main()\r\n {\r\n char str[20], str[20]; \r\ngets(str) ; strcpy(strl,str): \r\nstrrev(str);\r\n puts(str) ; \r\nputs(strl);\r\n}<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;stdio.h&gt; \u2192 puts, gets \r\n&lt;std1ib&gt; \u2192 strcpy(),strrev()<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 5:<\/strong><\/span><br \/>\nObserve the following C++ code and write the name(s) of the header file(s), which will be essentially required to run it in a C++ compiler.<\/p>\n<pre>void main()\r\n{\r\n char Text[20],C; \r\ncin&gt;&gt;Text;\r\n C=tolower(Text[0]) ; \r\ncout&lt;&lt;C&lt;&lt;\"is the first char of\"\r\n &lt;&lt;Text&lt;&lt;endl ;\r\n}  <strong><span style=\"text-decoration: underline;\">Delhi 2014<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iostream.h&gt;cout, cin \r\n&lt;ctype.h&gt;tolower( )<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 6:<\/strong><\/span><br \/>\nObserve the following C++ code and write the name(s) of the header file(s), which will be essentially required to run it in a C++ compiler.<\/p>\n<pre>void main()\r\n{\r\nchar CH, STRC20]: \r\ncin&gt;&gt;STR;\r\nCH=toupper(STRCO]); \r\ncout&lt;&lt;STR&lt;&lt;\"starts with\"&lt;&lt;CH&lt;&lt;endl ;\r\n} <span style=\"text-decoration: underline;\"> <strong>All India 2014<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iostream.h&gt;cin, cout \r\n&lt;ctype.h&gt; toupper()<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 7:<\/strong><\/span><br \/>\nWhich C++ header file(s) are essentially required to be included to run\/execute the following C++ source code?<\/p>\n<p><strong>NOTE<\/strong> Do not include any header file, which is\/are not required,<\/p>\n<pre>void main( )\r\n{\r\nchar STRING [ ] =\"SomeThing\" ; \r\ncout&lt;&lt;\u201dBal ance Characters : \"&lt;&lt;160- \r\nstrlen(STRING)&lt;&lt;endl ;\r\n<strong>} <\/strong><span style=\"text-decoration: underline;\"><strong>Delhi 2012<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iostream.h&gt;\u2192Cout \r\n&lt;string.h&gt;\u2192 strlen()<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 8:<\/strong><\/span><br \/>\nWhich C++ header file(s) are essentially required to-be included to run\/execute the following C++ source code?<br \/>\n<strong>NOTE<\/strong> Do not include any header file, which is\/are not required<\/p>\n<pre>void main()\r\n{\r\nchar STRING[]=\"SomeThing\" ; \r\ncout&lt;&lt;\"Remaining SMS Chars :\"&lt;&lt;160- \r\nstrlen(STRING)&lt;&lt;endl ;\r\n} <strong><span style=\"text-decoration: underline;\">All India 2012\r\n<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iostream.h&gt; \u2192 cout\r\n&lt;string.h&gt; \u2192 strlen()<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 9:<\/span><\/strong><br \/>\nWrite the names of the header files, which is\/are essentially required to run\/execute the following C++ code.<\/p>\n<pre>void main()\r\n{\r\nchar C, string[]=\"Excellence Overload\"; \r\nforfint 1=0 ; string[I] !='\\0';I++) \r\nif(string[I]== \" \u201d) \r\ncout&lt;&lt;endl; \r\nelse \r\n{\r\nC=toupper(string[I]) ; \r\ncout&lt;&lt;C;\r\n} <strong><span style=\"text-decoration: underline;\">Delhi 2011<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iostream.h&gt;\u2192cout \r\n&lt;ctype.h&gt;\u2192toupper()<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 10:<\/span><\/strong><br \/>\nWrite the names of the header files, which is\/are essentially required to run\/execute the following C++ code.<\/p>\n<pre>void main()\r\n{\r\nchar CH,Text[] = \"+ve Altitude\"; \r\nfortint I = 0;Text [I]!=\u2018\\0\u2019;I++) \r\nif(TextCI] -- 1) cout&lt;&lt;endl ; \r\nelse \r\n{\r\nCH = toupper(Text[I]); \r\ncout&lt;&lt;CH;\r\n}\r\n} <span style=\"text-decoration: underline;\"><strong>All India 2011<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;ctype.h&gt;\u2192toupper()\r\n&lt;iostream.h&gt;\u2192cout<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 11:<\/strong><\/span><br \/>\nWhich C++ header file(s) will be essentially required to be included to run\/execute the following C++ code?<\/p>\n<pre>void main() \r\n{\r\nchar Name[20]; \r\ncin&gt;&gt;Name; \r\ntoupper (Name[0]); \r\ncout&lt;&lt;Name&lt;&lt;endl;\r\n} <strong><span style=\"text-decoration: underline;\">Delhi 2011C<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iostream.h&gt;\u2192C0ut,cin \r\n&lt;ctype.h&gt;\u2192 toupper()<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 12:<\/span><\/strong><br \/>\nWhich C++header file(s) will be essentially required to be included to run\/execute the following C++ code?<\/p>\n<pre>void main()\r\n{\r\nint Eno=123, char EName[]\r\n=\"Rehan Swarop\"; \r\ncout&lt;&lt;setw(5)&lt;&lt;Eno&lt;setw(25)\r\n&lt;&lt;EName&lt;&lt;endl;\r\n) <span style=\"text-decoration: underline;\"><strong>Delhi 2010<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iomanip.h&gt; \u2192 setw() \r\nCiostream.h&gt; \u2192 Cout<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 13:<\/strong><\/span><br \/>\nWhich C++header file(s) will be<br \/>\nessentially required to be included to run\/execute the following C++ code?<\/p>\n<pre>void main()\r\n{ \r\nint Rno=24;\r\nchar Name[]=\"Aman Singhania\";\r\ncout&lt;&lt;setw(10X&lt;Rno&lt;&lt;setw(20)\r\n&lt;&lt;Name&lt;&lt;endl;\r\n} <span style=\"text-decoration: underline;\"><strong>All India 2010\r\n<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>&lt;iomanip.h&gt;\u2192setw()\r\n&lt;iostream.h&gt;\u2192cout<\/pre>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"2_Marks_Questions\"><\/span><span style=\"color: #0000ff;\"> (2 Marks Questions)<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"color: #eb4924;\"><strong>Question 14:<\/strong><\/span><br \/>\nFind and write the output of the following C++ program code:<br \/>\n<strong>NOTE<\/strong> Assume all required header files are already included in the program.<\/p>\n<pre># define Diff(N1,N2)\r\n((N1&gt;N2)?N1-N2:N2-N1)\r\nvoid main ()\r\n{\r\nint A,B,NUM[] = {10,23,14,54,321 ; \r\nfor(int CNT=4; CNT&gt;0; CNT--)\r\n{\r\nA=NUM[CNT] ;\r\nB=NUM[CNT-1] ; \r\ncout&lt;&lt;Diff(A,B)&lt;&lt;'#' :\r\n}\r\n} <span style=\"text-decoration: underline;\"><strong>All India 2017<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>Output\r\n22#40#9#13#<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 15:<\/strong><\/span><br \/>\nLook at the following C++ code and find the possible outputs(s) from the options (i) to (iv) following it. Also, .write the maximum values that can be assigned to each of the variables N and M.<br \/>\n<strong>NOTE<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u2022 Assume all the required header files are already being included in the code.<br \/>\n\u2022 The function random(n) generates an integer between 0 and n-1.<\/p>\n<pre>void main()\r\n {\r\n randomize() ;\r\n int N=random(3), M=random(4);\r\n int DOCK[3][3]\r\n = {{1,2,3},{2,3,4},1{3,4,5,}}:\r\n for (int R=0; R&lt;N; R++)\r\n {\r\n for(int C=0; C&lt;M; C++)\r\n cout&lt;&lt;DOCK[R][C]&lt;&lt;\" cout&lt;&lt;endl ;<\/pre>\n<table border=\"2\">\n<tbody>\n<tr>\n<td width=\"111\"><strong>(i)<\/strong><\/td>\n<td width=\"118\"><strong>(ii)<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"111\">1       2      3<\/td>\n<td width=\"118\">1       2      3<\/td>\n<\/tr>\n<tr>\n<td width=\"111\">2      3      4<\/td>\n<td width=\"118\">2      3      4<\/td>\n<\/tr>\n<tr>\n<td width=\"111\">3     4       5<\/td>\n<td width=\"118\"><\/td>\n<\/tr>\n<tr>\n<td width=\"111\"><strong>(iii)<\/strong><\/td>\n<td width=\"118\"><strong>(iv)<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"111\">1       2<\/td>\n<td width=\"118\">1          2<\/td>\n<\/tr>\n<tr>\n<td width=\"111\">2      3<\/td>\n<td width=\"118\">2         3<\/td>\n<\/tr>\n<tr>\n<td width=\"111\"><\/td>\n<td width=\"118\">3         4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>Possible Outputs: (ii) and (iii)<br \/>\nMaximum value of N is 2.<br \/>\nMinimum value of N is 0.<br \/>\nMaximum value of M is 3.<br \/>\nMinimum value of M is 0.<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 16:<\/strong><\/span><br \/>\nFind and write the output of the following C++ program code: <strong>All India 2016<\/strong><br \/>\n<strong>NOTE <\/strong>Assume all required header files are already included in the program.<\/p>\n<pre>typedef char TEXT[80]; \r\nvoid JumbleUp(TEXT T)\r\n{\r\nint L=strlen(T);\r\nfor(int C=0; C&lt;L-1; C+=2)\r\n{\r\nchar CT=T[C]:\r\nT[C]=T[C+1] :\r\nT[C+1]=CT;\r\n}\r\nfor(C=1: C&lt;L; C+=2)\r\ni f(T [C]&gt;= \u2019 M ' &amp;&amp; T[C]&lt;='U' )\r\nT[C]='@' :\r\n}\r\nvoid main()\r\n{\r\nTEXT Str=\"HARMONIOUS\";\r\nJumbleUp(Str) ;\r\ncout&lt;&lt;Str&lt;&lt;endl :\r\n}<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>The output will be\r\nAHM@N@OIS@<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 17:<\/strong><\/span><br \/>\nLook at the following C++ code and find the possible output(s) from the options (i) to (iv) following it. Also, write the maximum and the minimum values that can he assigned to the variable PICKER. <span style=\"text-decoration: underline;\"><strong>All India 2016<\/strong><\/span><br \/>\n<strong>NOTE<\/strong> Assume all required header files are already being included in the code. The function random(n) generates an integer between 0 and n -1.<\/p>\n<pre>void main()\r\n {\r\n int PICKER:\r\n PICKER=1+random(3) ;\r\n char COLOURC][5]={\"BLUE\",\"PINK\u201d, \"GREEN\u201d,\"RED\"):\r\n for(int I=0;I&lt;=PICKER; I++)\r\n {\r\n for(int J=0;J&lt;=I; J++)\r\n cout&lt;&lt;COLOUR[J] :\r\n cout&lt;&lt;endl:\r\n }\r\n }<\/pre>\n<table border=\"2\">\n<tbody>\n<tr>\n<td style=\"text-align: center;\" width=\"65\"><strong>(i)<\/strong><\/td>\n<td style=\"text-align: center;\" width=\"68\"><strong>(ii)<\/strong><\/td>\n<td style=\"text-align: center;\" width=\"71\"><strong>(iii)<\/strong><\/td>\n<td style=\"text-align: center;\" width=\"62\"><strong>(iv)<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"65\">PINK<\/td>\n<td style=\"text-align: center;\" width=\"68\">BLUE<\/td>\n<td style=\"text-align: center;\" width=\"71\">GREEN<\/td>\n<td style=\"text-align: center;\" width=\"62\">BLUE<\/td>\n<\/tr>\n<tr>\n<td width=\"65\">PINKGREEN<\/td>\n<td style=\"text-align: center;\" width=\"68\">BLUEPINK<\/td>\n<td style=\"text-align: center;\" width=\"71\">GREENRED<\/td>\n<td style=\"text-align: center;\" width=\"62\">BLUEPINK<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"65\">PINKGREEN<\/td>\n<td style=\"text-align: center;\" width=\"68\">BLUEPINK<\/td>\n<td width=\"71\"><\/td>\n<td style=\"text-align: center;\" width=\"62\">BLUEPINK<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: center;\" width=\"65\">RED<\/td>\n<td width=\"68\">\n<p style=\"text-align: center;\">GREEN<\/p>\n<p style=\"text-align: center;\">BLUEPINK<\/p>\n<p style=\"text-align: center;\">GREENRED<\/p>\n<\/td>\n<td width=\"71\"><\/td>\n<td style=\"text-align: center;\" width=\"62\">GREEN<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>The possible outputs are (ii) and (iv)<br \/>\nMinimum value of PICKER = 1<br \/>\nMaximum value of PICKER = 3<\/p>\n<p><strong><span style=\"color: #eb4924;\">Question 18:<\/span><\/strong><br \/>\nFind and write the output of the following C++ program code: Delhi 2016 NOTE Assume all required header files are already included in the program,<\/p>\n<p>typedef char STRING [80];<br \/>\nvoid MIXITNOW(STRING S)<br \/>\n{<br \/>\nint Size=strlen(S) :<br \/>\nfor(int I=0; I&lt;Size-1; I+=2)<br \/>\nChar WS = S[I] ;<br \/>\nS[I] = S[I+1]:<br \/>\nS[I+1]=WS;<br \/>\n}<br \/>\nfor( I=1 ; I&lt;Size; I+=2)<br \/>\nif(S[I]&gt;=\u2019M\u2019 &amp;&amp; S[I]&lt;=\u2019U\u2019)<br \/>\nS[I]=\u2019@\u2019;<br \/>\n}<br \/>\nvoid main( )<br \/>\n{<br \/>\nSTRING Word = \u201cCRACKAJACK\u201d;<br \/>\nMIXITNOW(Word) ;<br \/>\ncout&lt;&lt;Word&lt;&lt;endl;<\/p>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre><strong>Output<\/strong>\r\nRCCAAKAJKC<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 19:<\/strong><\/span><br \/>\nLook at the following C++ code and find the possible output(s) from the options (i) to (iv) following it. Also, write the maximum and the minimum values that can be assigned to the variable CHANGER. <span style=\"text-decoration: underline;\"><strong>Delhi 2016<\/strong><\/span><br \/>\n<strong>NOTE<\/strong> Assume all the required header files are already being included in the code. The function random(n) generates an integer between 0 and n -1.<\/p>\n<pre>void main()\r\n {\r\n randomize();\r\n int CHANGER;\r\n CHANGER = random(3);\r\n char CITY[ ][25] = {\"DELHI\", \"MUMBAI\",\"KOLKATA\",\"CHENNAI\"};\r\n for(int 1=0; I&lt;=CHANGER; I++)\r\n {\r\n forlint J=0; J&lt;=I; J++)\r\n cout&lt;&lt;CITY[J] ;\r\n cout&lt;&lt; endl;\r\n<strong><span style=\"color: #008000;\">Answer:<\/span><\/strong>\r\n\r\nThe possible outputs are (i) and (ii)\r\nMinimum value of CHANGER = 0\r\nMaximum value of CHANGER = 2\r\n\r\n<span style=\"color: #eb4924;\"><strong>Question 20:<\/strong><\/span>\r\nStudy the following program and select the possible output(s) from the options (i) to (iv) following \r\nit. Also, write the maximum and the minimum values that can be assigned to the variable NUM. \r\n<span style=\"text-decoration: underline;\"><strong>Delhi 2015<\/strong><\/span>\r\n<strong>NOTE<\/strong> Assume all required header files are already being included in the program, \r\nrandom(n) function generates an integer between 0 and n-1.<\/pre>\n<pre>void main()\r\n {\r\n randomize(); \r\nint NUM;\r\n NUM=random(3)+2;\r\n char TEXT[]=\"ABCDEFGHIJK\";\r\n for(int 1=1; 1&lt;=NUM; I++)\r\n for(int J=NUM; J&lt;=7; J++) \r\ncout&lt;&lt;TEXT( J ) ;\r\ncout&lt;&lt;endl ;\r\n}\r\n}<\/pre>\n<p>(i) FGHI       (ii) BCDEFG          (iii) EFGH       (iv) CDEFG<br \/>\nH                                                           H<br \/>\nFGHI              BCDEFG                  EFGH               CDEFG<br \/>\nH                                                           H<br \/>\nFGHI                                                EFGH<br \/>\nFGHI                                                EFGH<\/p>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>The possible outputs are (iii) and (iv)<br \/>\nMinimum value of Num = 2<br \/>\nMaximum value of NUM = 4<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 21:<\/strong><\/span><br \/>\nStudy the following program and select the possible output(s) from the options (i) to (iv) following it. Also, write the maximum and the minimum values that can be assigned to the variable VAL. <strong>All India 2015<\/strong><br \/>\n<strong>NOTE<\/strong> Assume all required header files are already being included in the program. Random(n) function generates an integer between 0 and n-1.<\/p>\n<p>void main()<br \/>\n{<br \/>\nrandomizef);<br \/>\nint VAL;<br \/>\nVAL=random(3) + 2;<br \/>\nchar GUESSC] =\u201dABCDEFGHIJK\u201d;<br \/>\nfor(int 1=1; K=VAL; I++)<br \/>\n{<br \/>\nfor(int J=VAL; J&lt;=7; J-F-F)<br \/>\ncout&lt;&lt;GUESS[J] ;<br \/>\ncout&lt;&lt;endl ;<\/p>\n<p>(i) BCDEFGH    (ii) CDEFGH    (iii) EFGH    (iv) FGHI<br \/>\nBCDEFGH         CDEFGH             EFGH           FGHI<br \/>\nEFGH           FGHI<br \/>\nEFGH           FGHI<\/p>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>The possible outputs are (ii) and (iii).<br \/>\nMinimum value of VAL = 2<br \/>\nMaximum value of VAL = 4<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 22:<\/strong><\/span><br \/>\nObserve the following C +4- code very carefully and rewrite it after removing any\/all syntactical errors with each correction underlined.<br \/>\n<strong>NOTE<\/strong> Assume all required header files are already being included in the program,<\/p>\n<pre>const float PIE = 3.1416; \r\nvoid main( )\r\n{\r\nfloat Radius =(3.5,6.2,8.6,9.11.Area; \r\nint N;\r\ncout&lt;&lt;'Enter N (Less than 5)?'; cin&gt;&gt;N;\r\nfor (0=0 ; C&lt;N ; C++ )\r\n{\r\nArea=PIE*Radius[C] *Radius CC]; \r\ncout&lt;&lt;Area&lt;&lt;endline ;\r\n}\r\n} <strong><span style=\"text-decoration: underline;\">All India 2015c<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Const float PIE = 3.1416;<\/strong><\/p>\n<pre>void main()\r\n(\r\nfloat <span style=\"text-decoration: underline;\">Radius[]<\/span> = {3.5, 6.2, 8.6, 9.1}, \r\nArea;\r\nint N;\r\ncout <span style=\"text-decoration: underline;\">&lt;&lt;\"Enter N (Less than 5)?\":<\/span> \r\ncin&gt;&gt;N ;\r\nfor (int <span style=\"text-decoration: underline;\">C=O<\/span>: C&lt;N; C++)\r\n{\r\nArea = PIE* Radius[C]* Radi us[C] ; \r\ncout&lt;&lt;Area&lt;&lt;end!;\r\n}\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 23:<\/strong><\/span><br \/>\nStudy the following program and select the possible output(s) from the options (i) to (iv) following it. Also, write the maximum and the minimum values that can be assigned to the variable VALUE. <strong>All Indio 2015C<\/strong><br \/>\n<strong>NOTE<\/strong> Assume all required header files are already being included in the program. Random(n) function generates an integer between 0 and n-1.<\/p>\n<pre>void main()\r\n{\r\nrandomize();\r\nint VALUE;\r\nVALUE=random(2) + 2;\r\nchar Y0URTEXT[]\r\n=(\"ONE\u201d,\"TWO\",\"SIX\u201d,\"TEN\"} ;\r\nfor(int Y=0;Y&lt;VALUE; Y++)\r\nCOUt&lt;&lt;Y0URTEXT[Y] ;\r\ncout&lt;&lt;\"END\"&lt;&lt;endl ;\r\ncout&lt;&lt;endl;\r\n}<\/pre>\n<p>(i)                             (ii)                               (iii)                                 (iv)<br \/>\nONETWOEND  ONEENDTWO   ONETWOSIXEND      ONETWOSIXEND<\/p>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<p>The possible outputs are (i) and (iv)<br \/>\nMinimum value of VALUE = 2<br \/>\nMaximum value of VALUE = 3<\/p>\n<p><strong><span style=\"color: #eb4924;\">Question 24:<\/span><\/strong><br \/>\nDeepa has just started working as a programmer in STAR SOFTWARE company. In the company, she has got her first assignment to be done using a C++ function to find the smallest number out of a given set of numbers stored in a one-dimensional array. But she has committed some logical mistakes while writing the code and is not getting the desired result. Rewrite the correct code underlining the corrections done. Do not add any additional statements in the corrected code.<br \/>\n<span style=\"text-decoration: underline;\"><strong>All India 2014C<\/strong> <\/span><\/p>\n<pre>int find (int a[], int n)\r\n{\r\nint s=a[0]; \r\nfor(int x=l; x&lt;n; x++) \r\nif(a [x]&gt;s) \r\na[x]=s; \r\nreturn (s);\r\n}<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>The correct code is<\/p>\n<pre>int find (int a[], int n)\r\n{\r\nint S=a[0]; \r\nfor (int x=l; x&lt;n; x++) \r\nif (a [x]&lt;s)\r\n<span style=\"text-decoration: underline;\">s=a [x] ;<\/span> \r\nreturn(s);\r\n}<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 25:<\/span><\/strong><br \/>\nFind output of the following program segment:<strong> All India 2014C<\/strong><\/p>\n<pre>#include&lt;iostream.h&gt;\r\n #include&lt;ctyupe.h&gt;\r\n void Mycode (char Msg [ ], Lehar CH)\r\n{\r\n {for(int cnt=0; Msg[cnt3] !\r\n =\"\\0\";cnt++)\r\n { if (Msg [cnt]&gt;='B'&amp;&amp; Msg[cnt]&lt;='G\u2019)\r\n Msg [cnt]=tolower(Msg[cnt);\r\n else\r\n if(Msg[cnt]= =\u2019N'  \u222aMsg[cnt]=\r\n = 'n' \u222aMsg[cnt]= =' ' )\r\n Msg[cnt]=CH;\r\n else\r\n if(cnt%2= =0)\r\n Msg[cnt]=toupper(Msg[cnt]);\r\n else\r\n Msg[cnt]=Msg[cnt-l];\r\n} }\r\n void main()\r\n { \r\nChar MyText[]=\"Input Raw\";\r\n Mycode (MyText, '@'\r\n cout&lt;&lt;\"NEW TEXT : \"&lt;&lt;MyText&lt;&lt;endl<\/pre>\n<pre>}<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>NEW TEXT : I@PPT@RRW<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 26:<\/strong><\/span><br \/>\nRewrite the following C++ code after removing all the syntax error(s), if present in the code. Make sure that you underline each correction done by you in the code.<br \/>\n<strong>Important Note:<\/strong><br \/>\nAssume that all the required header file are already included, which are essential to run this code.<br \/>\nThe correction made by you do not change the logic of the program.<\/p>\n<pre>typedef char[50] STRING; \r\nvoid main()\r\nCity STRING;\r\ngets(City);\r\ncout&lt;&lt;City[0]&lt;&lt;'\\t,&lt;&lt;City[2]; \r\ncout&lt;&lt;City&lt;&lt;endline;\r\n}<span style=\"text-decoration: underline;\"><strong> Delhi 2014<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>The correct code is<\/p>\n<pre>typedef <span style=\"text-decoration: underline;\">char STRING[50]<\/span> : \/\/Error 1 \r\nvoid main()\r\n{\r\n<span style=\"text-decoration: underline;\">STRING City;<\/span>    \/\/Error 2\r\ngets(City);\r\ncout&lt;&lt;City[o]&lt;&lt;<span style=\"text-decoration: underline;\">\"\\t\"<\/span>&lt;&lt;City[2] ; \/\/Error 3\r\ncout&lt;&lt;City&lt;&lt;endl:    \/\/Error 4\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 27:<\/strong><\/span><br \/>\nRead the following C++ code carefully and find out, which out of the given options (i) to (iv) are the expected correct output(s) of it. Also, write the maximum and minimum value that can be assigned to the variable Start used in the code:<\/p>\n<pre>void main( )\r\n{\r\n int Guess[4]={200, 150, 20, 250}; \r\nint Start=random(2)+2; \r\nfor(int C=Start; C&lt;4; C++) \r\ncout&lt;&lt;Guess[C]&lt;&lt;\"#\" ;\r\n}\r\n(i)   200# 150#\r\n(ii)  50#20#\r\n(iii) 150#20#250#\r\n(iv) 20#250# <span style=\"text-decoration: underline;\"><strong>Delhi 2014<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>Correct option is (iv) 20 # 250#<br \/>\nMaximum value of variable Start= 3<br \/>\nMinimum value of variable Start = 2<\/p>\n<p><strong><span style=\"color: #eb4924;\">Question 28:<\/span><\/strong><br \/>\nWhat is the difference between call by reference and call by value with respect to memory allocation? Give a suitable example to illustrate using C++ code. <span style=\"text-decoration: underline;\"><strong>All India 2014<\/strong><\/span><\/p>\n<p style=\"text-align: center;\"><em>or<\/em><\/p>\n<p>What is the difference between call by value and call by reference? Also, give a suitable C++ code to illustrate both.<br \/>\n<strong>All India 2010; Delhi 2009<br \/>\n<span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>Differences between call by value and call by reference are as follows:<\/p>\n<pre>e.g.\r\nFollowing example illustrates the concept of call by value:\r\n#imclude&lt;iostream.h&gt;\r\n#include&lt;conio.h&gt; \r\nvoid swap(int x,int y)\r\nint temp = x; \r\nx = y; \r\ny = temp;\r\ncout&lt;&lt;\"After swapping\\n\"; \r\ncout&lt;&lt;\"Inside swap\u201d&lt;&lt;endl ;\r\ncout&lt;&lt;\"x : \"&lt;&lt;x&lt;&lt;endl; \r\ncout&lt;&lt;\"y : \"&lt;&lt;y&lt;&lt;endl ;\r\n}\r\nvoid main()\r\n{\r\nint x,y;\r\ncout&lt;&lt;\"Enter two numbers\\n\"\r\n cin&gt;&gt;x&gt;&gt;y; \r\nswap(x.y);\r\ncout&lt;&lt;\u201dAfter swapping\\n\"; \r\ncout&lt;&lt;\"Inside main\"&lt;&lt;endl;\r\n cout&lt;&lt;\"x : \"&lt;&lt;x&lt;&lt;endl ; \r\ncout&lt;&lt;\"y : \"&lt;&lt;y; \r\ngetch( ) ;\r\n}<\/pre>\n<p>The following example illustrates the concept of call by reference:<\/p>\n<pre>#include&lt;iostream.h&gt;\r\n#include&lt;conio.h&gt; \r\nvoid swap(int &amp;x,int &amp;y)\r\n(\r\nint temp = x;\r\n x = y; \r\ny = temp;\r\ncouK&lt;&lt;'After swapping\\n\"; \r\ncout&lt;&lt;\"Inside swap\"&lt;&lt;endl; \r\ncout&lt;&lt;\"x : \"&lt;&lt;x&lt;&lt;endl ; \r\ncout&lt;&lt;\"y : \"&lt;&lt;y&lt;&lt;endl ;\r\n}\r\nvoid main()\r\n{\r\nint x,y;\r\ncout&lt;&lt;\"Enter two numbers\\n\"; \r\ncin&gt;&gt;x&gt;&gt;y ; \r\nswap(x,y);\r\ncout&lt;&lt;\"After swapping\\n\u201d ; \r\ncout&lt;&lt;\"Inside main\"&lt;&lt;endl; \r\ncout&lt;&lt;\"x : \"&lt;&lt;x&lt;&lt;endl ; \r\ncout&lt;&lt;\"y : \"&lt;&lt;y; \r\ngetch( ) ;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 29:<\/strong><\/span><br \/>\nRewrite the following C++ code after removing all the syntax error(s), if present in the code. Make sure that you underline each correction done by you in the code. <strong>All India 2014<\/strong><br \/>\n<strong>Important Note:<\/strong><br \/>\nAssume that all the required header files are already included, which are essential to run this code.<br \/>\nThe corrections made by you do not change the logic of the program,<\/p>\n<pre>typedef char[80] STR; \r\nvoid main()\r\n{\r\nTxt STR; \r\ngets(Txt);\r\nCOUt&lt;&lt;Txt[0]&lt;&lt;'\\t,\u00abTxt[2] ;\r\ncout&lt;&lt;Txt&lt;&lt;endline;<\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>The corrected code is given below:<\/p>\n<pre>tvpedef <span style=\"text-decoration: underline;\">char STR[80]<\/span> :\/\/Error 1 \r\nvoid main()\r\n{\r\n<span style=\"text-decoration: underline;\">STR Txt;<\/span> \/\/Error 2\r\ngets(Txt);\r\ncout&lt;&lt;Txt[0]&lt;&lt;<span style=\"text-decoration: underline;\">\"\\t\"<\/span>&lt;&lt;Txt[2]; \/\/Error 3\r\ncout&lt;&lt;Txt&lt;&lt;endl:    \/\/Error 4<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 30:<\/span><\/strong><br \/>\nRead the following C++ code carefully and find out, which out of the given options (i) to (iv) are the expected correct output(s) of it. Also, write the maximum and minimum value that can be assigned to the variable <strong>Taker<\/strong> used in the code:<\/p>\n<pre>void main()\r\n(\r\nint GuessMe[4]={100,50,200,20} ; \r\nint Taker=random(2)+2; \r\nfor(int Chance=0;Chance\r\n&lt;Taker;Chance++) \r\ncout&lt;&lt;GuessMe[Chance]&lt;&lt;\"#\" :\r\n}<\/pre>\n<p><strong>(i)<\/strong> 100                              <strong>(ii)<\/strong> 50#200#<br \/>\n<strong>(iii)<\/strong> 100#50#200#       <strong>(iv)<\/strong> 100#50<strong><span style=\"text-decoration: underline;\"> All India 2014<br \/>\n<\/span><\/strong><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>Correct output for the given code would be option<br \/>\n(iii) 100#50#200#<br \/>\nMaximum value of Taker = 3<br \/>\nMinimum value of Taker = 2<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 31:<\/strong><\/span><br \/>\nFind syntax error(s), if any, in the following program: (Assuming all desired header file(s) are already included)<\/p>\n<pre>typedef String [80] char; \r\nvoid main()\r\n{\r\nString S;\r\nfor (L=0; L&lt;26; C++)\r\nS[L] = L+65;\r\nS[L]=\"\\0\": \r\ncout&lt;&lt;S&lt;&lt;endline :\r\n} <span style=\"text-decoration: underline;\"><strong>Delhi 2013C<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>tvpedef char Strlnq[80] : \r\nvoid main ( )\r\n{\r\nString S;\r\nfor (<span style=\"text-decoration: underline;\">int L= 0<\/span>: L&lt;26; <span style=\"text-decoration: underline;\">L++<\/span>)\r\nS[L]=L+65;\r\nS[L]=\"\\0\" ; \r\ncout&lt;&lt;S&lt;&lt;<span style=\"text-decoration: underline;\">end<\/span> l ;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 32:<\/strong><\/span><br \/>\nBased on the following C++ code, find out the expected correct output(s) from the options (i) to (iv). Also, find out the minimum and the maximum value that can be assigned to the variable <strong>Guess<\/strong> used in the code at the time when value of <strong>Turn<\/strong> is 3.<\/p>\n<pre>void main( )\r\n{\r\n char Result[][10]={\"GOLD\",\r\n \"SILVER\u201d,\"BRONZE\"}: \r\nint Getit=9,Guess : \r\nfor(int Turn=l;Turn&lt;4;Turn++)\r\n {\r\n Guess=random(Turn); cout&lt;&lt;Getit-Guess&lt;&lt;Result [Guess]&lt;&lt;\"*\" ;\r\n}\r\n}\r\n (i) 9GOLD*9GOLD*8SILVER*\r\n(ii) 9GOLD*7BRONZE*8GOLD*\r\n(iii) 9GOLD*8SILVER*9GOLD*\r\n(iv) 9GOLD*8SILVER*8GOLD*\r\n<strong><span style=\"text-decoration: underline;\"> All India 2013<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>Correct output is (i) 9G0LD*9G0LD*8SILVER*<br \/>\nMaximum value of Guess is 2<br \/>\nMinimum value of Guess is 0.<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 33:<\/strong><\/span><br \/>\nBased on the following C++ code, find out the expected correct output(s) from the options (i) to (iv). Also, find out the minimum and the maximum value that can be assigned to the variable <strong>Trick<\/strong> used in the code at the time when value of <strong>Count<\/strong> is 3<\/p>\n<pre>void main()\r\n {\r\n char StatusC][10]={\"EXCEL\u201d,\r\n \"GOOD\".\"OK\"i;\r\n int Turn=10,Trick;\r\n for(int Count=1;Count&lt;4;Count++)\r\n{\r\n Trick=random(Count); \r\ncout&lt;&lt;Turn-Trick&lt;&lt;Status\r\n [T ri ck]\u00ab\"#\" ;\r\n}\r\n}<\/pre>\n<p>(i)   10EXCEL# 10EXCEL#80K#<br \/>\n(ii)  10EXCEL#80K#9GOOD#<br \/>\n(iii) 10EXCEL#9GOOD# 10EXCEL#<br \/>\n(iv) 10EXCEL# 10GOQD#80K# <span style=\"text-decoration: underline;\"><strong>Delhi 2013<br \/>\n<\/strong><\/span><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>Correct output is (iii) 10EXCEL#9GOOD#10EXCEL#<br \/>\nMinimum value of Trick is 0<br \/>\nMaximum value of Trick is 2<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 34:<\/strong><\/span><br \/>\nObserve the following program and find out, which output(s) out of (i) to (iv) will not be expected from the program? What will be the minimum and the maximum value assigned to the variable Turn?<\/p>\n<pre>#i nclude&lt;iostream.h&gt; \r\n#include&lt;stdlib.h&gt; \r\nvoid main()\r\n (\r\n randomize(); \r\nint Game[]={10.16},P; \r\nint Turn=random(2)+5; \r\nfor(int T=0; T&lt;2; T++)\r\n { \r\n P=random(2) ;\r\n cout&lt;&lt;Game[P]+Turn&lt;&lt;\"#\" ;\r\n}\r\n}<\/pre>\n<p>(i) 15#22#      (ii) 22#16#<br \/>\n(iii) 16#21#    (iv) 2I#22# <span style=\"text-decoration: underline;\"><strong>Delhi 2012<\/strong><\/span><\/p>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>(i), (iii) and (iv) can never be the output.<br \/>\nMinimum value of Turn =5<br \/>\nMaximum value of Turn =6<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 35:<\/strong><\/span><br \/>\nObserve the following program and find out which output(s) out of (i) to (iv) will not be expected from the program? What will be the minimum and the maximum value assigned to the variable Chance?<\/p>\n<pre>#i nclude&lt;iostream.h&gt;\r\n #include&lt;stdlib.h&gt; \r\nvoid main()\r\n {\r\n randomze( ) ; \r\nint Arr[]={9,6},N; \r\nint Chance=random(2)+10; \r\nfor(int CO;C&lt;2;C++)\r\n {\r\n N=random(2);\r\n cout&lt;&lt;Arr[N]+Chance&lt;&lt;\"#\" ;\r\n}\r\n}<\/pre>\n<p><strong>(i)<\/strong> 9#6#<br \/>\n<strong>(ii)<\/strong> 19#17#<br \/>\n<strong>(iii)<\/strong> 19#16#<br \/>\n<strong>(iv)<\/strong> 20# 16# <strong><span style=\"text-decoration: underline;\">All India 2012<br \/>\n<\/span><span style=\"color: #008000;\">Answer:<br \/>\n<\/span><\/strong>(i), (ii) and (iv) will not be expected from the program<br \/>\nMaximum value of Chance =11<br \/>\nMinimum value of Chance =10<\/p>\n<p><span style=\"color: #eb4924;\"><strong>Question 36:<\/strong><\/span><br \/>\nRewrite the following program after removing the syntactical errors (if any). Underline each correction.<\/p>\n<pre>#include[iostream.h] \r\ntypedef char Text (80); \r\nvoid main( )\r\n{\r\nText T=\"Indian\";\r\nint Count=strlen(T) ;\r\ncout&lt;&lt;T&lt;&lt; ' has ' &lt;&lt;Count&lt;&lt; ' characters '&lt;&lt;endl;\r\n} <strong><span style=\"text-decoration: underline;\">Delhi 2011<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre># include&lt;iostream.h&gt;\r\n<span style=\"text-decoration: underline;\">#include&lt;strinq.h&gt; <\/span>\r\n<span style=\"text-decoration: underline;\">typedef char Text[80]:<\/span> \r\nvoid main()\r\n{\r\nText T=\"Indian\";\r\nint Count=strlen(T) ; cout&lt;&lt;T&lt;&lt;<span style=\"text-decoration: underline;\">\"has\"<\/span>&lt;&lt;Count\r\n&lt;&lt;<span style=\"text-decoration: underline;\">\"characters\"<\/span>&lt;&lt;end1 ;\r\n}<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 37:<\/strong><\/span><br \/>\nRewrite the following program after removing the syntactical errors (if any). Underline each correction.<\/p>\n<pre>#include&lt;iostream.h&gt; \r\ntypedef char[80] string; \r\nvoid main()\r\n{\r\n string S=\"Peace\"; \r\nint L=strlen (S) ; \r\ncout&lt;&lt;3&lt;&lt; 'has'&lt;&lt;L&lt;&lt;'characters'&lt;&lt;endl;\r\n} <strong><span style=\"text-decoration: underline;\">Delhi 2011<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<\/span><\/strong><\/p>\n<pre>#include&lt;iostream.h&gt;\r\n<span style=\"text-decoration: underline;\">#include&lt;string.h&gt; <\/span>\r\n<span style=\"text-decoration: underline;\">tvpedef char strinq[80]:<\/span> \r\nvoid main()\r\n{\r\nstring S=\"Peace\"; \r\nint L=strlen(S);\r\ncout&lt;&lt;S&lt;&lt; \" has \"&lt;&lt;L&lt;&lt;characters\" &lt;&lt;endl; \r\n}<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 38:<\/span><\/strong><br \/>\nFind the output of the following program;<\/p>\n<pre>#include&lt;iostream.h&gt; \r\nvoid SwitchOver(int AC], int N.intSplit)\r\n{\r\nfor ( int K=0 ; K&lt;N ; K++ \r\nif(K&lt;Spl it)\r\nA[K]+=K; \r\nelse\r\nA[K]*=K;\r\n}\r\nvoid Display(int A[],int N)\r\n{\r\nfor (int KO ; K&lt;N ; K++)\r\n(K%2=0)?cout&lt;&lt;A[K]&lt;&lt;\"%\" :cout &lt;&lt;A[K]&lt;&lt;endl ;\r\n}\r\nvoid main()\r\n{\r\nint H[]={30.40.50,20,10,5); \r\nSwitch0ver(H,6,3);\r\nDisplay (H,6);\r\n} <span style=\"text-decoration: underline;\"><strong>All India 2011<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>30%41 \r\n52%60 \r\n40%25<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 39:<\/strong><\/span><br \/>\nFind the output of the following program<\/p>\n<pre>#includeCiostream.h&gt;\r\n#include&lt;ctype.h&gt;\r\nvoid changeIt(char Text[],char C)\r\n{\r\nfor(int K=0;Text[K]!=\"\\0\";K++)\r\n{\r\nif(Text[K]&gt;=\"F\"&amp;&amp;Text[K]&lt;=\"L\") \r\nText[K]=tolower(Text[K]); \r\nelse\r\ni f (Text[K]\u2014\"E\"| |Text[K]==\"e\" ) Text[KJO; \r\nelse\r\nif(K%2= =0)\r\nText[K]=toupper(Text[K]) ; \r\nelse\r\nText[K]=Text[K-1];\r\n}\r\n}\r\nvoid main()\r\n{\r\nchar 0ldText[]=\"p0wERALone\"; \r\nchangeIt(0ldText,); cout&lt;&lt;\"New Text: \"&lt;&lt;01dText&lt;&lt;endl ;\r\n} <strong><span style=\"text-decoration: underline;\">Delhi 2010<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>New Text :PPW%RRllN%<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 40:<\/span><\/strong><br \/>\nFind the output of the following program:<\/p>\n<pre>#include&lt;iostream. h&gt;\r\n#include&lt;ctype.h&gt;\r\nvoid MyCodetchar Msg[],char CH)\r\n{\r\nfor(int cnt=0; Msg[cnt]!=\"\\0\"; cnt++)\r\n{\r\nif(Msg[cnt]&gt;=\u201dB\"&amp;&amp; Msg [cnt]&lt;=\"G\")\r\nMsg[cnt]=tolower(Msg[cnt]); \r\nelse \r\nif(Msq[cnt]==\"A\"||Msg [cnt]==\"a\" )\r\nMsg[cnt]=CH;\r\nelse if (cnt % 2==0)\r\nMsg[cnt]=toupper(Msg[cnt]) ; \r\nelse\r\nMsg[cnt]=Msg[cnt-1] ;\r\n}\r\n}\r\nvoid main()\r\n}\r\nchar MyText[]=\"ApEACeDriVE\" ; \r\nMyCodetMyText, \"@\"); \r\ncout&lt;&lt;\"NEW TEXT: \"&lt;&lt;MyText&lt;&lt;endl;\r\n) <span style=\"text-decoration: underline;\"><strong>All India 2010<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>NEW TEXT:@@e@ccddIIe<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 41:<\/strong><\/span><br \/>\nFind the output of the following program<\/p>\n<pre>#include&lt;iostream.h&gt;\r\n #include&lt;ctype.h&gt;\r\n void Encodei(char Info[],int N);\r\n void main()\r\n {\r\n char Memo[]=\"Justnow\";\r\nEncode(Memo, 2);\r\ncount&lt;&lt;Memo&lt;&lt;endl;\r\n}\r\nvoid Encodeichar Info[],int N)\r\n{\r\n for(int I = 0;Info[I]!= \"\\0\"; I++) \r\ni f ( I %2= =0 )\r\n Info[I]=Info[I]-N;\r\n else \r\nif(is lower (Info[I]); \r\nInfo[I]=toupper(Info[I]) \r\nelse\r\n Info[I]=Info[I]+N;\r\n } <strong><span style=\"text-decoration: underline;\">Delhi 2009<\/span><\/strong><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>HUqTlOu<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 42:<\/strong><\/span><br \/>\nFind the output of the following program<\/p>\n<pre>#include&lt;iostream.h&gt; \r\n#include&lt;ctype.h&gt; \r\nvoid Secretlchar Msg[],int N);\r\nvoid main()\r\n{\r\nchar SMS[]=\"rEPorTmE\": \r\nSecret(SMS, 2): \r\ncout&lt;&lt;SMS&lt;&lt;endl:\r\n}\r\nvoid Secret(char Msg[],int N)\r\n{\r\nfor(int C=O; Msg [C]!=\"\\0\u201d;C++) \r\nif ( C%2 ==0)\r\nMsg[C]=Msg[C] + N; \r\nelse if(isupper(Msg[C] ) ) \r\nMsg[C]=tolower(Msg[C]) ) : \r\nMsg[C]=Msg[C]-N;\r\n} <span style=\"text-decoration: underline;\"><strong>All India 2009<\/strong><\/span><\/pre>\n<p style=\"text-align: left;\"><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre style=\"text-align: left;\">teRmttoe<\/pre>\n<h3 style=\"text-align: center;\"><span class=\"ez-toc-section\" id=\"3_Marks_Questions\"><\/span><span style=\"color: #0000ff;\">3 Marks Questions<\/span><span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><span style=\"color: #eb4924;\"><strong>Question 43:<\/strong><\/span><br \/>\nFind the output of the following program<\/p>\n<pre>#include&lt;iostream.h&gt; \r\nvoid ChangeArray(int Number, int ARR[],int Size)\r\n{\r\n for(int L= 0; L&lt;Size; L++) \r\nif ( L&lt;Number)\r\n ARR[L]+=L; \r\nelse\r\n ARR[L]*=L;\r\n void Show(int ARR[],int size)\r\n{\r\nfor( int L=0; Ksize; L++)\r\n( L%2 !=0)?cout&lt;&lt;ARR[L]&lt;&lt;\"#\" : \r\ncout&lt;&lt;ARR[L]&lt;&lt;endl;\r\n}\r\nvoid main()\r\n{\r\nint Array[]={30,20,40,10,60,50}; \r\nChangeArray(3, Array, 6);\r\nShow(Array, 6);\r\n} <span style=\"text-decoration: underline;\"><strong>Delhi 2011<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>30\r\n21#42\r\n30#240\r\n250#<\/pre>\n<p><strong><span style=\"color: #eb4924;\">Question 44:<\/span><\/strong><br \/>\nFind the output of the following program<\/p>\n<pre>#include&lt;iostream.h&gt; \r\nstruct Dress \r\n{\r\n int size,cost,Tax,Total_Cost;\r\n };\r\n void change(Dress &amp;S, int Flag=1)\r\n {\r\n if(Flag ==1) S.cost +=20;\r\n S.Total_Cost=S.cost+\r\n S.cost*S.Tax\/100;\r\n}\r\n void main()\r\n{\r\n Dress S1=(40, 580, 8},S2 ={34, 550, 101; change(S1) ;\r\n cout&lt;&lt;S1.size&lt;&lt;\",\"&lt;&lt;S1.cost .    &lt;&lt;\",\"&lt;&lt;S1,Total_Cost&lt;&lt;endl;\r\n change(S2, 2);\r\n cout&lt;&lt;S2.size&lt;&lt;\" ,''&lt;&lt;S2.cost &lt;&lt;\", \"&lt;&lt;S2 .Total_Cost&lt;&lt;endl ;\r\n } <span style=\"text-decoration: underline;\"><strong>Delhi 2011C<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>40, 600, 648 \r\n34, 550, 605<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 45:<\/strong><\/span><br \/>\nFind the output of the following program<\/p>\n<pre>#include&lt;iostream.h&gt; \r\nstruct POINT\r\n{\r\n int x, y, z;\r\n };\r\n void StepIn(POINT &amp;P, int Step=1)\r\n {\r\n P.x+=Step;\r\n P.y-=Step;\r\n P.z+=Step;\r\n}\r\n void main()\r\n {\r\n POINT P1={15, 25, 5},\r\n P2={10, 30, 201;\r\n StepIn(P1) ;\r\n StepIn(P2, 4);\r\n cout&lt;&lt;Pl.x&lt;&lt;', '&lt;&lt;Pl.y&lt;&lt;', '\r\n &lt;&lt;P2.z&lt;&lt;endl;\r\n} <span style=\"text-decoration: underline;\"><strong>Delhi 2010<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>16,  24, 6 \r\n14, 26, 24 \r\n26, 14, 36<\/pre>\n<p><span style=\"color: #eb4924;\"><strong>Question 46:<\/strong><\/span><br \/>\nFind the output of the following program<\/p>\n<pre>#include&lt;iostream.h&gt; \r\nstruct THREE_D\r\n{\r\nint x, y, z;\r\n};\r\nvoid MoveIn(THREE_D &amp;T, int Step=1)\r\n{\r\nT.x+=Step;\r\nT.y-=Step;\r\nT.z-=Step;\r\n}\r\nvoid Move0ut(THREE_D &amp;T,int Step=1)\r\n{\r\nT.x-=Step;\r\nT.y+=Step;\r\nT.z-=Step;\r\n}\r\nvoid main()\r\n{\r\nTHREE_D T1={10, 20, 5),\r\nT2={30,10,40} ;\r\nMoveln (T1) ;\r\nMove0ut(T2, 5); \r\ncout&lt;&lt;Tl.x&lt;&lt;', '&lt;&lt;Tl.y&lt;&lt;', ' &lt;&lt;Tl.z&lt;&lt;endl;\r\ncout&lt;&lt;T2.x&lt;&lt;', '&lt;&lt;T2.y&lt;&lt;', '&lt;&lt;T2. z&lt;&lt;endl ;\r\nMoveln (T2, 10); \r\ncout&lt;&lt;T2.x&lt;&lt;' , '&lt;&lt;T2.y&lt;&lt;', ' &lt;&lt;T2.z&lt;&lt;endl ;\r\n} <span style=\"text-decoration: underline;\"><strong>All India 2010\r\n<\/strong><\/span><\/pre>\n<p><strong><span style=\"color: #008000;\">Answer:<br \/>\n<\/span>Output<\/strong><\/p>\n<pre>11, 19, 4 \r\n25, 15, 35 \r\n35, 5,  25<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour Topic \u2013 1 Fundamentals Previous Years Examination &amp; [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"\"Get Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour on Infinity Learn.\"","custom_permalink":"study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/"},"categories":[93,21],"tags":[],"table_tags":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour - Infinity Learn by Sri Chaitanya<\/title>\n<meta name=\"description\" content=\"&quot;Get Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour on Infinity Learn.&quot;\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour - Infinity Learn by Sri Chaitanya\" \/>\n<meta property=\"og:description\" content=\"&quot;Get Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour on Infinity Learn.&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/\" \/>\n<meta property=\"og:site_name\" content=\"Infinity Learn by Sri Chaitanya\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/InfinityLearn.SriChaitanya\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-16T13:45:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-21T09:29:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2025\/04\/infinitylearn.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"1008\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InfinityLearn_\" \/>\n<meta name=\"twitter:site\" content=\"@InfinityLearn_\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasad Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"29 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour - Infinity Learn by Sri Chaitanya","description":"\"Get Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour on Infinity Learn.\"","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/","og_locale":"en_US","og_type":"article","og_title":"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour - Infinity Learn by Sri Chaitanya","og_description":"\"Get Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour on Infinity Learn.\"","og_url":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/","og_site_name":"Infinity Learn by Sri Chaitanya","article_publisher":"https:\/\/www.facebook.com\/InfinityLearn.SriChaitanya\/","article_published_time":"2022-02-16T13:45:01+00:00","article_modified_time":"2024-09-21T09:29:02+00:00","og_image":[{"width":1920,"height":1008,"url":"https:\/\/infinitylearn.com\/surge\/wp-content\/uploads\/2025\/04\/infinitylearn.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_creator":"@InfinityLearn_","twitter_site":"@InfinityLearn_","twitter_misc":{"Written by":"Prasad Gupta","Est. reading time":"29 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Organization","@id":"https:\/\/infinitylearn.com\/surge\/#organization","name":"Infinity Learn","url":"https:\/\/infinitylearn.com\/surge\/","sameAs":["https:\/\/www.facebook.com\/InfinityLearn.SriChaitanya\/","https:\/\/www.instagram.com\/infinitylearn_by_srichaitanya\/","https:\/\/www.linkedin.com\/company\/infinity-learn-by-sri-chaitanya\/","https:\/\/www.youtube.com\/c\/InfinityLearnEdu","https:\/\/twitter.com\/InfinityLearn_"],"logo":{"@type":"ImageObject","@id":"https:\/\/infinitylearn.com\/surge\/#logo","inLanguage":"en-US","url":"","contentUrl":"","caption":"Infinity Learn"},"image":{"@id":"https:\/\/infinitylearn.com\/surge\/#logo"}},{"@type":"WebSite","@id":"https:\/\/infinitylearn.com\/surge\/#website","url":"https:\/\/infinitylearn.com\/surge\/","name":"Infinity Learn by Sri Chaitanya","description":"Surge","publisher":{"@id":"https:\/\/infinitylearn.com\/surge\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/infinitylearn.com\/surge\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#webpage","url":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/","name":"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour - Infinity Learn by Sri Chaitanya","isPartOf":{"@id":"https:\/\/infinitylearn.com\/surge\/#website"},"datePublished":"2022-02-16T13:45:01+00:00","dateModified":"2024-09-21T09:29:02+00:00","description":"\"Get Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour on Infinity Learn.\"","breadcrumb":{"@id":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/infinitylearn.com\/surge\/"},{"@type":"ListItem","position":2,"name":"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour"}]},{"@type":"Article","@id":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#article","isPartOf":{"@id":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#webpage"},"author":{"@id":"https:\/\/infinitylearn.com\/surge\/#\/schema\/person\/143c89c9c2f5e56ed91f96dde47b0b05"},"headline":"Important Questions for Class 12 Computer Science (C++) \u2013 C++ Revision Tour","datePublished":"2022-02-16T13:45:01+00:00","dateModified":"2024-09-21T09:29:02+00:00","mainEntityOfPage":{"@id":"https:\/\/infinitylearn.com\/surge\/study-material-important-questions\/class-12\/computer\/important-questions-for-class-12-computer-science-c-c-revision-tour\/#webpage"},"wordCount":3912,"publisher":{"@id":"https:\/\/infinitylearn.com\/surge\/#organization"},"articleSection":["Important Questions","Study Materials"],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/infinitylearn.com\/surge\/#\/schema\/person\/143c89c9c2f5e56ed91f96dde47b0b05","name":"Prasad Gupta","image":{"@type":"ImageObject","@id":"https:\/\/infinitylearn.com\/surge\/#personlogo","inLanguage":"en-US","url":"https:\/\/secure.gravatar.com\/avatar\/200104b443e586c76c46cadc113d931c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/200104b443e586c76c46cadc113d931c?s=96&d=mm&r=g","caption":"Prasad Gupta"},"url":"https:\/\/infinitylearn.com\/surge\/author\/prasad\/"}]}},"_links":{"self":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/posts\/25489"}],"collection":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/comments?post=25489"}],"version-history":[{"count":0,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/posts\/25489\/revisions"}],"wp:attachment":[{"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/media?parent=25489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/categories?post=25489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/tags?post=25489"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/infinitylearn.com\/surge\/wp-json\/wp\/v2\/table_tags?post=25489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}