python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
NEWBIE: passing a pointer to a function
I'm trying to relearn C from dabbling with it about 5 year ago. Specifically, I'm trying to learn how to extract a number of operations from main and make them into a function, with the aim of moving ...
Kevin Zembower
Votes: 0
Answers: 3
Javascript is it bad practice to return an object that is passed by reference
Let's say I have this function in JavaScript:
function foo(a) {
a.item = "four"
return a
}
b = {
item: "three"
}
b = foo(b)
console.log(b)
Since JavaScript is a call-by-sharing langua...
bcsta
Votes: 0
Answers: 2
clarification for pointers in c language
this is a snippet from my code. I'm wondering if the pointers I'm using and the way I'm using them is valid. The code works but I need more clarification on how they work.
Here's the code:
void swapVa...
User617290653251457439
Votes: 0
Answers: 1
How can I call the following void function with double parameters?
This is what I have currently, and I have no idea what to do to make it run:
void avg_sum(double a[], int n, double *avg, double *sum) {
int i;
*sum = 0.0;
for (i = 0; i < n; i++)
...
halolol
Votes: 0
Answers: 2