Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

159
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda