The C Programming Language

1,106 views

Published on

A presentation I gave with a classmate on the C programming language. We covered the history and reasons development as well as some of the language specifics. This was for a Belmont Programming Languages class.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,106
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
59
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

The C Programming Language

  1. 1. The C Programming LanguageBryn Bodayle & Grant Yentzer
  2. 2. History of C1972 at BellLaboratoriesPrior to B, BCPL, andFORTRANUnison with UNIXoperating systemFinished in 1973The C ProgrammingLanguage
  3. 3. That which comes after BC
  4. 4. Advantages at the TimeSimilar syntax to BAdditions of structures and data-typesBlock structure, easily understandableAllows fine control of assembly language,access individual bits of informationPortability allowing for reuse of libraries
  5. 5. Advantages TodayTIOBE ranked as most popular languageabove Java & Objective-CBasis for other languages: transferable toother languagesStandardization and continued developmentUnderstand lower level mechanics i.e, arrays
  6. 6. int c = 4;int y = 0;char value;if(c > 3) {y = c;value = A;}else {c = y;c++;value = B;}return value;What languageis this?
  7. 7. C, C++, C#, JavaObjective-c
  8. 8. Assignment GotchasOrder of functions matterPointers and arrays can be confusingprintf("always specifying a linebreak is annoying n");Static scope, static typing, no scope resolutionoperator, no overloading, no exception handlingLeft to right function argument evaluation,short circuit evaluation, unions and structs
  9. 9. Dangling Elseint x = 1;if(x != 4)if(x == 3)printf("not reached");elseprintf("dangling else reachedbecause the else is automatically attachedto the innermost if statement n");
  10. 10. Unionsunion UnionThing{int i;char c;};...union UnionThing unionThing;unionThing.i = 30;unionThing.c = A;//prints out the value stored in the structprintf("%c n", unionThing.c);// output is "A"//only one value can be stored in a union at a time, so i isnot 30, it is 65 which is Aprintf("%i n", unionThing.i);// output is "65"
  11. 11. Why we chose C?

×