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

Problems on array_string_function_structure

Cse problem

Uploaded by

joy331456
Copyright
© © All Rights Reserved
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)
14 views

Problems on array_string_function_structure

Cse problem

Uploaded by

joy331456
Copyright
© © All Rights Reserved
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/ 2

Array

1. C program to count Array elements by using sizeof() operator


2. C program to swap first element with last, second to second last and so on (reversing
elements)
3. C program to merge two arrays in third array.
4. C program to find a number from array elements.
5. C program to check prime numbers in an array.
6. C program to find largest and smallest elements in an array
7. C program to find second largest elements in a one dimensional array
8. C program to calculate EvenSum and OddSum from an array.
9. C program to add/subtract Two 2 Dimensional Arrays elements.
10. C program to find occurrence of an element in one dimensional array

String
1. C program to count the number of words and number of characters in a given line of text
except the spaces.
2. C program to count the numbers of vowels, consonants, digits and special symbols in a
given string.
3. C program to input a multi word string and produce a string in which first letter of each
word is capitalized.
4. C program to search a character in a given string.
5. C program to reverse a string.
6. C program to read a string and print the length of each word.
7. C program to evaluate string functions. [strcpy(), strcat(), strcmp() and strlen()]
Function
1. Write a function that takes one integer argument and returns its square.
2. Write a function to calculate the area of various geometrical (circle, square, rectangle,
triangle, etc.).
3. Write a function that has one-character argument and displays that it’s a small letter,
capital letter, a digit or a special symbol.
4. Write a function that will check whether a number is prime or not.
5. Write a program to take two numbers as input and function to swap them by passing
parameters as values and also as addresses.
6. Write a recursive function that will find the factorial of an integer.
7. Write a recursive function that will find the GCD of two numbers.
8. Write a function that will find the minimum and maximum number from an array.
9. Write a function that receives a string (character array) as argument and returns the length
of this array.
10. Write a function that will sort an unsorted array.

Structure
1. Write a program to store and display information of multiple students. Each student has
attributes: name, roll_number, and marks.
2. Write a program to calculate the distance between two points in a 2D space. Each point
has x and y coordinates.
3. Write a program to store information of multiple books (title, author, price) and display
books that have a price above a specified value.
4. Write a program to store information about employees and calculate total salary paid by a
company. Each employee has an id, name, and salary.
5. Write a program to input information about students and calculate the grade of each
student based on their marks.

You might also like