Day 1
- Syllabus
- Quiz
- Survey in email
- Lecture Topics
- source code, executable, compiler, editor, development environment
- values
- data types, variables (names include letters, underscores, digits but cannot begin with digits)
- assignment, operators, precedence
- programs, main, comments
- Example: Write a program to convert two miles to the equivalent number of feet (5280 feet in a mile).
- gcc -Wall -Werror -ansi -pedantic miles2feet.c -o m2f
- functions, parameters, return values
- Example: function that returns smallest of three parameters
- testing with checkit.h
- input/output
- printf: %d for int, %f for double, %c for char
- scanf: %d for int, %1f for double, %c for char
- miles2feet.c example
- add scanf to read number of miles
- Project 1 assigned in Blackboard
- Lab 1 assigned in Blackboard