python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
The output is null, instead of the expected indices of the matching values
int* twoSum(int* nums, int numsSize, int target, int* returnSize){
returnSize = malloc(2*sizeof(int));
int i, j;
if(returnSize == NULL)
{
printf("error");
}
...
user17974062
Votes: 0
Answers: 1
dereferencing function pointer to function returning void throws error: void value not ignored as it ought to be
I am a beginner in C language. Read various SO threads on function pointers. For instance, How does dereferencing of a function pointer happen, Function Pointer - Automatic Dereferencing [duplicate], ...
Singh
Votes: 0
Answers: 1
warning: return from incompatible pointer type [-Wincompatible-pointer-types]|
I am trying to return an array from the function pointer, the code work but shows a warning in C that "incompatible pointer type". I want to return an array and it is already dynamic allocat...

Raihan_Alam
Votes: 0
Answers: 4
Why We Couldn't Create Pointer To Friend Functions Defined In A Class?
struct A
{
friend void f();
};
void f() {}
We could define a pointer to the f():
using FType = void(*)();
FType ptr_to_f = f;
But if we move the definition of the f() into the A, then we couldn't...

Ghasem Ramezani
Votes: 0
Answers: 0