0% found this document useful (0 votes)
19 views2 pages

Loopsquestion

The document lists 20 problems related to arrays in C programming. It asks to write programs to read and modify arrays in various ways like reversing order, counting duplicates, finding max/min, rearranging even and odd indices, updating with neighbor products, and sorting positive and negative numbers alternatively. It also provides 4 string problems like sorting strings, splitting by space, and converting vowels to uppercase.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Loopsquestion

The document lists 20 problems related to arrays in C programming. It asks to write programs to read and modify arrays in various ways like reversing order, counting duplicates, finding max/min, rearranging even and odd indices, updating with neighbor products, and sorting positive and negative numbers alternatively. It also provides 4 string problems like sorting strings, splitting by space, and converting vowels to uppercase.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

1) find whether a number is perfect number or not?

2) Write a program in C to calculate the sum of the series (1*1) + (2*2) + (3*3) +
(4*4) + (5*5) + ... + (n*n).
3) Write a program in C to print a square pattern with # character
# # # #
# # # #
# # # #
# # # #
4) Write a program in C to display the cube of the number upto given an integer
5) Write a program in C to display the n terms of odd natural number and their sum.
6) Write a program in C to display the n terms of even natural number and their
sum.
7) Write a program in C to find the sum of the series 1 +11 + 111 + 1111 + .. n
terms.
8) Write a program in C to find the number and sum of all integer between 100 and
200 which are divisible by 9
9) Write a program in C to display the pattern like right angle triangle with
number.
1
12
123
1234
12345
10) Write a program in C to make such a pattern like a pyramid with numbers
increased by 1.
1
2 3
4 5 6
7 8 9 10
ARRAYS

11) Write a program in C to read n number of values in an array and display it in


reverse order.
12) Write a program in C to count a total number of duplicate elements in an array
13) Write a program in C to print all unique elements in an array.
14) Write a program in C to find the maximum and minimum element in an array.
15) Write a program in C to calculate determinant of a 3 x 3 matrix.
16) Write a program in C to accept two matrices and check whether they are equal.
17) Write a program in C to find the missing number from a given array. There are
no duplicates in list.
18) Write a program in C to rearrange an array such that even index elements are
smaller and odd index elements are greater than their next.
Expected Output:
The array given is:
6 4 2 1 8 3
The new array after rearranging:
4 6 1 8 2 3
19) Write a program in C to update every array element with multiplication of
previous and next numbers in array.
Expected Output:
The given array is:
1 2 3 4 5 6
The new array is:
2 3 8 15 24 30
20) Write a program in C to rearrange positive and negative numbers alternatively
in a given array

Strings
21) Write a C program to sort a string array in ascending order.
22) Write a program in C to read a string through keyboard and sort it using bubble
sort.
23) Write a program in C to split string by space into words.
24) Write a C programming to convert vowels into upper case character in a given
string.

You might also like