0% found this document useful (0 votes)
20 views

Programming Assignment

The document outlines programming assignments organized into different sections including basic programs, if/else/switch-case programs, loops programs, patterns programs, 1-D array programs, 2-D array programs, string programs (level 1 and 2), functions/recursion programs, pointer programs, and structure/union programs. Each section lists 20 related programming problems to solve covering fundamental programming concepts and data structures.

Uploaded by

Jhalak Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Programming Assignment

The document outlines programming assignments organized into different sections including basic programs, if/else/switch-case programs, loops programs, patterns programs, 1-D array programs, 2-D array programs, string programs (level 1 and 2), functions/recursion programs, pointer programs, and structure/union programs. Each section lists 20 related programming problems to solve covering fundamental programming concepts and data structures.

Uploaded by

Jhalak Gupta
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Programming Assignment

Basic Programs
1) Find the Area and Circumference of a Circle
2) Print ASCII Value of the Character
3) Find the Area of a Triangle, Rectangle, Square
4) Convert a Person's Name in Abbreviated
5) Calculate a Simple Interest and Compound Interest
6) Find the Gross Salary of an Employee
7) Calculate the Percentage of 5 Subjects
8) Convert Temperature Celsius into Fahrenheit
9) Program to Display the Size of the Different Data type
10) Display Size of the Different Data Type

If/Else/Switch-Case Programs
1) Program to Check Character Is Uppercase, Lowercase Alphabet or a Digit or
a Special Symbol
2) Find the Greatest Among Three Numbers
3) Checking You Are Eligible for Voting or Not
4) Program for Finding Greater Between Two Number
5) Checking Number is Even or Odd
6) Program to Check Leap Year or Not
7) Check Character Is a Vowel or Not
8) Given Date Month and the Year Is Correct or Not
9) Check whether a number is negative, positive or zero
10) Check whether a number is divisible by 5 and 11 or not
11) Input angles of a triangle and check whether the triangle is valid or not
12) Input all sides of a triangle and check whether the triangle is valid or not
13) Check whether the triangle is an equilateral, isosceles or scalene triangle
14) Find all roots of a quadratic equation
15) Temperature Conversion Celsius to Fahrenheit and Vice Versa
16) C Program to Find the Day
17) Program for Calculator
18) Find a Grade of Given Marks
19) Finding Radius, Circumference, and Volume of Cylinder
20) Print the month name corresponding to entered number by user.
Loops Programs

1) Reverse a Given Number


2) Find sum of digits of a given number
3) Count Number of Digits of an Integer
4) Find the Number is Armstrong or Not
5) Calculate the Sum of Natural Numbers
6) Print Multiplication Table
7) Display Fibonacci Series
8) Find the factorial of a given number
9) Print the prime numbers between 1 to given number N
10) Find GCD of Two Numbers
11) Find LCM of Two Numbers
12) Number Is a Palindrome or Not
13) Find a Generic Root of a Number
14) Print a Calendar Taking Input from User
15) Sort a Float Array in Ascending and Descending Order
16) Implement definition of Multiplication
17) Implement definition of Division
18) Implement the formula of ex
19) Implement the formula of log x
20) Conversion of a Decimal number to Binary number

Patterns Programs
1) Home Pattern with Help of *
2) Diamond Star * Pattern
3) Left Half Diamond Star Pattern
4) Right Half Diamond Star Pattern
5) Hollow Diamond * Pattern
6) Pyramid Pattern Using Star *
7) Right Arrow Star Pattern
8) Left Arrow * Pattern
9) Pascal Triangle Using a Number
10) Christmas Tree Pattern Using *
1-D Array Programs
1) Insert and Delete an Element at Desired or Specific Position in an Array
2) C Program for Remove Duplicates Items
3) Delete Element from an Array at a Desired or Specific Position
4) Convert All Input String Simultaneously into an Asterisk *
5) Find a maximum and minimum element in an array
6) Print all negative elements in an array
7) Count the total number of even and odd elements in an array
8) Count the total number of negative elements in an array
9) Copy all elements from an array to another array.
10) Count frequency of each element in an array.
11) Print all unique elements in the array
12) Count the total number of duplicate elements in an array
13) Merge two arrays to the third array
14) Put even and odd elements of an array in two separate arrays
15) Search an element in an array

2-D Array Programs


1) Addition and Subtraction of two matrices
2) Multiply two matrices
3) Check whether two matrices are equal or not
4) Sum of the main diagonal elements of a matrix
5) Find the sum of minor diagonal elements of a matrix
6) Find the sum of each row and column of a matrix
7) Interchange diagonals of a matrix
8) The upper triangular matrix
9) Find a lower triangular matrix
10) Sum of the upper triangular matrix
11) Find the sum of a lower triangular matrix
12) The transpose of a matrix
13) Find determinant of a matrix
14) Check the sparse matrix
15) Check the symmetric matrix
String Programs (Level-1)
1) C Program for Remove All Vowels from a String
2) WAP Program to Remove Given Word from a String
3) Convert String to Integer Without Using Library Functions
4) C Program to Upper Case and Lower Case Conversion and Vice-Versa
5) Program for Reverse a String Using Library
6) Reverse a String Without Using Library
7) Compare Two String Using STRCMP Function
8) C Program for Check String Is Palindrome or Not
9) Find Number of Vowels, Consonants, Digits and White Space Character
10) Find a total number of alphabets, digits or special character in a string
11) Count the total number of words in a string
12) Copy one string to another string
13) Concatenate two strings
14) Find the length of a string
15) Reverse order of words in a given string

String Programs (Level-2)


