0% found this document useful (0 votes)
17 views12 pages

CS 101: Intro to C Programming

This document outlines the syllabus for a CS 101 course on problem solving and structured programming in C. The class will introduce students to computer hardware, software, programming, and algorithms. Assignments will include reading, homework, and writing simple programs in C like "Hello World". Students can expect to encounter errors as they write code, and debugging will be an important part of the class.

Uploaded by

adeleno
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views12 pages

CS 101: Intro to C Programming

This document outlines the syllabus for a CS 101 course on problem solving and structured programming in C. The class will introduce students to computer hardware, software, programming, and algorithms. Assignments will include reading, homework, and writing simple programs in C like "Hello World". Students can expect to encounter errors as they write code, and debugging will be an important part of the class.

Uploaded by

adeleno
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

CS 101

Problem Solving and Structured


Programming in C

Sami Rollins
srollins@[Link]
Fall 2004
Introduction
What is computer programming?
What is this class about?
Who should take this class?
Administrative Information

Class web page

[Link]
Assignments
Reading Chapter 1
Homework 0 due Monday
Computer Hardware
Main memory
Secondary memory
CPU
Input devices
Output devices
Computer Software
Operating system
Examples?

Applications
Examples?

How is a new application developed?


Computer Programs
At the lowest level machine instructions
00000111000
One step up assembly language
ADD A
More user friendly high level languages
C = A + B;
Examples?
Translation
High level language must be translated
into a language the computer can
understand

High-level Machine
Compiler
Code Instructions
Writing Programs
Understand requirements
Write an algorithm
Implement your algorithm
Test your code
What is an algorithm?
A specific set of instructions

An algorithm to make a PBJ sandwich?


Hello World
/*
* Name: Sami Rollins
* Source file name: hello.c
* My first "hello, world" program in C.
*/
#include <stdio.h>

//the main function


int main (void)
{
//print the phrase
printf("Hello, world!");

return(0);
}
Errors
You WILL have errors in your programs
Syntax Errors
Compiler doesnt understand code
Ex. printf(Hello, world!);
Sometimes error messages dont match problem
Logic
Program runs, but doesnt do what you want
Ex. printf(Hell, world!);
Can be hard to track down

You might also like