Top "C89" questions

This tag is for questions regarding the international standard ISO 9899:1990, also known as "C89", "C90" or "ANSI C", with amendments and technical corrigenda (as opposed to K&R C, C99, C11 or later C standard revisions).

What is the behavior of integer division?

For example, int result; result = 125/100; or result = 43/100; Will result always be the floor of the division? What is the defined …

c math c99 c89 integer-division
Why should you use strncpy instead of strcpy?

Edit: I've added the source for the example. I came across this example: char source[MAX] = "123456789"; char source1[MAX] = "123456789"; char …

c buffer-overflow strcpy c89 strncpy
C: convert double to float, preserving decimal point precision

i wanted to convert double to float in C, but wanted to preserve the decimal point exactly as possible without …

c floating-point double c89
Variable declaration placement in C

I long thought that in C, all variables had to be declared at the beginning of the function. I know …

c declaration c89
What is the difference between C, C99, ANSI C and GNU C?

I have started programming practice on codechef and have been confused by the difference between C and C99. What does …

c gcc c99 c89 ansi-c
Where can one find the C89/C90 standards in PDF format?

I’m looking for a free copy version of the C89/C90 standard, but I can’t find it anywhere! …

c ansi c89
Is there any reason to use C instead of C++ for embedded development?

Question I have two compilers on my hardware C++ and C89 I'm thinking about using C++ with classes but without …

c++ c embedded c89
Warning: this decimal constant is unsigned only in ISO C90

Piece of code : long rangeVar = 0; rangeVar = atol(p_value); if (rangeVar >= -2147483648 && rangeVar <= 2147483647) On compiling I …

c compiler-construction long-integer iso c89
How to use make and compile as C99?

I'm trying to compile a linux kernel module using a Makefile: obj-m += main.o all: make -C /lib/modules/$(shell …

linux makefile c99 c89 kbuild
Using M_PI with C89 standard

I'm using C and trying to get access to the constant M_PI (3.14159...). I have imported the math.h header …

c math c89