Homework - Differences in Access to Values
So I had to write a program in Pascal (bubble sort, it was pretty easy) and at the end my professor asked a question about our code. He made us write two separate printing procedures. The first printArray took an Array of Integer as a parameter, where printArray2 took a type called arrayType, which is defined as such:
TYPE arrayType = ARRAY[1..20] OF INTEGER;
Now I'm a little upset, but his question is, "What's the difference in how the values are available when using different printing procedures?"
Just wondering if anyone can give me a hint. My original thought was that it has to do with how memory locations are accessed, but I don't know how to put it right.
Well, I hope one of you wonderful people can help me.
source to share
I assume your teacher introduced you to the concepts of pass by value and pass by reference. I believe you are a teacher trying to get you to think about these concepts as it relates to primitive array declaration and your own array declaration. This should at least give you a hint of your homework.
source to share