Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »

Welcome to Software Development on Codidact!

Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.

Posts by Lundin‭

143 posts
80%
+6 −0
Q&A Are static pointers implicitly initialized to NULL?

Yes, it is guaranteed to evaluate to true. All variables with static storage duration are set to zero in case of arithmetic types or set to null in case they are pointers. The relevant part is C17 ...

posted 2y ago by Lundin‭

Answer
84%
+9 −0
Q&A How to properly use malloc?

Should we cast the result of malloc? The cast to the intended type is not necessary in C, since during assignment, the void* returned by malloc can be implicitly converted to any other object poin...

posted 2y ago by Lundin‭  ·  edited 9mo ago by Lundin‭

Answer
75%
+4 −0
Meta A cleanup of "What type of questions can I ask here?"

What type of questions can I ask here? has gotten rather cluttered since we have added/removed a lot of things along the way. In particular, I think it is hard to get an idea of what's on-topic by ...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 2y ago by klutt‭

Question discussion scope
75%
+4 −0
Meta Should we allow UI/UX questions in our community?

I think it should be on-topic with the following distinction: On-topic Technical questions regarding to UI, including mark-up language syntax, how to set properties in RAD tools, how to use gra...

posted 2y ago by Lundin‭

Answer
71%
+3 −0
Q&A Why object-oriented instead of class-oriented?

As with anything computer science-related that dates back to the 1960s and 70s, things just happened at a whim. Everything was new and highly experimental back then. Nobody knew how to write or des...

posted 2y ago by Lundin‭

Answer
60%
+7 −4
Q&A Are there references in C?

Yes there are references and pass-by-reference in C, though the language has no explicit syntax item called "reference" like C++. In a C context, it is irrelevant that C++ happens to have something...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
84%
+9 −0
Q&A Are there references in C?

When reading posts at programming sites such as this one, I frequently encounter people saying things like: "There is no pass-by-reference in C, everything is passed by value." People claiming su...

3 answers  ·  posted 2y ago by Lundin‭  ·  last activity 11mo ago by Alexei‭

71%
+3 −0
Q&A Question regarding an error message in my compiler to do with my code on linked list.

To use the identifier Node without typing struct Node, you must use a typedef: typedef struct Node{ // this here is a stuct tag int data; struct Node* next; // this has to be struct Node...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
84%
+9 −0
Meta How do I search for "i++"?

I once wrote this post here: Why can't we mix increment operators like i++ with other operators? When using Codidact search looking for that post, I tried to type i++ in the search but it didn't l...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 2y ago by ArtOfCode‭

Question support searching
66%
+2 −0
Meta How to best ask about algorithmic problems

This question was of very poor quality and should have been closed. I closed it but someone disagreed, for reasons unknown. I'm not sure if it's an actual algorithm question or just a request for f...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
71%
+3 −0
Meta Community feedback: What type of questions can I ask here?

I propose that we add the following: Off-topic Questions about code golf, programming puzzles and challenges. Please use Code Golf instead.

posted 2y ago by Lundin‭

Answer
86%
+11 −0
Q&A Behavior of Pointer Arithmetic on the Stack

Generally speaking, pointer arithmetic is undefined behavior unless carried out on arrays. This is how the additive operators behave, C17 6.5.6: For the purposes of these operators, a pointer to...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
80%
+6 −0
Q&A Why does fopen return NULL?

The simple explanation would be that you simply don't have write access to the path, which is one possibility. Another weird phenomenon that may happen is that you are running a very old C...

posted 2y ago by Lundin‭

Answer
66%
+2 −0
Q&A What does the greater than 0 indicate in the case of this statement 'if (compare(A[j], A[j+1]) > 0)' ? Thank you.

Generally speaking, comparison callback functions in C are often implemented to return an integer lesser than zero, equal to zero or greater than zero - depending on if the first object is lesser t...

posted 2y ago by Lundin‭

Answer
86%
+11 −0
Q&A What does the static keyword do in C?

Storage class specifiers static is strictly speaking a storage class specifier, which is an attribute given to a variable or a function stating how it is allocated, how it is accessible and how lo...

posted 2y ago by Lundin‭  ·  edited 12mo ago by Lundin‭

Answer
87%
+12 −0
Q&A What does the static keyword do in C?

What exactly does the static keyword do in C? I have seen it used in several diverse contexts: 1) As a variable outside a function: #include <stdio.h> static int x = 5; int main (void) ...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 12mo ago by Lundin‭

77%
+15 −3
Meta Questions easily answered by studying a beginner-level book

This scenario is not yet a problem for this site, but we will get there, since it's a huge problem for Stack Overflow: Someone just picks up a well-known programming language for the first time. T...

6 answers  ·  posted 2y ago by Lundin‭  ·  last activity 10mo ago by Karl Knechtel‭

Question discussion on-topic
80%
+6 −0
Q&A Common string handling pitfalls in C programming

The reader is assumed to understand how arrays and pointers work in C. You cannot understand pointers before you understand arrays, and you cannot understand strings before you understand pointers ...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
77%
+5 −0
Q&A Common string handling pitfalls in C programming

Preface: This is a self-answered Q&A meant as a C string handling FAQ. It will ask several question at once which isn't ideal, but they are all closely related and I'd rather not fragment the p...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 2y ago by Lundin‭

77%
+5 −0
Meta Are general questions (hopefully resulting in comprehensive, 'canonical' answers) in scope

Generally these questions are fine, though they should come with specific examples, so that they become clearer and can get narrowed-down. I've done a lot of self-answered Q&A here and the hard...

posted 2y ago by Lundin‭

Answer
81%
+11 −1
Meta Should we allow questions about installation and configuration of software development tools?

Generally, I would say: On-topic How to install, configure, trouble-shoot and use tools specifically meant for software development. Compilers, debuggers, IDEs and so on. Asking questions rega...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
77%
+5 −0
Meta Is this a good fit for Code Reviews, and if so, how to best post it?

400 lines is not that big, it should be fine to post the complete program below the Code Reviews post category. I'd post it as separate code formatted blocks with one block per file indeed. A revi...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
71%
+3 −0
Q&A Are there practical reasons for designing a method-only class/object?

Many languages support the concept of functors or function objects which are classes only containing a method/member function. Most notably C++ STL was designed around this - whenever you declare ...

posted 2y ago by Lundin‭  ·  edited 2y ago by Lundin‭

Answer
90%
+16 −0
Q&A How to do private encapsulation in C?

The concept you are looking for is referred to as opaque type or opaque pointers. This is the proper method to achieve private encapsulation in C and can also be used for inheritance/polymorphism (...

posted 2y ago by Lundin‭  ·  edited 1y ago by Lundin‭

Answer
86%
+11 −0
Q&A How to do private encapsulation in C?

I'm using an object-oriented design for my C project and trying to implement classes with private encapsulation. How do I do this? Some things I've tried that are problematic: Using a struct f...

1 answer  ·  posted 2y ago by Lundin‭  ·  last activity 1y ago by Lundin‭