Arrays
- To search an element in an array using i. Linear Search ii. Binary Search.
- To sort array in ascending/descending order
- To find transpose of a matrix without using another matrix
- To find transpose of a matrix with using another matrix
- To print array in reverse using pointers and function (Expt 23)
- To print pascal triangle (program should ask no of lines to user) 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
- WAP to check whether entered matrix is symmetric or not
- To find norm of a square matrix
- To find trace of a square matrix
- Write a program to perform addition of two matrices using user defined functions: a. read_matrix() b. print_matrix() c. add_matrix() b. Print all three matrices.
Strings
- WAP to count no of vowels, consonants, digits, spaces and special characters in entered string
- WAP to check whether entered string is palindrome or not
- WAP using user defined functions xstrlen, xstrcmp, xstrcpy, xstrcat, xstrev. Use switch case.
Structure
14. Create a structure Patient having patientID , Name and diseases as data members. Read details of 5 patients and print details of the patients with a disease ‘diabetes’.
- Create a structure Employee with data members’ employee ID, name and salary. Write a program to sort 10 employees according to their salary (in descending order).
- WAP to print names of students in ascending order of their average marks using structure student. Student structure contains following elements: Roll No, Name, marks of 3 subjects (array of int size 3), avg_marks
- To create a structure having following elements: i. Employee code ii. Employee name iii. Employee salary iv. Employee date_of_joining WAP to read at least 10 records and display them using nested structure.
- Define a structure “Hockey” consisting of following elements: i. Player name ii. Name of the country iii. Number of matches played iv. Number of goals scored
WAP to read records of N players and to prepare following lists: i) List prepared according to players’name ii) List prepared according to country’s name iii) List prepared according to number of matches played iv) List prepared according to number of goals scored 19. Tutorial 9 question no 2
- WAP to add two rational numbers using structure
- WAP to add two complex numbers using structure
- WAP to find distance of two points using structure Functions
- Write recursive function i. To compute factorial of a number ii. To compute xn iii. To computer gcd of two numbers using Euclid’s algorithm iv. To add two numbers v. To multiply two numbers vi. To add first n natural nos vii. To add array elements of array size n viii. To print binary equivalent of a number ix. To print first n terms of Fibonacci series
- WAP using functions and switch-case to i. Decide whether entered no is odd and even. ii. Entered year is leap or not iii. Maximum of 3 nos using ternary operator iv. Swap two nos. v. To find area and perimeter of a circle given radius vi. To find area and perimeter of a rectangle given length and breadth vii. To find nPr and nCr using fact function
- WAP to find standard deviation of n numbers inputted by user using function find_mean() , find_variance().