C Program to Merge Two Arrays Sorted in Descending Order

Ex: Write a C program to merge two arrays and sort in descending order. How to write a C program to merge two arrays and sort in descending order. C program to merge two arrays and sort in descending order.

Input from user:

Enter the limit of first array: 3
Enter elements: 
1
2
3

Enter the limit of second array: 3
Enter elements:
1
2
3

C Program to Copy the Elements of one Array into Another Array

Ex: Write a C program to copy the elements of one array into another array. How to write a C program to copy the elements of one array into another array. C program to copy the elements of one array into another array.


Input from user:

Enter the limit: 5

Enter elements: 
1
3
5
7
9

Expected output:

Elements in 1st array are: 
arr[0]=1
arr[1]=3
arr[2]=5
arr[3]=7
arr[4]=9

C Program to Print Array Elements in Reverse Order

Ex: Write a C program to print given array elements in reverse order. How to write a C program to print array elements in reverse order. C program to print array elements in reverse order.

Input from user:

Enter the limit: 5

Enter the elements:
10
20
30
40
50

Expected output:

Given elements in reverse order:
50 40 30 20 10

What is Break Statement in C

Break statement is very useful to exit from any loop  such as for loop, while loop and do while loop. When the break statement is encountered in the loop then the loop will stop running the statements and immediately exit from the loop.



  Syntax of Break Statement in C :

Continue Statement in C

Continue statement skips some lines of code inside the loop and continues with the next iteration. 
When the continue statement is encounters in a loop, then program will skip the all the statements after the continue statement and the loop continues with the next iteration.
It is mainly used for a code which we want to skip.


  Syntax of Continue Statement in C :


C Program to Capitalize the Given String

Ex: Write a C program to capitalize a given string. How to write a C program to capitalize given string. C program to capitalize given string.


Input from user:

Enter the string: 
tHis IS cOdeForhuNger

Expected output:

String after capitalize: 
This Is Codeforhunger

C Program to Find Largest Element of Array

Ex: Write a C program to print largest element of array. How to write a C program to find largest element of array. C program to print largest element of array.


Input from user:


Enter the limit: 12


Enter elements: 

12 

34
-1
54
7
9
16
44
32
21
19

C Program to print Total number of Notes in given Amount

Ex: Write a C program to find total number of notes in given amount. How to write a C program to print total number of notes in given amount. C program to print total number of notes in given amount.


Input from user:


Enter the amount: 2528


Expected output:


500=5

100=0
50=0
20=1
10=0
5=1
2=1
1=1

C Program to Find Percentage of given Subjects Marks using Array

Ex: Write a C program to find percentage of given subjects marks using array. How to write a C program to print percentages of given marks. C program to find percentage of given subjects marks.


Input from user:


Enter limit of subjects: 5


Enter marks of subject[1]:71

Enter marks of subject[2]:65
Enter marks of subject[3]:61
Enter marks of subject[4]:81
Enter marks of subject[5]:77

Expected output:


Percentage= 71.0000

C Program to Print all Negative Elements in Array

Ex: Write a C program to print all negative elements in array. How to write a C program which print all negative elements in array. C program to print all negative elements in array.


Input from user:

Enter the limit: 5

Enter the numbers:
10
-3
12
-9
-2

Expected output:

Negative elements are:
-3
-9
-2