• Register
0 votes
58 views

Problem:

Can any one help me in array programming?
 
What happen when an individual element of an array is passed to a method?
7 5 3
5,380 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution:

The correct answer for 

When an individual element of an array is passed to a method: is 

the method does not have direct access to the original array.

This will help you.

8 5 2
10,530 points

Related questions

0 votes
1 answer 23 views
0 votes
1 answer 16 views
16 views
Problem: Hi there! I am a new learner. I want to know how I can find the position of an element given by the user in an array. I tried some programs but could get the logic. The element, whose position is to be found, will be taken as input from the ... has to choose any element of that array. Can anybody here help me understand the logic of the program? Example program will be a plus. Thanks!
asked Jan 2 Code Learner 5.5k points
0 votes
1 answer 15 views
15 views
I have managed to do this: when I enter 7 numbers from 1 to 7 it works for me, but when I enter larger numbers it does not work for me .. why? Here is the code that I have done so far .. I would appreciate your help .. The question I have is: in which part ... cout << "Sort by Ascending Exchange:" << std :: endl; printArray (temporaryArrangement, sizeArray); std :: cout << std :: endl; return 0; }
asked Aug 15, 2020 game 4.6k points
1 vote
1 answer 31 views
31 views
Problem : I am very new to programming. I have recently started learning C programming. Please find below the one way of initializing the array: I have one doubt about my above program : Which of the following is not a correct way to initialize an array? int n[ 5 ] = { 0, 7, 0, 3, 8, 2 }; int m[3] = ... [1] 15};     printf("m[0] = %d  m[1] = %d   m[2] = %d\n", m[0], m[1], m[2]);     return 0; }
asked Apr 27, 2020 stewart 4k points
1 vote
1 answer 26 views
26 views
Problem: I was doing my coding practice of python using numpy. I wrote this code: def create_traini_data(): trainingday_data = [1100] for img in tqdm(os.listdir(TRAIN_DIR)): label = label_img(img) path = os.path.join(TRAIN_DIR, img) training_data.append([ ... = create_traini_data() traini = traini_data[:-400] It throws error: ValueError: setting an array element with a sequence Can anybody help?
asked Apr 3, 2020 LizzyM 6.1k points
0 votes
1 answer 12 views
12 views
I noticed that in the loop of STATEMENT 1 we put (* p ++) and supposedly this represents that it is going to loop through an element of the array. But I start to think that the logical thing would be that if my pointer is starting at position [0]; in the loop of DECLARATION 1 I would start saving it in position ... position" << i << ":"; cin >> * p;         * p ++;     } * /          return 0; }
asked Aug 14, 2020 game 4.6k points
0 votes
1 answer 10 views
10 views
My program consists of a menu that has: To register. Unsubscribe. Modify. To show. Leave. And the Person class with its constructors and methods. The Person class is something like this: Class Persona { private: char * dni; char * fullname; int age; public: Person (char ... is entered in the array but it doesn't work either. I hope you have understood me more or less and thank you very much!
asked Aug 17, 2020 game 4.6k points
0 votes
1 answer 19 views
19 views
Problem: Given a list ["foo", "bar", "baz"] and an item in the list "bar", how do I get its index (1) in Python? list.index(x[, start[, end]]) Return zero-based index in the list of the first item whose value is equal to x. Raises a ValueError if there is no such item.
asked Jan 10 Mashhoodch 5.7k points
0 votes
1 answer 8 views
8 views
Problem: How to get most occurring element in an array. It is working well but the only problem is when there are two or more elements having the same number of occurrence? and equal to most occurring element, it just shows the first element scanned. solve this anyone.
asked Dec 23, 2020 Mashhoodch 5.7k points
0 votes
1 answer 67 views
67 views
Problem: Hello Kodlogs, I&rsquo;ve come again with another question. All of your knowledge about programming and friendly attitude made me in love with you. Today I was practicing some operations applying on Python lists. I wondered if I can find the index of a ... it possible to find an element&rsquo;s index in Python? If possible, please share the tip. Thanks again for your valuable time.
asked Jul 10, 2020 adamSw 11.3k points