Question about Operating Systems

2 Answers

Arrays i am currently a student in programming,at the moment i am dealing with arrays,i would like to know how to declare,initialize,store,retrieve and display elements from an array

Posted by on

  • JazzyE Jul 04, 2008

    Arrays in java

  • ABRsvcs May 11, 2010

    What language?



    Dan

×

2 Answers

You can

Posted on Jul 04, 2008


You

Posted on Jul 04, 2008


Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

Define a character array and use strcpy() to copy a string into it. Print the string out by using a loop with a pointer to print out one character at a time. Initialize the pointer to the first element and...


Nice, computer science homework.
int main () { char str[]="this is my string";
//print our string forwards int i = 0; while(str[i]!="\0") { putchar( str[i] ); i++; }
//newline putchar('\n');
//print our string backwards int length = strlen(str); while(length--) { putchar( str[length] ); } }
I didn't test this to make sure it worked, but this is the general way of doing this. It looks like your professor wants you to use pointers. I used pointers here. Do you know how? Arrays are pointers with some syntactic sugar.
I wouldn't rely on sites like this to get answers to your homework. Even if you get the right answer, there's always the possibility of your CS professor finding this answer online and then making your future homework ten times harder.

Mar 01, 2011 | Operating Systems

1 Answer

How to install norton all in one security using only the product key


Norton computer programs require installation to attain functionality. For example complete version requires installation to attain the feature functions as product codes that allow accessibilty to the entire arrays.

Feb 20, 2011 | Symantec Corporation Norton 360 Version 40...

1 Answer

What are the arguments uses by c language and types of arguments


The arguments that are passed to a c program are argc and argv, they are passed to main as:
int main ( int argc, char **argv )
argc is a number which holds how many arguments were passed.
argv is an array of arrays which holds the text values of each of the arguments passed to the program.

For example to get the first argument passed to the program you can access it as argv[1] and treat it just as you would treat any char *. Note that argv[0] always contains the name of the program and is not counted in argc.


Hope this helps, and thank you for using FixYa.

Chartreuse,

Jan 28, 2011 | Operating Systems

1 Answer

Why do we need to declare variables?


Hi,
I'm assuming you are referring to declaring variables in Procedural programming languages such as Java. Variables need to be declared for several different reasons, some of which include helping the computer reserve space in memory for variables to be stored and it also plays a part in the various stages of converting the source code, i.e. the code that you type in VB or Java, into machine code which is a series of binary digits that the computer can actually understand. It helps the computer in debugging the code for errors. In the first stage of code conversion, lexical analysis, information about the variable names is stored. In the next stage, Syntax analysis, the code is checked to be grammatically correct according to the rules of Backus Naur Form, i.e. if a key word such as PRINT is typed in as PLINT the computer will treat this as a variable name and since no information about this variable name has been entered in the lexical analysis stage it knows that an error has been made.
Hope this helps!

Dec 11, 2010 | Operating Systems

1 Answer

Says that a uncaught exception:java lang.nullpoinereException


suppose you have declared a array of 5 ( ie 0-4 ) and you are entering the value for 6 or we can say more than 5 then you will receive this error and also you have not declared the catch block or exception block for this exception to handle the error .

Oct 04, 2010 | Operating Systems

2 Answers

Merging two arrays and sort them


NEED A NEW KEY THE ONE ON THE BOX WONT WORK

Jul 29, 2009 | Microsoft Windows XP Professional With...

1 Answer

Array


I'm going to guess that your question is about hard disk arrays

There are several uses for arrays and there are different level of arrays

Here is a link detailing the levels and uses for hard disk arrays:

http://en.wikipedia.org/wiki/RAID_1#RAID_1

Jan 31, 2009 | Operating Systems

1 Answer

To merge two arrays A and B in java source code.


Do you need them to be sorted after the merge and are they already sorted? If not, then what you can do is create a temporary third array which will set the half of third array equal to the first array, and then set the set half equal to the second array. If they need to be sorted, I can help too but you need to tell me

public class ArrayMerge
{
public static int arr1[] = new int [20];
public static int arr2[] = new int [20];

public static void main()
{
setScores(arr1);
setScores(arr2);
printScores(arr1);
printScores(arr2);
printScores(merger(arr1,arr2));
}

public static void setScores(int a[])
{
for(int x = 0; x<a.length; x++)
{
a[x]= (int)(Math.random() * 100)+1;
}
}

public static void printScores(int a[])
{
for(int x = 0; x<a.length; x++)
{
System.out.print(a[x] + " ");
}
System.out.println();
}

public static int[] merger(int a1[], int a2[])
{
int a3[] = new int [(a1.length + a2.length)];

for(int x = 0; x<a1.length; x++)
{
a3[x]=a1[x];
}

for(int x = 0; x<a2.length; x++)
{
a3[x+a2.length]=a2[x];
}
return a3;
}
}

Jan 24, 2009 | Microsoft Windows XP Professional With...

1 Answer

Re-Synching problem with RAID5 Arrays in windows 2003 server


I beleave RAID5 needs all 3 disks to be present and maybe even on the same channels as they where set up for really id depends on the capability of your software or hard card. Good Luck!

Thank you,
Rel

May 21, 2008 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

51 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18297 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...