class MyStack implements Stack
{
private String a[]=new String[10];
private int top=0;
public void push(String value)
{
a[top]=value;
top++;
}
public String pop()
{
top--;
return a[top];
}
public int length()
{
return top;
}
public void print()
{
for(int i=0;i<top;i++)
System.out.println(a[i]);
}
}
public class StackOperations
{
public static void main(String args[])
{
MyStack ms = new MyStack();
ms.push("silpa");
ms.push("arti");
ms.print();
System.out.print("popped element is ");
System.out.println(ms.pop());
System.out.print("Now stack is with: ");
ms.print();
}
}
Wright a 'C' program for storage representation of 2-D array.
Full representation of an array begins from the index 0 and ends at n-1 where n is the number of variables of the array.
There are no array operations in C. Arrays implicitly convert to pointers, thus any operation you might attempt upon an array you would actually perform on a pointer.
find even number in array
I need an example of a real-world array
Wright a 'C' program for storage representation of 2-D array.
Full representation of an array begins from the index 0 and ends at n-1 where n is the number of variables of the array.
A stack can be implemented as an array or a list. If an array, simply push the new element onto the end of the array. If a list, point the new node at the head node then make the new node the new head of the list.
Here are some: Create an array Destroy it Access an element of it
False
What is its size? How is its size determined and when (compile/run-time). What does the software using the array do when the array is empty? partially full? full? Avoid the software addressing elements of the array which are undefined, or addressing elements outside the bounds of the array When and who is responsible for allocating and freeing memory when the array is no longer needed (program or called procedure start/termination) or some other time determined during program execution. If the array is implementing a data structure such as a stack, queue, dequeue, list, etc. What is its implementation of the usual data structure operations, Create, Empty, List Items, Top, First, Last, Next, etc.
yes
cod a program student degree array in c language
When a significant number of values must be tested to perform an operation, an array is more efficient then "if else" or "switch case" statements. Juge by the following example in C: const char* ConverteIntegerToCStr( unsigned int number, char cstr[] ) { // predefined array with the first 10000 number string representation // Note: the ellipsis is not part of the code static const Array[10000] = { "0", "1", "2", ..., "9998", "9999" }; if (number < 10000) memcpy( cstr, Array[number], strlen( Array[number] ) ); // very fast else itoa( number, cstr ); // standard C function that is much slower return cstr; }
RAID stands for a redundant array of independent disks. Thus, a group of two or more hard disks comprise a RAID, or array of physically separate drives.
A program which is used to count the number of numbers in an array using a 8085 microprocessor is known as a assembly language program.
A group of hard drives assembled into a RAID array is often referred to as, well, a "RAID array" a "RAID stack" or a "RAID cluster."