Showing posts with label array. Show all posts
Showing posts with label array. Show all posts
Sunday, November 25, 2012
Program fifo and lru page replacement algorithm | Operating System
By Unknown
Sunday, November 25, 2012
array, c program, fifo, first in first out, for loop, functions, Least Recently Used, lru, operating system, structure
No comments
Monday, September 17, 2012
Stack implementation in c++ code using array | Data Structure
By Unknown
Stack implementation in c++ code using array | Data Structure
This program is the demonstration for implementing Simple Stack Program using array and Object Oriented Concept with basic functions of Stack push() and pop() with index called top which gives the current status of Stack! Stack has defined size so need two more function to check whether isEmpty() or isFull() to check stack is empty or not or is full or not. In this scenario top is integer type as default to top=-1,if top=-1 Mean Stack is Empty , if top=sizeOfStack-1 then stack is full.Thursday, September 13, 2012
Find element in array and its repetition in one dimensional Array C program
By Unknown
Find element in array and its repetition in one dimensional Array C program
Program to accept elements in array then take input from user to find that element and its repetition in Single Dimensional ArraySunday, September 2, 2012
Find Maximum Number in array in C program
By Unknown
Find Maximum Number in array in C program
This program to find the maximum number in 1 Dimensional array. Accept number then compare it with previous maximum if true then replace it with new one as simple as that
/* Program to Find Maximum No in array */
#include<stdio.h>
int main()
{
int a[100],n,i,max=0;
printf("enter the no.:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
printf("enter the value of %d no.:",i);
scanf("%d",&a[i]);
if(max<a[i])
max=a[i];
}
printf("\nThe max is %d\n",max);
return 0;
}





