The c programming language questions
1. Write a menu-driven program that has the following options using user-defined
functions
a. To find the longest palindrome in an array entered by the user
b. To print individual characters of the string in revere order.
c. Store the information of 10 employees using structure that contains E_id (employe
id), E_name, E_salary, E_DOJ(employee date of joining)
2. Write a menu-driven program that has the following options using user-defined
functions
a. Move all the negative elements to one side of the array
b. sort strings in alphabetical order
c. Store the information of 10 teachers using structure that contains t_id (teacher id),
t_name, t_salary, t_dept(teacher department), t_sub(teacher subjects)
3. Write a menu-driven program that has the following options using user-defined
functions
a. print the biggest and smallest palindrome words in a string
b. Find the Union and Intersection of the two sorted arrays
c. Store the information of 10 studentss using structure that contains s_rollno
(student rollno), s_branch, s_year, s_dept(teacher department)
4. Write a menu-driven program that has the following options using user-defined
functions
a. GCD of given index ranges in an array
b. eliminate all vowels from a string.
c. Store the information of 10 bank using structure that contains b_ name(bank
name), b_int(bank minimun interest), b_loc(bank location), b_emp(total
number of bank employees)
5. Write a menu-driven program that has the following options using user-defined
functions
a. remove all spaces from a given string.
b. insert New value in the sorted array at given location
c. Store the information of 10 bank using structure that contains b_ name(bank
name), b_int(bank minimun interest), b_loc(bank location), b_emp(total
number of bank employees)
6. Write a menu-driven program that has the following options using user-defined
functions
a. delete an element at desired position from an array
b. copy one string to another and count copied characters.
c. Store the information of 10 students using structure that contains s_rollno
(student rollno), s_branch, s_year, s_dept(teacher department)
Answers
Longest palindrome
https://www.faceprep.in/c/largest-palindrome-in-an-array/Reverse a string
#include <stdio.h>
#include <string.h>
int main()
{
char s[100];
printf("Enter a string to reverse\n");
gets(s);
strrev(s);
printf("Reverse of the string: %s\n", s);
return 0;
}
Lol negative to one side
https://aticleworld.com/c-program-to-move-all-negative-numbers-to-beginning-and-positive-to-end-with-constant-extra-space/
Sort string in alphabet order
https://www.faceprep.in/c/program-to-sort-a-string-in-alphabetical-order/
Smallest and largest plaindrome in string
https://www.javatpoint.com/program-to-find-the-largest-and-smallest-word-in-a-string
Union and intersection
https://www.google.com/amp/s/www.geeksforgeeks.org/union-and-intersection-of-two-sorted-arrays-2/amp/
Remove all vowels
https://www.faceprep.in/c/remove-vowels-from-string/
Gcd
https://pencilprogrammer.com/c-programs/find-gcd-of-n-numbers/
Copy one string to another
https://www.includehelp.com/c-programs/copy-one-string-to-another-and-count-copied-characters.aspx
Also visit for more .
Click on the above button to know more.
Tags
Coding