{{ message }}

Instantly share code, notes, and snippets.

# easleyschool

Created Oct 12, 2019
View array_initialization_2.c
 int Age [] = {30, 22, 33, 44, 25};
Created Oct 12, 2019
View array_initialization_1.c
 int Age [5] = {30, 22, 33, 44, 25}; int Age [5]; Age [0]=30; Age [1]=22; Age [2]=33; Age [3]=44; Age [4]=25;
Created Oct 12, 2019
View array_definition_1.h
 #define NUM_EMPLOYEE 10 int Age[NUM_EMPLOYEE];
Created Oct 12, 2019
View array.c
 #include #include #include #define NUM_EMPLOYEE 10 int main(int argc, char *argv[]) { int Salary[NUM_EMPLOYEE], lCount=0, gCount=0, i=0; printf( "Enter employee salary (Max 10)\n" );
Created Oct 11, 2019
View example4.c
 while(low <= high) { mid = (low + high) / 2; if (target < list[mid]) { high = mid - 1; } else if (target > list[mid]) { low = mid + 1;
Created Oct 11, 2019
View example3.c
 for(i=0; i < N; i++) { for(j=0; j < N;j++) { statement; } }
Created Oct 11, 2019
View example2.c
 for(i=0; i < N; i++) { some statement; }
Created Oct 11, 2019
View example_square_of_n_2.c
 /* we have to calculate the square of n */ return n*n;
Created Oct 11, 2019
View example_square_of_n_1.c
 /* we have to calculate the square of n */ for i=1 to n do n = n + n // when the loop ends n will hold its square return n
Created Oct 11, 2019
View example_sum.c
 /* n is the length of array a[] */ int sum(int a[], int n) { int x = 0; // 4 bytes for x for( int i = 0; i < n; i++ ) // 4 bytes for i { x = x + a[i]; } return(x); }
You can’t perform that action at this time.