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.

Activity for klutt‭

Type On... Excerpt Status Date
Comment Post #278837 @CharlieBrumbaugh‭ Yes it is. Those are pretty common in C where exceptions would be used instead in C++ and Java. Feel free to rewrite it as an answer.
(more)
about 4 years ago
Edit Post #278837 Post edited:
about 4 years ago
Edit Post #278837 Initial revision about 4 years ago
Question Counting number of assignments that a `fscanf` format strings implies
I'm writing a function that counts the number of assignments for a `fscanf` format string. I studied the documentation in C standard 7.21.6.2 It looks like it works. It passes all test cases I have written and yields no warnings with `-Wall -Wextra -pedantic -std=c17`. While I appreciate design ad...
(more)
about 4 years ago
Comment Post #277217 You were assuming right. I have edited the question, so you might want to remove that part.
(more)
over 4 years ago
Comment Post #277375 The general answer to "Will X make Y faster?" is "Try it and measure"
(more)
over 4 years ago
Comment Post #277331 @chris-barry You're correct. That was just a typo that i missed several times. Question is corrected with a `&`. Sorry for any inconvenience.
(more)
over 4 years ago
Edit Post #277215 Post edited:
over 4 years ago
Edit Post #277215 Post edited:
over 4 years ago
Comment Post #277331 Are you saying that my code would not compile because it's not in a function? I just did not include that code, but the question is changed now.
(more)
over 4 years ago
Edit Post #277266 Post edited:
over 4 years ago
Edit Post #277266 Post edited:
over 4 years ago
Edit Post #277266 Initial revision over 4 years ago
Answer A: Should I cast to (void) when I do not use the return value
This is a bit opinionated, but personally, I would not do it. It would just clutter the code and could hide sources of bugs. But it depends a lot on what function it is. It's also hard to give a very general answer to this. In many cases, the proper answer is "No, you should instead use the retur...
(more)
over 4 years ago
Comment Post #277215 @kami Nope, that line is exactly as it should be.
(more)
over 4 years ago
Comment Post #277215 @olinlathrop Except that `arr[10]` is legal to point at, but not `arr[11]` ;) I mostly posted this question to get this site going.
(more)
over 4 years ago
Edit Post #277215 Initial revision over 4 years ago
Question Is it undefined behaviour to just make a pointer point outside boundaries of an array without dereferencing it?
I have heard that it is undefined behaviour to make a pointer point outside boundaries of an array even without dereferencing it. Can that really be true? Consider this code: int main(void) { char arr[10]; char ptr = &arr[-1]; char c = ptr; } The line `...
(more)
over 4 years ago