4
votes
1answer
249 views

Why is the function called lseek(), not seek()?

The C function for seeking in a file is called lseek(). Why ins't it called just seek()?
4
votes
3answers
355 views

Rationale behind C library functions never setting errno to zero

The C standard mandates that no C standard library functions shall set errno to zero. Why exactly is this? I could understand it being useful for calling several functions, and only checking errno ...
15
votes
4answers
913 views

Is it necessary to follow the standard , take the C standard for that matter?

May be this question is a duplicate and I am a dumb to ask it here, but I searched a bit and none of the titles suggested to answer my question exactly . There are some very experienced folks on SO ...
2
votes
2answers
445 views

About ANSI C++ 2003 standard

I would like to ask for your help. I searched a lot on Internet, but I found mismatched informations. My questions: I tried to buy the "ISO/IEC 14882:2003(E) Programming Languages - C++" standard ...
8
votes
4answers
2k views

Is there any difference between return n and exit(n) in C?

Is there any difference between return n (in the main function) and exit(n) in C? Is it defined by C or POSIX standards or it depends on OS or compiler?
5
votes
6answers
845 views

why are both index[array] and array[index] valid in C?

For example consider: int index = 3; int array[4] = {0, 1, 2, 3}; then both index[array] and array[index] are valid expressions, much like *(index + array) and *(array + index). In C arrays why is ...
3
votes
7answers
862 views

Any standards for naming variables in for loops (instead of i,j,k) [duplicate]

Possible Duplicate: Why do most of us use 'i' as a loop counter variable? I was just writing a nested loop and got to the point where I was using l and m as variables to control for ...
2
votes
3answers
570 views

Should one avoid or be careful with C99 features in C code?

Some seem to say that one should avoid C99 features in C code as compilers don't really support those features. C99 is a standard from 1999, shouldn't these features be quite widespread now? Should ...
2
votes
4answers
1k views

C/C++: Who uses the logical operator macros from iso646.h and why? [closed]

There has been some debate at work about using the merits of using the alternative spellings for C/C++ logical operators in iso646.h: and && and_eq &= bitand & bitor ...
1
vote
3answers
311 views

Use of c89 in GNU software

In GNU coding standard it is said that free software developer should use C89 because C99 is not widespread yet. 1999 Standard C is not widespread yet, so please do not require its features in ...