Skip to main content
0 votes
0 answers
56 views

I mean that i is incremented by 1 right, then how does ptr + i equals ith block of memory since int size is 4? int i, n; printf("Enter the number of Integers: "); scanf("%d&...
0x0pralad0x0's user avatar
1 vote
0 answers
83 views

I am trying to learn C, and I want to specifically work with arrays and matrices as I do scientific simulations (coming from python!!). After writing few basic 1-D array codes in C, I am going for ...
Sayantan4796's user avatar
3 votes
4 answers
149 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
1 answer
121 views

I'm trying to write a queue that will store strings. Using GDB I can tell that I make a memory allocation error in the function resizeQueue. Here's the exact message: Program received signal SIGTRAP, ...
user31051859's user avatar
1 vote
1 answer
73 views

I am planning to make a Linear Regression model using C. It takes a set of m points as input from stdin using scanf. The points are defined as a struct: typedef struct{ double x; double y; } ...
Nirav Pandey's user avatar
0 votes
0 answers
103 views

Consider the following excerpt from Prometheus source code: func (ls Labels) String() string { var bytea [1024]byte // On stack to avoid memory allocation while building the output. b := bytes....
vtm11's user avatar
  • 409
1 vote
1 answer
91 views

I have a parent struct that has an array of child structs and the length of it, and within each child struct is an array of numbers and the length of it. all of the arrays are defined using pointers ...
Sterticc's user avatar
-1 votes
1 answer
139 views

I am trying to solve LeetCode 2487: Remove Nodes From Linked List, and I’ve implemented a solution in C++ that first reverses the list, then removes nodes that have a greater value node to their left (...
notSukuna's user avatar

15 30 50 per page
1
2 3 4 5
279