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
How to increment "char *" inside a function without returning it?
I have something like this (simplified):
void count(char *fmt)
{
while (*fmt != 'i')
{
fmt++;
}
printf("%c %p\n", *fmt, fmt);
}
int main(void)
{
char *a = "...
MiguelP
Votes: 0
Answers: 1
A design question about Go's map and slice troubled me a lot
Why does Go's slice has 'replication trap', but map does not?
Suppose we have a function that takes slice as an input parameter, and if slice is expanded in the function, only the copied slice structu...
qizong007
Votes: 0
Answers: 2
Changing the value of an element in a struct
I'm new to structs. I am trying to write a program that has a struct, and the struct is supposed to store a character array and its length. I want to be able change the length's value as I would be cr...
lazearoundallday
Votes: 0
Answers: 3