Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
Is there any documentation for pre-K&R c?

I was playing around with an online PDP11 emulator (link) and was looking at the programming section of its FAQ.

It says this about programming in C on the emulator:

You need to write pre-K&R C which is quite a bit different from modern C

I believe this is referring to the version of C in use before the publication of The C Programming Language. I have tried to understand this version by reading the sparse C files I can find in the emulator's filesystem, but even simple things like declaring argc and argv have eluded me. I also can't find anything about it online.

Is there any documentation, written at the time or after the fact, on "pre-K&R" C?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

For this sort of question, my go-to source is the archived web page of the late Dennis Ritchie:

https://www.bell-labs.com/usr/dmr/www/

From there it's one click to this early reference manual for C, written by Ritchie himself:

https://www.bell-labs.com/usr/dmr/www/cman.pdf

This is indeed "pre-K&R C", featuring anachronisms such as =+ instead of +=.

This is the same reference manual that appeared, in updated form, as Appendix A in the K&R book.

On the same page are links to several other versions of that reference manual, as well as notes about and even the source code of two early versions of Ritchie's compiler. These are pretty fun to look at, although as the page notes, "You won't be able to compile them with today's compilers".

There's a whole Stack Exchange site dedicated to questions like these: https://retrocomputing.stackexchange.com/.

over 4 years ago · Santiago Trujillo Report

0

Steve Summit answered about where to get the documentation. So this post is intended to summarize noticeable differences from modern C

Types for function arguments were quite different. They were not specified within the parenthesis

void foo(a, b)
    int a; 
    float b;
{
    // Function body
}

No row comments, like //. Only /* */

No logical or and and. The operators && and || did not exist. The bitwise operators & and | were used instead.

=- meant the same as -=, which lead to ambiguity with for instance x=-1.

There was no void pointers. char pointers were used instead.

One could not declare variables in the for header, so one had to write:

int i=0; 
for(i=0; i<N; ++i)

= were only used for assignments and not initialization. Those were done like this: int x 3;

Implicit int. This is still valid in modern C. The difference is that no (sane) programmer is using it anymore. This:

foo 3;

is actually equivalent to

int foo = 3;

There was no const qualifier

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!