https://github.com/eyantra698sumanto/basic-c-programs
This Repository contains basic programs in C programming language
https://github.com/eyantra698sumanto/basic-c-programs
array c cplusplus do-while for function matrix pattern recursion search series sort string structure structured-programming while
Last synced: 10 months ago
JSON representation
This Repository contains basic programs in C programming language
- Host: GitHub
- URL: https://github.com/eyantra698sumanto/basic-c-programs
- Owner: Eyantra698Sumanto
- License: gpl-3.0
- Created: 2021-07-08T08:47:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-17T08:16:01.000Z (over 3 years ago)
- Last Synced: 2025-01-09T16:03:29.382Z (12 months ago)
- Topics: array, c, cplusplus, do-while, for, function, matrix, pattern, recursion, search, series, sort, string, structure, structured-programming, while
- Language: C
- Homepage:
- Size: 629 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Basic-C-Programs
Arrays
1. To search an element in an array using
i. Linear Search
ii. Binary Search.
2. To sort array in ascending/descending order
3. To find transpose of a matrix without using another matrix
4. To find transpose of a matrix with using another matrix
5. To print array in reverse using pointers and function (Expt 23)
6. 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
7. WAP to check whether entered matrix is symmetric or not
8. To find norm of a square matrix
9. To find trace of a square matrix
10. 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
11. WAP to count no of vowels, consonants, digits, spaces and special characters in entered string
12. WAP to check whether entered string is palindrome or not
13. 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’.
15. 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).
16. 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
17. 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.
18. 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
20. WAP to add two rational numbers using structure
21. WAP to add two complex numbers using structure
22. WAP to find distance of two points using structure
Functions
23. 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
24. 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
25. WAP to find standard deviation of n numbers inputted by user using function
find_mean() , find_variance().