Declaring variables in C language
C programming language allows to define and classify data so we can use it appropriately in various parts of the program in the correct form...
C Programming Language
C language developed at Bell lab by Dennis Ritchie on UNIX environment. UNIX was later rewritten in C. An earlier version of C is BCPL...
Recursive C program for Binary search
Below is an example Recursive C program to perform Binary – int binsearch(int low, int high, in a, X){ int mid; if(low > high){ return(-1);...
Recursive C program to print Fibonacci series
Below is an example recursive C program to return Fibonacci series for a given number – int fibonacci (int x){ if(n < 0){ printf("Invalid input");...
C program for finding factorial by recursion
Here is a C program to find a factorial by recursive method – int factorial (int x ) { return ( n==0? 1: n*(fact(n-1))); }...
Bubble sort in C
Simple bubble sort in C – for (i=0; i<n-1; i++){ for(j=i+1; j<n; j++){ if(x[j] < x[i]){ temp = x[j]; x[j] = x[i]; x[i] = temp;...
Tree representation in C
Below is an example to represent a Tree structure in C using struct...
File Operation in C
Below is a simple C program to perform file operation – include <stdlib.h> main() { FILE * file_source char * file_name = (char*) malloc (sizeof...