CARVIEW |
Select Language
HTTP/2 200
date: Sat, 26 Jul 2025 08:55:58 GMT
content-type: text/html; charset=utf-8
cf-ray: 9652ae588c859ac4-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=85c72b01-1cf3-4fbe-8cd5-3c76e8a49f25; expires=Sun, 26 Jul 2026 08:55:57 GMT; domain=.stackexchange.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
x-clacks-overhead: GNU Terry Pratchett
x-frame-options: SAMEORIGIN
x-request-guid: 19684b77-7155-45f3-8616-80adc6e139f4
x-worker-origin-response-time: 534000000
x-dns-prefetch-control: off
set-cookie: prov=85c72b01-1cf3-4fbe-8cd5-3c76e8a49f25; Path=/; HttpOnly; Domain=stackexchange.com
set-cookie: __cf_bm=.SQAOBe3xDJ9bKt_Vbf3GcrV1aYmzj.KvIjz8Q1Ei4g-1753520158-1.0.1.1-VFxBu7u5rIQS16fSRwxFhCLnFLmF3xMlAtp8IqLGi7Q2N58uFRdo5aULsYIiHCVjdSZkXORG1futGTUUywQPrbsKSpk1hUIpBji1aAzCs08; path=/; expires=Sat, 26-Jul-25 09:25:58 GMT; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=rSJ_Zr1xitG.sOSJugplRM52a5OEciHYhI.qDuK0Ls0-1753520158088-0.0.1.1-604800000; path=/; domain=.stackexchange.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'c' Questions - Code Review Stack Exchange
Skip to main content
Stack Exchange Network
Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack ExchangeTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about TeamsQuestions tagged [c]
C is a general-purpose computer programming language used for operating systems, games, and other high performance work and is clearly distinct from C++. It was developed in 1972 by Dennis Ritchie for use with the Unix operating system.
4,086 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
11
votes
3
answers
1k
views
Parsing HTTP headers in C
I'm new to C and just finished K&R. This is a code that I've written to parse headers of a HTTP request.
I want to know if my code:
Is safe? (after all this is C)
Does proper exit on failure? Are ...
10
votes
6
answers
2k
views
k-Nearest Neighbors algorithm in C
I've been learning C for a while, and I decided to make a simple kNN program. What can I do to improve the program?
Am I doing memory management right? Can the structure of the code be improved in ...
3
votes
0
answers
40
views
library variant during application startup
I wrote some PoC for load library with best optimization version during application startup. The goal for it check in the _init function code checking by cpuid ...
7
votes
4
answers
1k
views
Rot13 encryption with extra functionality using unix flags
I just wanted to check out options/unix flags and read from stdio through pipe. Is it any good? Where should I improve or use something else? Feedback would be much appreciated.
...
7
votes
7
answers
2k
views
LinkedList data structure in C
Is my logic good? Are variable names fitting? Are there any memory leaks? Am I doing anything dangerous (this is C after all)?
Please feel free to criticize the code. I want to know if I'm writing C ...
9
votes
5
answers
2k
views
C method to determine whether a byte array is homogeneous
I engineered myself into a situation where I wanted to check whether a region of memory consists of identical bytes. I wanted to at least try to avoid the obvious solution of an O(n) loop, but also ...
2
votes
1
answer
172
views
Attempt at a Different Variation of the strstr(...) Function
I decided to work on an idea I had to 'optimize' the classic C function strstr.
Most of the implementations I had seen that did not make use of advanced ...
5
votes
4
answers
626
views
Single Consumer Single Producer Wait-Free Zero-Copy Circular Message Queue
The title describes pretty well what the algorithm is for. It will be used for a realtime inter-process communication library that only uses shared memory for exchanging data. For realtime systems, it'...
4
votes
0
answers
73
views
16x16 integer matrix transpose using SSE2 intrinsics in C
I was inspired by this and this to make a C function that would take an array of 16 __m128i, treat it as a matrix of 16x16 ...
2
votes
0
answers
87
views
compile time, but Not inlined function in C and C++
We have a graphics library for the Ti84CE, which uses the 24bit eZ80. It has a 16bit 1555 screen, so we have a gfx_Darken function that will darken a 16bit 1555 ...
7
votes
2
answers
978
views
Desperately seeking a hashing function
A recent CR exchange led me to dust off and adapt some code I'd written a few years ago. Long, long ago, when core meant ferro-magnetic memory cells, I spent an hour formulating a "simple" ...
5
votes
3
answers
1k
views
Arcane algorithm to find a keyword in a lookup table
This code is supposed to efficiently return the index+1 of a matching keyword from a lookup table of up to 31 keywords ...or 0 if the keyword is not found.
The line ...
4
votes
1
answer
500
views
Find a keyword in a lookup table
This code is supposed to efficiently return the index of a matching keyword from a lookup table or 0xF if the keyword is not found.
The line is a zero-terminated ...
2
votes
1
answer
85
views
Efficiently simulating a control sequence
I have a control problem that I am simulating in C. The premise is that I have some continuous-time signal s(t) and I am given some length-150 array ...
7
votes
3
answers
1k
views
Naive attempt at implementing a dictionary in C. Stack-based and O(n)
I am a C++ programmer trying to learn C.
Please critique my C code here. I am trying to make a small "hash table" that's \$O(n)\$ lookup. But, it is stack-based and so should be no slower ...
- The Overflow Blog
-
-
- Featured on Meta
-
-
Related Tags
beginner × 567
performance × 473
strings × 415
algorithm × 334
linked-list × 260
memory-management × 191
array × 183
programming-challenge × 157
linux × 140
io × 134
parsing × 133
reinventing-the-wheel × 131
file × 124
pointers × 114
sorting × 101
homework × 94
multithreading × 86
integer × 83
c++ × 82
formatting × 79
optimization × 79
game × 78
console × 77
bitwise × 73
hash-map × 73
more related tags
Hot Network Questions
- Can a minor run a business by having an adult act on their behalf?
- About security concerns using in find -exec vs interactively performing the same task
- Is a chemistry-first technological paradigm as plausible as one focused on physics or biology?
- Current integrator LTSpice simulation
- A question about as ..... as comparison
- Anonymizing a submission for double-blind review
- Most practical way to determine concentration of reducing sugar in frozen French fries?
- When did the OEIS get even better?
- What is the meaning of 'Tel.......,qui......'
- Why does “brew search” for “peertube” match with “freetube”? How does the search work?
- When was the last time all humans were on the ground not in the air?
- In Fantastic Four 2025 shouldn't this thing have taken years?
- About Bonferroni correction for adjusted Pearson residuals
- Why is time reversal not a natural part of the Galilean group?
- How many simple groups are there of a given infinite cardinality?
- Moving multiplying cells away
- Is the surface of Mars or the Moon mostly (or relatively) homogeneous, unlike the Earth?
- What does this word "ahn-shdah-heh" mean?
- Are classified documents subject to a subpoena in discovery?
- Is it decidable whether a CFL can be recognized by a linear CFG?
- Can a humanoid that fell supine and is then Levitated alter his orientation?
- Did the first sin in the garden of Eden actually take place before the fruit was eaten?
- Did Denmark report that 64% Palestinian refugees from 1992 received serious fines or jail time?
- Which workflow is more effective: worldbuilding before plotting or the other way around?