Description:
Discussion about C.
|
|
|
Why does write() to stdin work?
|
| |
Tried the following code under gcc and it writes to stdin??
...
int main()
{
int k;
for(k= 0; k < 4; k++)
write(k, "Hello world!\n", 13);
...
Any poiners?
-ishwar
|
|
Optimizing pow() function
|
| |
I have a simple (16-bit) embedded platform and I have to make the following calculations.
unsigned int
func(unsigned int adc, unsigned int pwr, unsigned int pt, double exp) {
return (unsigned int)(pow((double)adc, exp) * (double)pwr / pow((double)pt, exp));
...
I noticed this calculation takes too much time, most probably for pow() function call and double conversion.... more »
|
|
comp.lang.c
|
| |
...
...
That's normally supported via wchar_t. As has been pointed out elsewhere, in spite of the name, a "char" isn't necessarily a character. The semantics of "char" appear to be designed around the assumption that it's a byte, i.e. the hardware's unit of addressable memory. AFAICT, all general-purpose microprocessors use an 8-bit byte, and thus so... more »
|
|
Dear Human !!!!!!!!!!!!!!
|
| |
Dear Human!
The lecturer says at the beginning of the video, "I am talking to
you as a human; it does not matter whether you are Christian, Jew,
Buddhist or Hindu. It does not matter whether you are a worshipper of
idols, atheist, religious, secularist, a man or woman. I talk and
address you as a human. Have you ever stopped and asked yourself one... more »
|
|
short int always 16 bits or not?
|
| |
Hello. I am reading the C99 standard as available from: [link]
I note that it specifies (on p 34) macros defining the minimum and maximum values of a short int corresponding to a size of 16 bits. However it doesn't explicitly say that short int-s should be of 16 bits size. So can I trust short int-s to be 16 bits size or not?... more »
|
|
gcc 4.8 and SPEC benchmark
|
| |
Hi group,
with the 4.8 release gcc announces that it'll break some code of which
the correct compilation relied on UB:
[link]
Namely, the SPEC 2006 is broken in that revision. An explanation of the
assumptions that gcc makes is given here:
[link]... more »
|
|
graphic.h not found error
|
| |
hi
i am new in c programing i use gcc compiler and i have error graphic.h not found
how can i solve this.
|
|
Who can explain this bug?
|
| |
Platform: gcc 4.6.3 on AMD Athlon(tm) II X2 245 Processor on
Ubuntu 12.04
The bug I thought was due to a particularly hard to find memory access problem (see other thread I started today) seems to be even odder than that. It was tracked down to a particular conditional, which seems to optimize in such a way that the result is not always correct. (But... more »
|
|
|