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
modify existing char* or create a tmp char*?
Some languages, like Java, require you to create another string in order to solve certain kinds of problems. But when it comes to C, when should you create another string and when should you simply mo...
Felipe 杨睿
Votes: 0
Answers: 2
Accessing elements in a 2D array in C
I am writing a program that passes a 2D char array into a function for printing. However, when I try to access elements in the 2D array for printing, I can't. This problem does not occur when I place ...
ncc1701e
Votes: 0
Answers: 1
How to return char 2D array double pointer in C
#include<stdio.h>
#define MAX_LEN 20
char *swap_elements(char **arr, int i)
{
char temp[5];
*temp = *arr;
*arr = *(arr+i);
*(arr+i) = *temp;
return arr;
}
void main()
{
...
Mayuresh Kulkarni
Votes: 0
Answers: 2