0% found this document useful (0 votes)
114 views1 page

Computer Science Class 12 Assignment - 2 Structures

The document contains instructions for 8 programming assignments involving structures in C++. Assignment 1 involves declaring a structure with bank account fields and printing account details that meet a balance threshold. Assignment 2 modifies balances by adding or subtracting amounts. Assignment 3 declares a student structure and counts students below a marks threshold. Assignment 4 prints the highest and lowest total marks. Assignment 5 sorts an array of student structures by roll number. Assignment 6 searches an array of student structures for a roll number. Assignment 7 inserts a new student record into a sorted array. Assignment 8 declares an employee structure and initializes a structure variable and array.

Uploaded by

khyati007
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views1 page

Computer Science Class 12 Assignment - 2 Structures

The document contains instructions for 8 programming assignments involving structures in C++. Assignment 1 involves declaring a structure with bank account fields and printing account details that meet a balance threshold. Assignment 2 modifies balances by adding or subtracting amounts. Assignment 3 declares a student structure and counts students below a marks threshold. Assignment 4 prints the highest and lowest total marks. Assignment 5 sorts an array of student structures by roll number. Assignment 6 searches an array of student structures for a roll number. Assignment 7 inserts a new student record into a sorted array. Assignment 8 declares an employee structure and initializes a structure variable and array.

Uploaded by

khyati007
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 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