Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
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.
6
votes
Accepted
Number converter between bases
In your call to sprintf, you are unnecessarily using the %c format with a 0 parameter, perhaps in an attempt to ensure that the resulting string is nul-terminated. … Also (if you fix the above comment about %c and therefore make it the correct length), a future modification to change the message may cause the result to be longer than what can be held in tmp. …
15
votes
Accepted
strcat implementation
The most obvious is that although this matches the prototype of the standard strcat function, it works very differently. The standard strcat function does not allocate memory.
You do not account for …
5
votes
*Code for fake UI
(char nodes[], int FOREGROUND, int BACKGROUND)
Your function does not modify nodes so it should be declared const (const char nodes[]).
Normally, all-uppercase identifiers are used for macros, not …
3
votes
NULL-eating / elimination version of fgets() in C
NULL is not a char. NULL is a pointer and should not be used when a char is needed. Use '\0' or 0x00.
The temporary buffer that you malloc is not needed. You can read directly into Buf and clean it o …
4
votes
Accepted
SPOJ problem - The last digit of a number to a power
As you have probably noticed, this is not efficient because you have a loop running exponent times (which could be over 2 billion). The way to make this more efficient is not to make your code faster, …
10
votes
Simple webserver in C
I've declared it as const char *, which is the type of a literal string (assuming you're using a reasonably modern C compiler). (I notice that you're not using any const at all. …