Class Xi Practicals



Comments



Description

1 Write a function in C++, which accepts an integer array and its size as parameters and rearrange the array in reverse. Example if an array of five members initially contains the elements as 6,7,8,13,9,19 Then the function should rearrange the array as 19,9,13,8,7,6 2 Write a function in C++, which accept an integer array and its size as arguments and swap the elements of every even location with its following odd location. Example : if an array of nine elements initially contains the elements as 2,4,1,6,5,7,9,23,10 Then the function should rearrange the array as 4,2,6,1,7,5,23,9,10 3 Write a function in C++ which accepts an integer array and its size as arguments and replaces elements having odd values with thrice and elements having even values with twice its value. Example : If an array of five elements initially contains the elements 3,4,5,16,9 Then the function should rearrange the content of the array as 9,8,15,32,27 5 Write a function in C++ which accepts an integer array and its size as argument and exchanges the value of first half side elements with the second half side elements of the array. Example : If an array of eight elements has initial content as 2,4,1,6,7,9,23,10 The function should rearrange the array as 7,9,23,10,2,4,1,6. 6. Write a function in c++ to find and display the sum of each row and each column of 2 dimensional array. Use the array and its size as parameters with int as the data type of the array. Example : if the two dimensional array contains 2149 1377 5863 7212 After swapping of the content of 1st and last column.8 Write a c++ function to shift all the negative numbers to left and positive number in the right side.5} 9 Define a function SWPCOL() in C++ to swap ( interchange) the first column elements with the last column elements.-4.-6} then it should re arrange the array as {-2. it should be 9142 7371 3865 2217 10 Define a function SWPROW() in C++ to swap ( interchange) the first row elements with the last row elements.-2.-4.-6. for a two dimensional array passed as the argument of the function. Ex: if the array contains {1.3.1.3. Example : if the two dimensional array contains 2149 5863 1377 7212 After swapping of the content of the array will be 7212 5863 1377 2149 .5. for a two dimensional array passed as the argument of the function. 4 x 4 etc ] Example of the array content is 543 678 129 Output through the function should be Diagonal One Sum : 21 Diagonal Two: 11 .11 Write a function in C++ to print the product of each column of a 2D integer array passed as the argument of the function Example : if the two dimensional array contains 2149 1377 5863 7212 Then the output should appears as Product of Column1 = 70 Product Column2 = 48 Product of column3= 168 Product of Column4=378 12. Write a function in C++ to print the product of each row of a 2D integer array passed as the argument of the function Example : if the two dimensional array contains 2149 1377 5863 7212 Then the output should appears as Product of Row1 = 72 Product Row2 = 147 Product of Row3= 720 Product of Row4=28 13. [Assuming the 2D array to be a square matrix with odd dimension ie 3 x 3 . Write a function which accept 2D array of integers and its size as arguments and displays the sum of elements which lie on diagonals. 7 x 7 etc ] Example of the array content is 543 678 129 Output through the function should be Middle row: 6 7 9 Middle Column 4 7 2 15.2.5. Write a function in C++ which accepts a 2D array of integers and its size as arguments and displays the elements of middle row and the elements of middle column.2. Write a function in C++ which accepts an integer array and its size as arguments and assign the elements into a two dimensional array of integers in the following format If the array is 1.3.14. Write a function in C++ which accepts an integer array and its size as arguments and assign the elements into a two dimensional array of integers in the following format If the array is 1.4.6 The resultant 2D array is 123456 012345 001234 000123 000012 000001 . 5 x 5.3. [Assuming the 2D array to be a square matrix with odd dimension ie 3 x 3 .5.4.6 The resultant 2D array is 123456 123450 123400 123000 120000 100000 16. Write a user defined function lowerhalf() which takes a 2D array.17. Example if the array contains then upper half is 123 123 678 78 234 4 19.6 The resultant 2D array is 100000 120000 123000 123400 123450 123456 18. Write a function in C++ which accepts an integer array and its size as arguments and assign the elements into a two dimensional array of integers in the following format If the array is 1. with size n rows and n cols as arguments and print the upper half of the matrix. The function should accept the array and its size as argument.5. with size n rows and n cols as argument and prints the lower half of the matrix Eg:if the array contains then lower half is 123 1 567 56 912 912 20 Write the function to find the largest and second largest number from a two dimensional array.3.2.4. . Write a user defined function named upperhalf() which takes a 2D array A. such that the following sequence is followed.U2n-1 /(2n)! 24. B is sorted in descending order. The function will display a message if the element is found or not found. (iii) All odd numbers of Y from left to right are copied into Z from left to right.upto n terms . Write a function sum() in C++ with two arguments/parameters-double U and int n. 28. 27. the function should return a value of type double and it should perform sum of the following series: 1 – U 1/ 2! + U 3 /6! . Write a function in C++ to merge the contents of two sorted arrays A & B into third array C.21 Write a function in C++ to merge the contents of two sorted arrays A & B into third array C. Assuming array A is sorted in descending order. Write a function BsearchArr that receive an integer array of size 20 and an element (that is to be searched). Assuming array A is sorted in ascending order. the resultant array is required to be in ascending order.U 5/10! +………+. as arguments and it will search the element from the array by using binary search method. 22. B is sorted in descending order. (ii) All even numbers of X from left to right are copied into Z from right to left. (iv) All even numbers of Y from left to right are copied into Z from right to left. the resultant array is required to be in ascending order. Write a function named MERGE() which will produce third array named Z. Given two arrays of integers X and Y of sizes m and n respectively. Write definition for a function AddSum() in C++ with arguments/parameters-double x and int n. the function should return a value of type double and it should perform sum of the following series: 1/x-2!/x2+4!/x3+6!/x4+8!/x5……. (i) All odd numbers of X from left to right are copied into Z from left to right. 23. 33. upper to lower or vice versa. WAF which is passed a string to check whether a string entered by the user is a palindrome or not. Example : if the array is having “Computer Science”.upto N terms 32. if the string entered is: A a b r A c a d and the character as A or a then the output string should be aAbracAd See each a or A is converted to opposite case i. If the input string is sUmiT kUmAr KhuRana then it should be converted to Sumit Kumar Khurana . WAF which is passed a string and a character. Ex. consonants and digits in a string which has been passed as an argument to this function.29.e. 31. WAF which is passed an integer n and should find the sum of the series given below: (1)1+(1+2) 2+(1+2+3) 3+(1+2+3+4) 4 …………………. For example. 34 WAP to read a name (first. WAF to count the vowels. middle and last name) from a user and produce an output where the first letter of each name is capatilised and rest all in lower case. Then after reversal it should rearranged as “ecneicS retupmoC”. 30. Write a program in C++ which accepts a character array and its size as an arguments and reverse that array without using second array and library function. The function should Each occurrence of the given character (regardless of its case) is converted to opposite case. If the string is : Chetna then it should print as Chetna hetnaC etnaCh tnaChe naChet aChetn 45. Write a function which accept 2D array of integers and its size as arguments and displays the elements which lie on diagonals. 4 x 4 etc ] Example of the array content is 543 678 129 Output through the function should be Diagonal One: 5 7 9 Diagonal Two: 3 7 1 . [Assuming the 2D array to be a square matrix with odd dimension ie 3 x 3 . WAF which is passed an integer to find if the number entered by the user is an Armstrong number or not. 37. 39. 38. 36. E.g. Write a program to find a substring in the given string. WAF which is passed a string and that function should cyclic the string. E. if the string is “Computer hardware and software” then it should display “software and hardware Computer”. WAF which is passed a string and display the words from the last. WAF which is passed a string and that function should count the words and spaces in a string.g. If you find the string then also display the position where it is in the main string.35. A[1][0]. 48.int M) in c++ to find and return the sum of elements from all alternate elements of a 2-d array starting from A[0][0] Ex: If the array contains 3 4 2 [0][0] [0][1] [0][2] 7 [1][0] 8 [2][0] 9 [1][1] 5 [2][1] 3 [1][2] 4 [2][2] 5 [0][3] 2 [1][3] 1 [2][3] The function should add elements A[0][0].int N. WAF which is passed an integer number and that function will return 0 if the number is not perfect no. WAF which is passed an integer number and that function will return 1 if the number is prime no.[2][2] . otherwise return 0.46. 47.A[0][2].A[2][0]. otherwise return 1. WAF int SKIPSUM(int A[][4]. WAF which is passed an integer number and that function will return 1 if the number is palindrome otherwise return 0.A[1][2]. 49. 7. 55. 9 . Write a function which accept 2D array of integers and its size as arguments and the elements which are divisible by 7 multiply them with 7 and rest divide by 3.3.1. Q53.Q50. WAF which is passed a string and that function should count words in a string irerspective of spaces. 45 . 57. WAF which is passed a string. 9 .14. Write a program in c++ which accepts a 2D array of integers.10. number of rows and number of columns as arguments and assign the elements which are divisible by 3 or 5 into a one dimensional array of integers.19. 3 . . WAF which is passed a string and that function should find the frequency of every alphabet in a string. WAF which is passed two strings and that function should find whether 2 strings entered by the user is a anagram or not.9.3. It should rearrange the contents of the array in such a way that the values of alternate locations of the array are exchanged.15.10 then after rearranging the array should contain 15. Q51. function has to check whether a string entered by the user is a palindrome or not. WAF in C++ to print the sum of all the values which are either divisible by 5or 7 in a 2 D array passed as the argument to the function along with the row and column size.1 Q52. 25 .2. 18 12 24  19  11 3 25 32 5 9 16 45 28 14  31  The 27   18  resultant 1D 54. 5 .19.6. If it is a palindrome it should return 1 else return 0.9.7.(assume the size of the array to be even). If the array initially contains 2. 56.6. Ex. WAP that would accept a one dimensional integer array NUMBERS. If the 2D array is arrays is 12 .14. 24 . spaces and digits. 63. Declare a structure having the following members: code. A struct student has three data members: name.WAF which is passed a string and that function should count and display the number of blanks in the given string and replace every blank with % sign. 59. marks of 5 subjects. Display the names of the students (including marks) securing the highest and lowest using structure. double x and int n. of units consumed and bill_amount.95% Electronics 86%-90% Mechanical 81% . WAF which is passed a string and that function should count uppercase vowel.WAF which is passed a string and that function should count and display the number of vowels and digits in the given string. roll number.WAF which is passed a string and that function should check the input string is palindrome or not. Write a function to assign streams on the basis of table given below: Average marks Stream 96% and above Computer science 91%.58. WAP to accept the name and total marks of 20 students in an array.80% chemical 71% . WAF which is passed a string and that function should count alphabets. . no. 61. The function should return a value of type double and it should find the sum of the following series.75% civil 65. 62. name.85% Electrical 76%. 1+ x/2! + x2/4! + x3/6! + x4/8! + x5/10! + ----------+ xn/(2n)! 64. 60. Write a function seqsum( ) in C++ with two arguments. 66. The bill is to be calculated according to the following conditions. lowercase vowel and alphabets. 8o per unit Rs. 69 WAP to create distance structure.0 per unit Rs. 3. given its capital b)display capital and per capita income. given its country c) display country and capital. 1. of Units For the first 100 units For the next 200 units For the next 300 units Beyond 600 units Amount per unit Rs. its capital and per capita income. . subtract 2 complex numbers. given its per capita income. 68.20 per unit Rs. Declare a structure to represent a complex number ( a number having real and imaginary part) WAP to add.0 per unit 67. Print the final answer on screen. and add two distance structure variable (such that inches >=12 will become 1 feet). .No. 2. WAP to store information of country. and perform the following operation: a) display country and per capita. Documents Similar To Class Xi PracticalsSkip carouselcarousel previouscarousel nextggb0A Pdl SeminarC++ Suggested Study OrderChapter 5 Function-updated (1)MATLAB Tutorials for Beginners sapnote_0000984305Structured Programmingbilling configuration-sap.pdfMaterial Determination in SAPCreating a New Function Module7682185-mpCh9subprogramFC vs FBSubAP450 EH014 Infotype Enhancement V1.0148 Erp607 Bb Configguide en UsMixed Abap Questionsascript4Functions in CVBA in AutoCADAdvanced Engineering Mathematics 3rd Ed - Merle C. Potter Et Al. (OUP, 2005)Certification Kelvigaldatatypes_routines3Array_pt2_&_StringNsrp 0003 - Work-pac Work PlanningPLSQLHow I Overcame My Math Blocks.pdfImprove your Examination Temperament.txtFACE AND PALMPRINT RECOGNITION SYSTEM83 Flow Charts 2More From Vikas SaxenaSkip carouselcarousel previouscarousel nextXII2ndPBCSAKCBSE Class 12 Informatics Practices Free and Open Source Software Study NotesQno1CBSE Class 11 Information Practices Worksheet (1)anil anil(1)CBSE Class 11 Computer Science Question Paper SA2 2013 (2)Digital Wallet Seminar PptBIO DATA Ankita - Copy1st Pre-board c.s. Marking Scheme Set-1uddipta90 Informatics Practices Qp 2015RUBY_RESUME_N_2Xii Ip Mt 1 June 2015 1Appl Form Prabhati PGT BiotechnologyuddiptaClass III - Academic Syllabus 2015-16xii mat novip 2 class xii -qp(kvk).pdf12-IP11-IP11_usp_computer_science_05.pdf103022271 Infix to PostfixXii Mat April-may121884013-IP-Pre-Board-2013Class 11 Halfyearly Cscomp2_qpCBSE Class 11 Computer Science Question Paper SA1 2013CBSE Class 11 Computer Science Question Paper SA1 2014CBSE Class 12 Informatics Practices Sample Paper SA1 2015Splitup CS XI 2015Best Books About Function (Mathematics)Introductory Complex and Analysis Applicationsby William R. Derrick6th Grade Math MCQs: Multiple Choice Questions and Answers (Quiz & Tests with Answer Keys)by Arshad IqbalMatlab: A Practical Introduction to Programming and Problem Solvingby Stormy AttawayAnalytic Trigonometry: The Commonwealth and International Library of Science, Technology, Engineering and Liberal Studies: Mathematics Divisionby William J. BruceCalculusby Stanley I. GrossmanOutline Course of Pure Mathematicsby A. F. HoradamFooter MenuBack To TopAboutAbout ScribdPressOur blogJoin our team!Contact UsJoin todayInvite FriendsGiftsLegalTermsPrivacyCopyrightSupportHelp / FAQAccessibilityPurchase helpAdChoicesPublishersSocial MediaCopyright © 2018 Scribd Inc. .Browse Books.Site Directory.Site Language: English中文EspañolالعربيةPortuguês日本語DeutschFrançaisTurkceРусский языкTiếng việtJęzyk polskiBahasa indonesiaSign up to vote on this titleUsefulNot usefulMaster Your Semester with Scribd & The New York TimesSpecial offer for students: Only $4.99/month.Master Your Semester with a Special Offer from Scribd & The New York TimesRead Free for 30 DaysCancel anytime.Read Free for 30 DaysYou're Reading a Free PreviewDownloadClose DialogAre you sure?This action might not be possible to undo. Are you sure you want to continue?CANCELOK
Copyright © 2024 DOKUMEN.SITE Inc.