Re: Arrays/Literal Notation

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Well, that's a pretty good way of ensuring that no-one will help you with
your homework. Congratulations. I hope the foot gets better soon.

Just for your info, in case you should ever post to a newsgroup again
seeking help with homework, you should ensure that you do the following:

* State clearly that you are looking for help with homework
* Explain what research you have carried out, what you have already tried
and what the results were.
* Assure the group that answers will be credited to the group or individual
giving the advice and that you will not try to pass off other people's work
as your own.

That's what I did when studying for my MSc recently. I got lots of help and
I was as good as my word in terms of crediting other people when they had
helped me out. I even posted my answers so that people could check it out
for themselves. This also got me a commendation from my tutor.

Oh! and finally. Remember that students can be dismissed for plagiarism,
and that professors also read newsgroups.



Peter


"AA2e72E" <AA2e72E@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:83F12FCB-887C-490E-B1DA-7465D30703B2@xxxxxxxxxxxxxxxx
Learn to read before jumping to prescribe.

My note says that I know the rank (number of dimensions) is 3; I go on to
tell you that the dimensions are 3,1,4. The question was how would I
modify
the right hand side (RHS) such that the rank stayed as 3 but he dimensions
were 3,2,4 i.e how would I increase the second dimension to 1.

The second question was whether the RHS was a 'literal ' notation.

If you did not know, or cannot be bothered to understand what is written,
why do't you simply choose not to respond? Your answer adds nothing.

PS: I had bothered to research my own answers but came with nothing; hence
the post.


"Barry Kelly" wrote:

AA2e72E wrote:

int[, ,] array = { { { 1, 2, 3, 3 }}, { { 7, -1, 9, 0 } }, { { -1, 0,
7, 8 }
} }; // 3D

In the line of code above, am I using 'literal' syntax/notation to
create
the array?

The rank of the array is 3, its dimensions are 3,1,4.

Hint: count '3' '1' '4'. It's equal to 3.

Another hint:
* What is there 4 of in the top example?
* Given that you've gotten what there's 4 of, what is there only one of,
for its given level of nesting?
* Can you spot what there's 3 of now?

How would I change the code to produce

a. an array of dimension 3,2,4?
b. an array of rank 4?

Do you own homework - it's not hard!

-- Barry

--
http://barrkel.blogspot.com/



.



Relevant Pages

  • Re: Arrays/Literal Notation
    ... In the line of code above, am I using 'literal' syntax/notation to create ... The rank of the array is 3, its dimensions are 3,1,4. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Help: declare an array without knowing the rank and size
    ... I need to readout those numbers to get the rank and extent of the ... array I want to declar. ... dimension data is at least a fixed number of dimensions, ... you can declare a "deferred shape array" of this rank. ...
    (comp.lang.fortran)
  • Re: array.Rank doesnt seem to work with string arrays ????
    ... The rank (number of dimensions) of the Array. ... Since this array is one-dimensional, ... "Devlin's First Law - Buyer beware: in the hands of a charlatan, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Arrays/Literal Notation
    ... In the line of code above, am I using 'literal' syntax/notation to create ... The rank of the array is 3, its dimensions are 3,1,4. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Date Help..!!!Urgent
    ... And don't ask us to do your homework. ... then set an another array, which contains other details along with the ...  For instance, his first night is 2008-12-16, and last is ... overlap and changing prices) that contain the cost for each day. ...
    (comp.lang.php)