M
M
Marat Ganiev2020-03-14 22:12:08
JavaScript
Marat Ganiev, 2020-03-14 22:12:08

What does a pointer point to, a bit or a byte?

string* name = &line;
cout << line;


What does line point to, a bit or a byte? Or maybe even a kilobyte?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
0
0xD34F, 2019-08-13
@Katsimoto

final_data.reduce((acc1, num1) => acc1.reduce((acc2, num2) => acc2.concat(num1.map(num3 => [].concat(num2, num3))), []))

This looks really bad - acc2.concat should be replaced with acc2.push, there is no need to create a new array at each step (and, accordingly, copy all its elements), you can add new elements to an existing array:
final_data.reduce((acc1, num1) => {
  return acc1.reduce((acc2, num2) => {
    acc2.push(...num1.map(num3 => [...num2, ...num3]));
    return acc2;
  }, [])
})

V
Vitaly, 2020-03-15
@MaratWantsToKnowALot

What does line point to bit or byte? Or maybe even a kilobyte?

In your code, line is not even a pointer. Here name is just the address in memory where the line object of type string is located.
Just in case, a byte is the minimum addressable set of data. That is, you cannot address a bit from a byte.
I advise you to read something on the architecture and history of computers in parallel or before books on C ++. Something about operating systems also does not hurt.

S
Sergey Gornostaev, 2020-03-14
@sergey-gornostaev

In this case, an object of the string class. Which, by the way, is not in C.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question