1) Find the first occurrence of a character in a given string
2) Find the last occurrence of a character in a given string
3) Search all occurrences of a character in a given string
4) Count occurrences of a character in a given string
5) Find the highest frequency character in a string
6) Find the lowest frequency character in a string
7) Count the frequency of each character in a string
8) Remove the first occurrence of a character from a string
9) Remove the last occurrence of a character from a string
10) Delete all occurrences of a character from a string
11) Remove all repeated characters from a given string
12) Replace the first occurrence of a character with another in a string
13) Replace the last occurrence of a character with another in a string
14) Put all occurrences of a character with another in a string
15) Find the first occurrence of a word in a given string
16) Find the last occurrence of a word in a given string
17) Search all occurrences of a word in a given string
18) Count occurrences of a word in a given string
19) Remove the first occurrence of a word from the string
20) Remove the last occurrence of a word in a given string
21) Delete all occurrence of a word in a given string
22) A Trim leading white space characters from a given string
23) Trim trailing white space characters from a given string
24) Trim both leading and trailing white space characters from a given string
25) Remove all extra blank spaces from the given string
Functions/Recursion Programs
1) Bubble Sort Using a Function in Ascending and Descending Order
2) Convert Binary Number to Decimal or Decimal Number to Binary
3) Convert Octal Number to Decimal and Vice Versa
4) C Program for Convert Binary to Octal and Vice Versa
5) Display Prime Numbers Between Intervals
6) C Program to Check Prime or Armstrong Number
7) Cube of any number using the function
8) Find diameter, circumference and area of a circle using functions
9) Maximum and minimum between two numbers using functions
10) Check whether a number is even or odd using functions
11) Check whether a number is prime, Armstrong or perfect number using
functions
12) Find all prime numbers between the given interval using functions
13) Print all strong numbers between the given interval using functions
14) Armstrong numbers between the given interval using functions
15) Print all perfect numbers between the given interval using functions
16) Find the power of any number using recursion
17) Print all natural numbers between 1 to n using recursion
18) Print all even or odd numbers in a given range using recursion
19) Sum of all natural numbers between 1 to n using recursion
20) Find the sum of all even or odd numbers in a given range using recursion
21) Find reverse of any number using recursion
22) Check whether a number is a palindrome or not using recursion
23) Find the sum of digits of a given number using recursion
24) Find factorial of any number using recursion
25) Generate nth Fibonacci term using recursion
26) Find LCM,HCF, and GCD of two numbers using recursion
27) Display all array elements using recursion
28) Find the sum of elements of the array using recursion
29) Find maximum and minimum elements in an array using recursion
30) Stricmp() Function (Case In-Sensitive Compare)
31) Strncat() Function (String Concatenate)
32) Strstr() Function (Sub-String)
33) Strlwr() Function (To Lower-Case)
34) Strupr() Function (To Upper-Case)
35) Strncpy() Copy N Chars
36) Strrev() String Reverse
37) Strlen() String Length
38) Strcat() String Concatenate
39) Strcmp() String Compare
40) Strcpy() Copy the String
Pointer Programs
1) C Program for Reverse a String Using Pointer
2) Program for Comparing Two String Using Pointer
3) Open a File (open a Program Itself) Using Pointer
4) Add two numbers using pointers
5) Swap two numbers using pointers
6) Input and print array elements using a pointer
7) Copy one array to another using pointer
8) Swap two arrays using pointers
9) Reverse an array using pointers
10) Search an element in an array using pointers
11) Access two-dimensional array using pointers
12) Add two matrix using pointers
13) Multiply two matrix using pointers
14) Find the length of the string using pointers
15) In short How to Copy one string to another using pointer
16) Concatenate two strings using pointers
17) Compare two strings using pointers
18) Find the reverse of a string using pointers
19) Sort array using pointers
20) Return multiple values from a function using pointers
Structure/Union Programs
1) C Program to Store Students Information on Using a Structure
2) Add Two Distances( in Inch-Feet) System Using Structures
3) Add Two Complex Numbers by Passing Structure with Function
4) Calculate the Difference Between the Two Time Period (HH: MM: SS)
5) C Program to Store Information Using Structures, Pointer with Dynamically
Memory Allocation
6) Accept & display employee details
7) Calculate total payment of workers
8) Calculate total runs
9) Calculate age of student
10) Print details of customers
11) Details of highest paid employee
12) Program for Library operations
13) Arrange student record in descending order
14) Menu driven program for a book shop
15) Create structure & display elements
16) Menu driven program for employee structure
17) Arrange student data alphabetically
18) Program to extract individual bytes from an unsigned int using union
19) Program to find the size of the union
20) Program for passing structures as function arguments and returning a
structure from a function

File Handling Programs


1) Create a file and write contents, save and close the file
2) Read file contents and display them on the console
3) Read numbers from a file and write even, odd and prime numbers to
separate file
4) Append content to a file
5) Compare two files
6) How to Copy contents from one file to another file
7) Merge two files to the third file
8) Count characters, words and lines in a text file
9) Delete a word from a text file
10) Remove empty lines and specific lines from a text file
11) Find the occurrence of a word in a text file
12) Count occurrences of a word in a text file
13) Count occurrences of all words in a text file
14) Find and replace a word in a text file
15) Replace a specific line in a text file
16) Print source code of the same program
17) Convert uppercase to the lowercase character and vice versa in a text file
18) Find properties of a file using stat() function
19) Check if a file or directory exists
20) List all files and sub-directories recursively
Puzzles Programs
1) Print numbers from 1 to n without using a semicolon
2) Sum of two numbers without using any operator
3) How to show memory representation of c variables
4) Condition to print “Hello World”
5) Modify/add only one character and print ‘*’ exactly 20 times

You might also like