As of May 31, 2023, we have updated our Code of Conduct.
3 votes
Accepted

Conditional assignment of array

Let's consider this: case 0: my_array[] = {DATA HERE}; exec_func(myarray); This is not quite valid C++, but let's pretend you get the syntax right to make it work. The problem is: doing this ...
Edgar Bonet's user avatar
  • 40.2k
3 votes

Why does Serial.print(1) cost 228 bytes more program memory compared to Serial.print((char)(48+1))?

The difference is simply this: Print this character and Interpret this integer as a sequence of digits, work out the ASCII characters that represent each digit in turn, and print them. As you can ...
Majenko's user avatar
  • 104k
2 votes
Accepted

How to make the compiler ensure that local variables memory allocation won't cause any RAM overflow during execution?

You are describing "memory profiling" and is not typically a feature of C or C++. It is more common in higher level languages, such as Java, but C is a considered a much lower level ...
Majenko's user avatar
  • 104k

Only top scored, non community-wiki answers of a minimum length are eligible