Intro to Programming with C II

Programming with C II was taught by the same teacher as Intro to C, Professor James Sears.

The course was meant to build off the material, and go into further concepts like Structures, Strings, Pointers, the Preprocessor, Formatted I/O and File I/O.

  • printf("Please enter your first name: ");
  • scanf("%s", first_name);
  • while ((c = getchar() !='\n') && c !=EOF);
  • printf("Hi, %s, nice to meet you!\n", first_name);

Assignment #1

Write an ANSI C program that determines the minimum grade, maximum grade, median grade and average of a class. Your program should first prompt for class name, and then how many grades(at least 2), then each of the grades. Once all grades are entered, your program should calculate the minimum grade, maximum grade, and average, and median. It will then print the grades listed in descending order.

Assignment #2

Write a C program that determines the commission average for each of up to 20 sales agents, then prints out a payroll summary report. We were given two specific struts to work with and formatting for how the printout should look.

Assignment #3

Write a C program that takes data given and a report is printed. The program must use pointer notation and pointer math for all arrays (i.e. no array index rotation other than in the declaration section, and no pointer offset).

Assignment #4

Write a C program that takes the dictionary program provided by your instructor and add some features to it. These features must include a function to print out the contents of the dictionary, a function to add a word and definition to the dictionary, and a sort function to rebuild the dictionary when new words are added.

Assignment #5

Write a program that takes data from a file and loads a structure of up to 50 items. You'll want the program to read the data from the file and store it in an array. Your report will output to both the screen and a text file. You'll also give the user a menu to choose a sort method and use the supplied structs from your instructor.