C PROGRAMMING
-
write a c program to find greatest element of an array
C program to find greatest element of an array #include<stdio.h>#include<conio.h>void main(){ int arr[10]; int size,large,loop,search; printf("Enter the size of array…
Read More » -
write a c program to reverse the elements of an array
C program to reverse the elements of an array #include <stdio.h>main(){ int n, loop, a[100]; printf("Enter the number of elements…
Read More » -
write a c program to find smallest element of an array
C program to find smallest element of an array #include<stdio.h>#include<conio.h>void main(){ int arr[10]; int size,small,loop; printf("Enter the size of…
Read More » -
write a c program to implement array of structure
C program to implement array of structure #include<stdio.h> struct student { char name[20]; char roll[20]; int mks;} std[10], temp; void…
Read More » -
write a c program to store details or record of a student using structure
C program to store details or record of a student using structure? Structure : Structure is a user defined data…
Read More » -
write a c program to calculate sum of array elements using pointers
#include<stdio.h>#include<conio.h>main(){ int numArray[10]; int i,n, sum = 0; int *ptr; printf("nEnter the size of array : n"); scanf("%d",&n); for (i…
Read More » -
write a c program to calculate average of array elements
#include <stdio.h>main() { int n, i, num[100]; float sum = 0.0, avg; printf("Enter the size array : n"); scanf("%d", &n);…
Read More » -
wirte a c program to perform basic operations on arrays
#include<stdio.h>#include<conio.h>void main() {int a[100],a2[100],n,i;printf("Enter No. of Elements you want to enter in Array : n");scanf("%d",&n);for(i=0;i<n;i++){printf("Enter %d Element ",i+1);scanf("%d",&a[i]);}printf("Elements in array…
Read More » -
write a c program to calculate call charges
#include<stdio.h>main(){ int noc; float res; printf("Enter the number of callsn"); scanf("%d",&noc); if(noc<=50) { printf("NILL ! no chargesn"); } else if(noc<=100)…
Read More » -
write a c progarm to calculate post charges by weight of package
#include<stdio.h>main(){ int weight; printf("Enter the weightn"); scanf("%d",&weight); if(weight<=20) { printf("Charges are 5n"); } else if(weight<=100) { printf("Charges are 9.0n"); }…
Read More » -
write a c program to convert a given number into binary and a binary number to decimal
#include <math.h>#include <stdio.h>int convert(long n);long convert_decimal_to_binary(int n);main(){ int dec; long n; printf("Enter a binary number: "); scanf("%lld", &n); printf("%lld in…
Read More » -
call by value and call by reference demonstration
#include <stdio.h> void swap_call_by_value(int , int ); void swap_call_by_refrence(int *, int *); //prototype of the function int main()…
Read More » -
write a c program to find the ascii value of a given charactere
#include <stdio.h>main() { char c; printf("Enter a character: "); scanf("%c", &c); printf("ASCII value of %c = %d", c, c); getch();}
Read More » -
write a c program to calculate percentage of marks obtained by a student
#include <stdio.h> int main() { int cLan, data_structures, operating_system, software_engineering, computer_organisation; float total, average, percentage; /* Input marks of all…
Read More » -
write a c program to print prime numberes upto a given value/number
#include<stdio.h>int main(){ int n,i,fact,j; printf("Enter the lemit upto you want to print prime numbersnn"); scanf("%d",&n); printf("nPrime Numbers are: n"); for(i=1;…
Read More »