You are on page 1of 1

COMPUTER SCIENCE CLASS 12TH ASSIGNMENT -2 STRUCTURES

Q1 Declare a structure which contains fields Acc.no Name Balance amount Write a c++ program that takes details of 5 bankholders and print the details of those whose balance>3000/- in the function printdata(). Declare a structure which contains fields Acc.no Name Balance amount Write a c++ program that takes details of 5 bankholders. Also create a function modify that takes array as an argument .For each bankholder it takes from the user credit or debit amount and changes his balance accordingly in the array. It then prints the changed array in the main function. Declare a structure student that stores rollno , name , marks in 3 subjects(stored as array) and total marks . Store details of 5 students. Create a function query that takes the array as the argument and takes a number from the user and returns how many students have total marks less than that number. Declare a structure student that stores rollno , name , marks in 3 subjects(stored as array) and total marks . Store details of 5 students. create a function check that takes array as an argument and prints the rollnos of students who have achieved highest & lowest total marks. Declare a structure student that stores rollno , name , marks in 3 subjects(stored as array) and total marks . Store details of 5 students. create a function bsort that takes array as an argument and sort the array by bubble sort method assuming roll nos are not repeated.Print new array in main(). Declare a structure student that stores rollno , name , marks in 3 subjects(stored as array) and total marks . Store details of 5 students. create a function bsearch that takes array as an argument and roll no to be searched and searches for that roll no in the array. It returns -1 if not found else returns position of the student in the array.Print proper message in main(). Declare a structure student that stores rollno , name , marks in 3 subjects(stored as array) and total marks . Store details of 5 students in ascending order of roll nos.. Create a function arrange() that takes array as an argument . It takes a new record from the user in the function and inserts at its proper place in the array so that sorted order of the rollnos. is maintained. It then calls show() function to print new array. Declare structure employee with fields 1. no 2. basic salary 3. date of birth Declare and initialize 1. a structure variable of type employee 2. an array of structures of type employee.(size

Q2

Q3

Q4

Q5

Q6

Q7

Q8

3)

You might also like