Eliminates the use of undisciplined controls (GOTO, BREAK, etc.,) in the program.<\/li>\n<\/ol>\nQuestion 30.
\nDraw a flowchart to find the factorial of a number.
\nAnswer:
\n<\/p>\n
Question 31.
\nExplain the structure of C++program with an example.
\nAnswer:
\n
\nThe various parts of the above program:
\n1. headers, which contain information that is either necessary or useful to program. For this program, the header <iostream> is needed.<\/p>\n
2. The line int main() is the main function where program execution begins.<\/p>\n
3. The pair of { } indicates the body of the main function.<\/p>\n
4. The next line cout << “This is my first C++ program. causes the message “This is my first C++ program” to be displayed on the screen.<\/p>\n
5. The next line return 0; terminates main( )function and causes it to return the value 0 to the calling process.<\/p>\n
<\/p>\n
Question 32.
\nWrite a C++ program to find the position of a given number in an array.
\nAnswer:
\n<\/p>\n
Question 33.
\nExplain the working of switch statement with an example.
\nAnswer:
\nSwitch statement compares the value of an expression against a list of integers or character constants. The list of constants are listed using the “case” statement along with a “break” statement to end the execution.<\/p>\n
\nResult:
\nEnter the day of the week between 1 – 7 :: 7
\nSunday<\/p>\n
In the above Control Structure example the “switch” statement is used to find the day of the week from the integer input got from the user. The value present in the day is compared for equality with constants written in the word case. Since no equality is achieved in the above example (from 1 to 6) as they entered value is 7, default is selected and gives “Sunday” as a result.<\/p>\n
<\/p>\n
Question 34.
\nExplain the working of for statement with a programming example.
\nAnswer:
\nA for loop is a repetition control structure that allows you to efficiently write a loop that needs , to execute a specific number of times.
\nSyntax:
\nThe syntax of a for loop in C++ is:
\nfor ( initialization; condition; increment\/decrement )
\n{
\nstatement(s);
\n}<\/p>\n
The working of a for loop:
\n1. The initialization step is executed first, and only once in the beginning. It is used to declare and initialize any loop control variables.<\/p>\n
2. Next, the condition is evaluated. If it is true, the body of the loop is executed. If it is false, the body of the loop does not execute and flow of control jumps to the next statement just after the for loop.<\/p>\n
3. After the body of the for loop executes, the flow of control jumps back up to the increment\/decrement statement and update any loop control variables.<\/p>\n
4. Then condition is evaluated again. If it is true, the loop executes and the process repeats itself (body of loop, then increment step, and then again condition). After the condition becomes false, the for loop terminates.<\/p>\n
Example:<\/p>\n
<<\/p>\n
When the above code is compiled and executed, it produces following result:
\nvalue of a: 10
\nvalue of a: 11
\nvalue of a: 12
\nvalue of a: 13
\nvalue of a: 14
\nvalue of a: 15<\/p>\n
Question 35.
\nWhat is recursive function? Explain with a programming example.
\nAnswer:
\nA function that calls itself directly or indirectly again and again is called recursive functions and the process is termed as recursion. The most common example of a recursive function is the calculation of the factorial of a number. i.e., n! = (n) * (n – 1)
\nProgram:
\n<\/p>\n
In the above example, the calling function main () gives the function call to fact () and control jumps from main () function to called function fact().<\/p>\n
The argument \u2018n\u2019 value is compared with the base class \u2018if (n == 1)\u2019 if \u2018true\u2019 control will return back to calling function main() with the value 1.<\/p>\n
If \u2018False\u2019, control will execute the statement which is after \u2018else\u2019 x = n * fact ( n – 1);. here a function call is given to fact (n-1) with the parameter (n-1).<\/p>\n
Now the calling function is fact () and called function is also fact(). The recursion ends when value of \u2018n\u2019 is 1 then the statement return (1) is initiated.<\/p>\n
<\/p>\n
Question 36.
\nMention the features of spreadsheets.
\nAnswer:
\nSpreadsheets are mainly used for making calculations and mathematical works. Microsoft excel is a spread sheet application. In a single sheet, it consists of rows and columns and cells. Every cell has different address.
\nFeatures of spreadsheet:<\/p>\n
1. Tables:
\nTables are created with different fields eg – name, age, address, roll no so we add a table to fill these values;<\/p>\n
2. Clip art:
\nIn this we can add images and also audio, video clips can be added here.<\/p>\n
3. Charts:
\nWith charts, we can clearly shown products evaluation to the clients. For example which product sale is more or less in this month.<\/p>\n
4. Functions:
\nMATHEMATICAL: Add, subtract, div, multiply.
\nLOGICAL: average, sum, mod, product.<\/p>\n
5. Images and Backgrounds:
\nIn this we add images and backgrounds in sheet.<\/p>\n
6. Sorting and Filter:
\nIn sorting we can sort our data and also filter our data so that repetitions will be removed.<\/p>\n
7. Page layout:
\nIn this themes, colors, sheets, margins, size, backgrounds, breaks, print, titles, sheets height, width, scaling, gridness, headings, views, bring to front of font or back alignment, etc will be used.<\/p>\n
<\/p>\n
Question 37.
\nExplain the basic tags in HTML with examples (any five tags).
\nAnswer:
\n1. Bold Text:
\nYou can bold text to emphasize information on your web page. Bold text is useful for introducing new terms and highlighting important phrases on a Web page.
\nTag:
\n<B> SOME TEXT <\/B>
\nEXAMPLE:
\n<BODY> <B> THIS IS A Bold TEXT <\/B> <\/BODY><\/p>\n
2. Underline Text:
\nTag:
\n<U> Some text <\/U>
\nExample:
\n<BODY> <U> You can underline this text <\/U> <\/BODY><\/p>\n
3. Italicise Text:
\nTag:
\n<I> SOME TEXT <\/I>
\nEXAMPLE:
\n<BODY> <I> THIS IS A Itilicize TEXT <\/I> <\/BODY><\/p>\n
4. Big Text:
\nTag:
\n<Big> SOME TEXT <\/Big>
\nEXAMPLE:
\n<BODY> <Big> THIS IS A Big TEXT<\/Big> <\/BODY><\/p>\n
5. Marquee Text:
\nTo scroll text horizontally.
\nTag:
\n<Marquee> some text <\/marquee>
\nExample:
\n<marquee> The text is moving < \/marquee><\/p>\n","protected":false},"excerpt":{"rendered":"
Students can Download 1st PUC Computer Science Previous Year Question Paper March 2014 (North), Karnataka 1st PUC Computer Science Model Question Papers with Answers helps you to revise the complete Karnataka State Board Syllabus and score more marks in your examinations. Karnataka 1st PUC Computer Science Previous Year Question Paper March 2014 (North) Time: 3:15 …<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[81],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/posts\/16327"}],"collection":[{"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/comments?post=16327"}],"version-history":[{"count":0,"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/posts\/16327\/revisions"}],"wp:attachment":[{"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/media?parent=16327"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/categories?post=16327"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kseebsolutions.guru\/wp-json\/wp\/v2\/tags?post=16327"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}