Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
80 views

I am trying to sort the values in the Data array into Column arrays X1,X2, and Y_actual. The code I have written out makes sense to me, and returns the correct array1,array2, and array3 values if I ...
Jackatoe's user avatar
-1 votes
1 answer
100 views

Although I've learned and worked with many advanced languages, but today when I was refreshing my C skills this old question again striked me. When we talk about pointers in C, simple pointers are ...
Shashvat Gupta's user avatar
2 votes
0 answers
121 views

I have this PHP code: $array = [1, 2, 3]; $counter = 0; foreach($array as &$elem){ test(); $counter++; if($counter >= 10){ return; } } function test(){ global $...
Anorionil's user avatar
  • 505
0 votes
0 answers
50 views

EDIT: Pasting portion of code that is giving me this issue. Although in my effort to cleanup some of the comments before pasting it here I ended up with a different error. Still happens in the same ...
user20259078's user avatar
0 votes
2 answers
213 views

Given a pointer-to-array in C, can we malloc to it enough memory for extra elements (beyond the specified array size) and then safely access those elements using either the [] operator or pointer ...
Jackson Allan's user avatar
1 vote
0 answers
45 views

I was going through array using pointers and I found two different dynamic allocation methods of an array int *ptr_arr=new int[10]; This one was defined in the lectures but when I explored a bit I ...
Priyanshu's user avatar
1 vote
1 answer
218 views

As a newbie, I'm solving a problem from K&R's pointers chapter and was confused with some aspects of character pointers, and passing an array of type char* as a function parameter. Char array ...
UKS's user avatar
  • 13
0 votes
1 answer
69 views

i have this main and 2 more functions each on different file /*decleration of the functions on one file*/ typedef double *mat[4][4]; void catcher(void *,mat *); void findMat(mat *,char *,int *); int ...
Roy Shiff's user avatar
1 vote
1 answer
60 views

I am trying to work with threads in C. I need one of my threads to work on one half of a whole array, and mergesort its half. To do this I created a global array pointer for the whole array and both ...
R. Row's user avatar
  • 19
0 votes
1 answer
68 views

I am doing convolution operation for image. I have a problem in data stored in array pointer dynamically. The data in one of the array pointer variable is getting changed automatically after fopen ...
shabarish pr's user avatar
1 vote
3 answers
100 views

I am having troubles with the following code: int a[] = {1, 2, 3, 4}; fprintf(stdout, "a : %lu\n" "*a : %d\n" "&a : %ld\n" ...
anbocode's user avatar