My Blog
Articles related to programming, computer science, technology and research.

C program to find the unique element in an array

28/07/2016 Categories: Arrays. Comments Off on C program to find the unique element in an array

A C program to find the unique element in the given array. Note: This program works only when the values are repeated two times and when there is only one unique value. Program is as follows: #include<stdio.h> int main() { int n; printf(“Enter array size: “); scanf(“%d”, &n); int a[n]; printf(“Enter %d numbers: “, n); […]

Read the rest of this entry »

C program to reverse an array in place

30/06/2016 Categories: Arrays. Comments Off on C program to reverse an array in place

C program to reverse an array in place, i.e., without using another temporary array. Program is as follows:

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to find the largest and smallest numbers in an array of integers

06/05/2016 Categories: Arrays. Comments Off on C program to find the largest and smallest numbers in an array of integers

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to add and multiply two compatible matrices

06/05/2016 Categories: Arrays. Comments Off on C program to add and multiply two compatible matrices

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to sort an array of elements using selection sort

06/05/2016 Categories: Arrays. Comments Off on C program to sort an array of elements using selection sort

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to search for an element using binary search

06/05/2016 Categories: Arrays. Comments Off on C program to search for an element using binary search

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to search for an element using linear search

06/05/2016 Categories: Arrays. Comments Off on C program to search for an element using linear search

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to interchange the largest and smallest elements in the array

06/05/2016 Categories: Arrays. Comments Off on C program to interchange the largest and smallest elements in the array

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to display the binary equivalent of a given decimal number

06/05/2016 Categories: Arrays. Comments Off on C program to display the binary equivalent of a given decimal number

 

Input and output for the above program is as follows:

 

Read the rest of this entry »

C program to find the 2s complement of a given binary number

06/05/2016 Categories: Arrays. Comments Off on C program to find the 2s complement of a given binary number

 

Input and output for the above program is as follows:

 

Read the rest of this entry »
Scroll Up