Skip to main content
Advice
0 votes
3 replies
96 views

I'm in C and I have an int ** (2 dimensional array, it's basically a matrix, it's actually set up a little bit complicated but there's no internal aliasing, so it's not relevant). is this int** ...
Snark's user avatar
  • 1,674
0 votes
3 answers
216 views

I have just encountered a case in this C program: void row_del(int**& a, int& row, int col, int k) { for (int j = 0; j < col; j++) { for (int i = k; i < row - 1; i++) { ...
hacklo's user avatar
  • 17
3 votes
4 answers
150 views

I have a small project (ed-like text editor for myself. Just want to edit some config files using it) and I have some problems with it. workspace_file->flc = malloc(sizeof(char *)); ...
Ho1Ai's user avatar
  • 39
1 vote
3 answers
235 views

I have been reading something related to C language's double pointers, and I have some doubts about the following piece of code. The following piece of code is about the operation of deleting a node ...
user3034702's user avatar
0 votes
3 answers
131 views

In trying to understand pointers, I created a M[x][y] array, a pointer to said array *p_M[x] and a pointer to said pointer **d_p_M. The first pointer points to the first element of a row in the array ...
pasty guacamole's user avatar
2 votes
3 answers
164 views

I have the following variable char* a[2][2] = {{"123", "456"}, {"234", "567"}}; I wanted to refer it using another variable. While the cast works, accessing ...
5reep4thy's user avatar
0 votes
0 answers
65 views

Why not double pointer to take an array? I'm having a bit of problem understanding why an array isn't passed as a double pointer (a pointer to a pointer) since the array name itself is a pointer (...
Hannibal.Br's user avatar
0 votes
4 answers
119 views

When i pass a pointer to a function and then change the pointer to a another location of the memory, I get SIGSEV or garbage values. Where is a code to demonstrate that: #include <stdio.h> void ...
Mubin Muhammad's user avatar
2 votes
2 answers
133 views

I wanted to try making an allocate function for a cell in a list, but when using it inside another functions, I need to add an "&" sign I am aware of what "&" means in c (...
nada 's user avatar
  • 33
0 votes
2 answers
87 views

I wrote a small demo program #include <stdlib.h> #include <stdio.h> typedef struct tag_node { struct tag_node *left, *right, *prev; int value; } node; int main() { node *...
Fyodor's user avatar
  • 185
1 vote
0 answers
82 views

I have to interact with a provided C library where one of the functions is declared as follows: int GetFileList(struct spiflash_file **ptr_spiflash_filelist, int **file_num); where **...
Marcomattia Mocellin's user avatar
1 vote
2 answers
72 views

I'm trying to use realloc in this program to increase an array's size, using pointer to pointer. But it doesn't end up doing the task: #include <stdio.h> void push(int** data) { *data = (...
Javad's user avatar
  • 13
1 vote
1 answer
258 views

I'm trying to write a trim function, but when I try to use it the compiler is giving me a runtime error or load of null pointer of type 'char' when I try to run this code: // Trim trailing whitespace ...
Debuholden's user avatar
2 votes
1 answer
126 views

I am new to C++ programming and want to try out manual memory management (I am aware that it is advised not to use manual memory management, but I still want to give it a try). My goal was to write a ...
Markus's user avatar
  • 23
-3 votes
2 answers
129 views

I am sending this message to clear my confusion that I could not manage and handle. The foo1 function code should work. I am giving the code details for you. When I run the code, the result is a ...
synapsis's user avatar

15 30 50 per page
1
2 3 4 5
17