1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
dezoksy [38]
3 years ago
11

Sptr is a pointer pointing to the beginning of an array called sarray. To access the value in sarray[3] by using the pointer, yo

u would use:a) *sptr[*3] b) *sptr+3 c) sptr +3 d) *(sptr + 3)
Computers and Technology
1 answer:
kupik [55]3 years ago
4 0

Answer:

The correct option for accessing the value in sarray[3] is : d) *(sptr+3)

Explanation:

a) *sptr[*3]  is wrong option because its syntax is not right it will give errors.

b) *sptr+3 is also wrong option because it will add 3 to the value of sarray[0].

c) sptr+3 is wrong option because it will only access the address of sarray[3] not the value it contains.

d) *(sptr +3) is correct syntax for accessing value in sarray[3] by using pointer

You might be interested in
Write a method that returns a version of the given array where all the 10's have been removed. The remaining elements should shi
Harlamova29_29 [7]

Answer:

The removeTens method is as follows

public static int[] removeTen(int[] nums) {

int [] arr = nums;

   int index = 0;

   while(index < arr.length && arr[index] != 10){

       index++;

   for(int j = index + 1; j < arr.length; j++) {

       if(arr[j] != 10) {

           arr[index] = arr[j];

           arr[j] = 10;

           index++;        }    }

   for( ; index < arr.length; index++){

       arr[index] = 0;}}

   return arr;

}

Explanation:

This defines the removeTens method; it receives array nums as its parameter

public static int[] removeTen(int[] nums) {

This creates and initializes a new array

int [] arr = nums;

This initializes index to 0

   int index = 0;

The following is repeated when array element is not 10 and if array index is still valid

   while(index < arr.length && arr[index] != 10){

This increments the index by 1

       index++;

This iterates through the array

   for(int j = index + 1; j < arr.length; j++) {

This checks if array element is not 10

       if(arr[j] != 10) {

If yes:

           arr[index] = arr[j];

The current array element is set to 10

           arr[j] = 10;

The index is incremented by 1        

  index++;        }    }

This iterates through the array again and move 0s to the back

   for( ; index < arr.length; index++){

       arr[index] = 0;}}

This returns the new array

  return arr;

}

8 0
3 years ago
A self-confident person knows that:
Ganezh [65]
It’s c for sure because it the only one making more since
3 0
3 years ago
Write a list comprehension statement to generate a list of all pairs of odd posi
egoroff_w [7]

Answer:

Print([(a,b) for a in range(10) for b in range(10) if (a < b and a%2 == 1 and b%2 == 1)])

Explanation:

Here, we declared a range of value for a and b using a for loop and the range function. The values are the first 10 numeric digits. The we used the if statement to establish our constraints;

In other to ensure that ;

Lower digit is written first ; (a < b) ;

Only odd numbers are considered,

a%2 == 1 ; b%2 == 1 (remainder when a and b are divided by 2 is 1.

Both a and b are declared as a tuple in other to obtain a pair of odd values.

7 0
3 years ago
When evaluating mining results, data mining and evaluating becomes
victus00 [196]

Answer:

Q. When evaluating mining results, does data mining and evaluating become an intuitive process?

“Data mining” is technically associated with analysis of very large data sets, to appreciate patterns,and attempt to look at cause to effect relationships. Most of the data is quantitative in nature, and many of the tools relate to that of analysis of numerical /quantitative data.

Explanation:

One of the rules of the game of quantitative analysis, is to allow the “data to do the talking”, Your intuition CANNOT replace the results of quantitative analysis: whether through data mining or humble pencil and paper calculation on the back of an envelope.

With experience you may perhaps see a lot of “counter intuitive results”, Where the final outcome does not make “common sense” - but that is what the data is saying.

It is useful NOT to allow emotions, opinions, to come in the way of any sort of quantitative data analysis.

If you can specify what sort of data you are analyzing a more precise answer can be attempted.

8 0
4 years ago
A _______ is a group of elements that you want to style in a particular way.
lora16 [44]

a id is a group of elements of that you want to style in a particular way

4 0
2 years ago
Read 2 more answers
Other questions:
  • Of the different IRT roles, the _______________ is head of the team and issues the ultimate call regarding how to respond to an
    15·1 answer
  • Janet is testing the effectiveness of four different plant foods. She plants four identical seeds in four identical pots, supply
    6·2 answers
  • Charli's password was changed a couple of weeks ago because someone figured it out. Can someone go to a password generator and f
    5·2 answers
  • For the questions below, consider a class called ChessPiece. This class has two instance data, String type and int player. The v
    13·1 answer
  • When compared to defender and analyzer firms, early adopters of new technologies tend to be?
    13·2 answers
  • Always follow the routine "clean up while in use and clean up before keeping it".
    6·1 answer
  • Also have a good day people !!
    5·2 answers
  • Can i have help for a ggogle class room
    14·1 answer
  • What java syntax allows me to take user input.
    11·1 answer
  • What should you do if an online friend asked to meet you after school? <br>ᵖˡˢˢˢˢ...​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!