C programs

Procedure of solving Decimal into binary number system in C

Decimal Number having base 10 it consists of number from 0 to 9. Binary Number having base 2 it consists of number 0 and 1. Conversion of Decimal to…

Write a C Program for Prime numbers using sieve

Write a C Program for Prime numbers using sieve #include<stdio.h> #define MAX 10000 int main(void) { int p,i,n,a[MAX]={0}; printf("…

Write a C Program to print Magic matrix

Write a C Program to print  Magic matrix #include<stdio.h> #define MAX 20 int main(void) { int a[MAX][MAX],i,j,n,num; printf("Enter v…

Write a C Program to print Pascal's triangle

Write a C Program to print Pascal's triangle #include<stdio.h> #define MAX 15 int main(void) { int a[MAX][MAX]; int i,j,n; printf(&qu…

Write a C Program of merging two sorted arrays into a third sorted array

Write a C Program of merging two sorted arrays into a third sorted array #include<stdio.h> #define MAX 100 void merge(int arr1[],int arr2[],…

Write a C Program of sorting using insertion sort

Write a C Program of sorting using insertion sort #include<stdio.h> #define MAX 100 int main(void) { int arr[MAX],i,j,k,n; printf("Ent…

Write a C Program to insert an item in a sorted array at the proper place by shifting other elements to the right

Write a C Program to insert an item in a sorted array at the proper place by shifting other elements to the right  #include<stdio.h> #defin…

Write a C Program to insert an item in an array at a specified index by moving other elements to the right

Write a C Program to insert an item in an array at a specified index by moving other elements to the right #include<stdio.h> #define SIZE 10 i…

Write a C Program for Bubble sort

This Program will Takes 2 inputs For the size of array Input for arrays #include<stdio.h> #define MAX 100 int main(void) { int arr[MAX],i,j,t…

Write a C Program for Selection sort

Write a C Program for Selection sort  #include<stdio.h> #define MAX 100 int main(void) { int arr[MAX],i,j,n,temp,min; printf("Enter t…

Write a C Program for Binary search in an array

This Program will Takes 3 inputs For the size of array Input for arrays Element to be searched in array If element is available it will return index…

Write a C Program for Linear search in an array

This Program will Takes 3 inputs For the size of array Input for arrays Element to be searched in array If element is available it will return index …

Write a C Program to convert a decimal number to Binary, octal or hexadecimal

Write a C  Program to convert a decimal number to Binary, octal or hexadecimal #include<stdio.h> void func(int num,int b); int main(void) { i…

Write a C Program for input and output of strings using gets() and puts()

Write a C Program for input and output of strings using gets() and puts() #include<stdio.h> int main(void) { char str[10]; printf("Ente…

Write a C Program Program For Input and output of strings using scanf() and printf()

Write a C Program Program For Input and output of strings using scanf() and printf() #include<stdio.h> int main(void) { char str[10]="A…

Write a C Program Program For Tranpose of matrix

Write a C Program Program For Tranpose of matrix #include<stdio.h> #define ROW 3 #define COL 4 int main(void) { int mat1[ROW][COL], mat2[COL]…

Write a C Program Program For Multiplication of two matrices

Write a C Program Program For Multiplication of two matrices #include<stdio.h> #define ROW1 3 #define COL1 4 #define ROW2 COL1 #define COL2 …

Write a C Program Program ForAddition of two matrices

Write a C Program Program ForAddition of two matrices #define ROW 3 #define COL 4 #include<stdio.h> int main(void) { int i,j,mat1[ROW][COL]…

Write a C Program Program to input and display a matrix

Write a C Program Program to input and display a matrix #define ROW 3 #define COL 4 #include<stdio.h> int main(void) { int mat[ROW][COL],i,…

Write a C Program that uses a general function which works on arrays of different sizes

Write a C Program that uses a general function which works on arrays of different sizes #include<stdio.h> int add(int arr[],int n); int main(…
Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.