Looking at code on examples on StackOverflow I've noticed two distinct prototypes for object deallocation: struct foo *foo_create(int); void foo_free ...
Looking at code on examples on StackOverflow I've noticed two distinct prototypes for object deallocation: struct foo *foo_create(int); void foo_free ...
I have a struct that will contain some dynamic-allocated array. I have written the following code, and it works but I do not understand why it does w ...
I am putting together a project in C where I must pass around a variable length byte sequence, but I'm trying to limit malloc calls due to potentially ...
Inside m1, is map captured as value or as reference? PS this is only a simplistic example, m1 gets called on another thread sometimes throws a E ...
I'm reviewing data structures and came across something that I never realized when it comes to Linked Lists. This specific example is for Linked Lists ...
I need to reuse a dropdown widget, So I created a method. I am calling like this : buildDropDown("Blood Group", bloodGroups, _groupSelected), The me ...
I was writing a Fibonacci program in this way. The program runs but does not print anything. And I get the error like, [Warning] passing argument 2 ...
I am solving a coding question where we need to remove all the sub-trees of a binary tree that only has 0 as its value . Question link https://leetcod ...
I heard that small objects are passed in CPU registers on function calls. I tried to search the maximum of when this is not anymore the case. I know t ...
i made a C program implementing linked lists but it won't work... everything i implemented was taken from websites or stackoverflow and it seems to be ...
I want to make a CreatNode() function in C to be called by other functions. I am playing around with code trying to reach great readability and functi ...
The problem statement is: Given a Binary Tree, convert this binary tree to a Doubly Linked List. A Binary Tree (BT) is a data structure in which e ...
Let's say I got this code: Here's my question: since arguments are passed by value in JavaScript, does that mean, that after that point in code, wh ...
Use C++ template to know the length of C-style array, we need this: It works, prints 2. My question is about the syntax. In the declaration of len ...
Can someone explain this strange behaviour I am witnessing in PHP 8.1.6? I guess the behaviour is according to standards, I just don't understand it. ...
If I am passing the string reference in the function method then it is working fine, but if I am not passing it by reference then the test cases are f ...
I wrote a function to dynamic input a string in c but when i run the program and i write something whit more than about 15 char i get "corrupted size ...
I am learning C from the book by K.N.King and am going through the programming projects for chapter 17. I came across a self inflicted bug while I was ...
I have been reading up about pass by value vs pass by reference in javascript and I read that JavaScript always passes by value, only with non-primiti ...
I supposed to write a long explanation of the code but the explanation is already in the code below so I guess my question is: How do I get it to work ...