python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Why does a printf statement in a for loop seem to depend on an unrelated previous printf outside that loop?
I was playing around in C to implement the "sieve of Eratosthenes" for finding primes. I came up with the following code:
#include <stdio.h>
#include <stdlib.h>
void strike_mult...

Schnitte
Votes: 0
Answers: 1
Understanding UB and pointer-arithmetic
I have a generic reference-counted heap-allocated wrapper class. So my class is basically just a pointer:
template <typename T>
class Refcounted {
struct model {
std::atomic<std:...
Ben
Votes: 0
Answers: 0
Remove all digits from array
Write a function remove_digits that receives two arrays of type int. The first array contains a number of integers, and the second array is an array of digits. It is necessary to remove all digits fro...

user18498266
Votes: 0
Answers: 1
Insert numbers to array
I need to insert for every number sum of his digits in array using pointer arithmetic. Auxiliary arrays are not allowed.
Example:
123, 456, 789
Output:
123, 6, 456, 15, 789, 24
Code:
#include <st...

user18498266
Votes: 0
Answers: 1