Both languages have similar origins so I'm wondering where this difference comes from.
-
4This is an unanswerable question. They're different design decisions by different language designers. Other languages use other notations. And IIRC, Pascal originally used an up arrow ↑ — it used `^` only because up arrows aren't available in ASCII. See, for example, [Programming in Pascal](https://books.google.com/books?id=XSvqr6FzNy4C&pg=PA442&lpg=PA442&dq=pascal+up+arrow&source=bl&ots=YpVquQE4Xw&sig=yAkZX3Em296GYOaDTANCOHGdUd4&hl=en&sa=X&ved=0ahUKEwjkkZWdvbHaAhWQFXwKHSQrClgQ6AEIWTAI#v=onepage&q=pascal%20up%20arrow&f=false) – Jonathan Leffler Apr 11 '18 at 05:19
-
That's entirely subject for speculation. Maybe K&R didn't like carets and didn't want to see them so often? Who knows. – StoryTeller - Unslander Monica Apr 11 '18 at 05:25
-
1Their origin could not possibly be more different. Pascal came out of European academia, major influence Algol, meant as a teaching language with little regard for practical use, strong typing a design goal. C came out of American business, major influence BCPL, meant to write practical programs, typing was added as an afterthought. Pretty doubtful that Dennis Ritchie and Niklaus Wirth ever talked to each other :) – Hans Passant Apr 11 '18 at 05:35
-
1C doesn't share any immediate lineage with Pascal. [Read for example here](https://stackoverflow.com/questions/46759733/why-are-the-dereference-and-the-address-of-operators-on-the-left). The predecessors of C *precede* Pascal. – Antti Haapala -- Слава Україні Apr 11 '18 at 06:11
-
C was a byproduct of creating an telephone OS in a HLL, which must have been pretty abstract as a concept in the beginning too. – Marco van de Voort Apr 12 '18 at 13:10
-
Simple answer: because C is C and Pascal is Pascal. Different languages use different constructs. Pascal programmers might ask why C programmers write all their code in comments. ;-) – Rudy Velthuis Apr 12 '18 at 15:39
1 Answers
The answer is because B uses *
to declare pointers. Here is a line from Wikipedia regarding the development of C:
However B's inability to take advantage of some of the PDP-11's features, notably byte addressability, led to C. The name of C was chosen simply as the next after B.
Here is the usage in B:
In the original language it was spelled rv, and later !, while B uses the unary *. Thus, if p is a cell containing the index of (or address of), or pointer to) another cell, *p refers to the contents of the pointed-to cell, either as a value in an expression or as the target of an assignment.
C is based on B, and a program written in B would be reasonably legible to a C programmer; because B is essentially a simpler version of C. The most notable difference between B and C is that B is a typeless language, that is, variables do not have explicit data types like character or integer. Or, rather, there is exactly one data type: the machine word, which is equivalent to C’s integer type ‘int’.
Here is difference in origin of C and Pascal from Wikipedia:
Both are descendants of the ALGOL language series.Pascal stems directly from ALGOL W, while it shared some new ideas with ALGOL 68. The C language is more indirectly related to ALGOL, originally through B, BCPL, and CPL, and later through ALGOL 68.
So, there is a difference in origin of C and Pascal, irrespective of what you said.

- 3,074
- 14
- 31
-
If you're going to quote Wikipedia, you should provide the links to the articles quoted. – lurker Apr 11 '18 at 12:23
-
-
Seems you forgot to add that link. It's inappropriate to use content from other sites without appropriate attribution, which includes the link to that content. – Ken White Apr 19 '18 at 12:41
-
edited the article including the link, thanks for pointing this out. sorry i forgot to include it! – Abhishek Keshri Apr 19 '18 at 19:24