C/C++ Programming 2
Ray Mitchell
Assignment Schedule And Information

At each meeting the assignment that is due will be collected and solutions will be distributed.  All assignments will be graded and returned at the next meeting.  Turn in partial work for partial credit.  Provide a self-addressed stamped envelope if you want the last assignment in the course returned.

ALL ASSIGNMENTS ARE ONE PERSON PROJECTS

1.

Getting occasional suggestions or explanations from others is encouraged.

2.

Working together with anyone on any part of any assignment is PROHIBITED and will result in a score of 0 for the entire assignment.

3.

Submitting work that is not exclusively your own or that you have shared with others is PROHIBITED and will result in a score of 0 for the entire assignment.

 

Be sure to examine ALL of the following links before doing any assignments:

May I Turn Assignments In Late? Assignment Submission Requirements
How Do I Create A Program? Using The Automated Assignment Checker
Debugging Programs and Getting Instructor Help Differences Between C And C++ Programs

 

Topic Coverage and Assignment Schedule
Total Course Grade (Assignments 2-8) = Programs(100%)
A>=85%, B>=65%, C>=50%, F<50%

Click here for hints of dubious worth for some exercises.

>>> SAVE TIME - DOWNLOAD ALL NEEDED FILES AT ONCE BY CLICKING HERE <<<

 


May I email Assignments?
If you cannot make it to class, click here for alternatives.

********************************

Microsoft Compiler users:

If you get warning C4996 when compiling a C program file, place the following preprocessor directive at the top of that file or define it in the project settings:
      #define _CRT_SECURE_NO_WARNINGS
If you get it in a C++ program file, you have done something wrong in that file.
 

This Meeting

"Advanced C/C++ Notes" Topics This Meeting


Assignment Due This Meeting
 

1

Section 0 - "Computer Number Systems"
Notes:  11.1 - 11.9
Notes:  18.1 - 18.9
none

2

Notes:  12.1 - 12.6 

Asg1
(Will not be collected or graded.)
 
3 Notes:  13.1 - 13.16 >> Assignment Submission Requirements <<
Asg2 Ex1   Asg2 Ex2   Asg2 Ex3   Asg2 Ex4
 
4 Notes:  13.17 - 13.27 >> Assignment Submission Requirements <<
Asg3 Ex1   Asg3 Ex2   Asg3 Ex3   Asg3 Ex4
 
5 Notes:  14.1 - 15.2 >> Assignment Submission Requirements <<
Asg4 Ex1   Asg4 Ex2   Asg4 Ex3
 
6 Notes:  15.3 - 15.13 >> Assignment Submission Requirements <<
Asg5 Ex1   Asg5 Ex2   Asg5 Ex3
 
7 Notes:  15.14 - 16.7 >> Assignment Submission Requirements <<
Asg6 Ex1   Asg6 Ex2   Asg6 Ex3   Asg6 Ex4
 
8 Notes:  16.8 - 17.3 >> Assignment Submission Requirements <<
Asg7 Ex1   Asg7 Ex2   Asg7 Ex3   Asg7 Ex4
 

9

Notes:  17.4 - 17.15

>> Assignment Submission Requirements <<
Asg8 Ex1   Asg8 Ex2
 

Test Files (required for some assignments)
TestFile1.txt    TestFile2.txt    TestFile3.txt    TestFile4.bin    TestFile5.txt    TestFile6.txt
mFile1.txt    mFile2.txt    mFile3.txt (empty)    mFile4.txt    mFile5.txt

 

What is a "C Program"?          What is a "C++ Program"?

Many exercises say to, "write a C program" or, "write a C++ program".  Virtually all ANSI C functions and constructs will compile and execute properly in a C++ environment but, because C++ was designed to be "a better C", alternatives to many of those deemed "unsafe" have been implemented in C++.  Only the C++ alternatives should be used in a C++ program.  On the other hand, no C++ forms may be used in a C program.  For the C++ concepts covered in this course use the following guidelines when writing your programs:

Some characteristics of  a "C Program"

Some characteristics of  a "C++ Program"

Source code files typically have  .c  extensions while header files typically have  .h  extensions.

Source code files never have  .c  extensions but instead typically have extensions of  .cpp, .cxx, .C, etc.  Header files typically have no extension.

void pointers and functions that use them or have a variable number of arguments are fine.

void pointers or functions that use them or have a variable number of arguments are not normally used.

Use the stdio family of functions for stream I/O, for example scanf, printf, getchar, putchar, fgets, fputs, fread, fwrite, etc. .

Use the iostream and ...fstream family of objects/methods/operators for stream I/O, for example cin, cout, cerr, get, getline, put, write, etc.

Use  malloc, calloc, realloc, and free for dynamic memory operations.

Use new, new[], delete, and delete[] for dynamic memory operations.

Use /*...*/ for comments.

Use // for comments.

Use the keyword void to designate an empty parameter list:
int main(void)
Omit the keyword void to designate an empty parameter list:
int main()