Computer Science 433
Programming Languages

Fall 2012, The College of Saint Rose

Lecture 3: C and Unix
Date: Wednesday, September 5, 2012


Lecture Assignment 3

Due at the start of class, Monday, September 10.

Please submit answers to these questions either as a hard copy (typeset or handwritten are OK) or by email to terescoj AT by the start of class. Please use a clear subject line when submitting by email (e.g., CSC 433 Lecture Assignment 3, Joe Student). We will discuss these questions at the start of class, so no late submissions are accepted.

  1. (5 points) You have likely seen Java applications that take command-line parameters (the String args[] parameter to main). Write a C program that takes an arbitrary number of command-line parameters, each of which should represent an integer value. Print out the sum of the values provided. Call your C program argadder.c.

    Some things to know:

  2. (10 points) Write a C program that reads in an integer (which must be at least 2) from the keyboard, then computes and prints out its prime factorization.