Skip to content

Instantly share code, notes, and snippets.

int Age [] = {30, 22, 33, 44, 25};
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;
#define NUM_EMPLOYEE 10
int Age[NUM_EMPLOYEE];
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#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" );
while(low <= high)
{
mid = (low + high) / 2;
if (target < list[mid]) {
high = mid - 1;
}
else if (target > list[mid]) {
low = mid + 1;
for(i=0; i < N; i++)
{
for(j=0; j < N;j++)
{
statement;
}
}
for(i=0; i < N; i++)
{
some statement;
}
/*
we have to calculate the square of n
*/
return n*n;
/*
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
/* 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);
}