Questions to determine if you're ready for the Introduction to C++ Programming course.

Are YOU Ready?

  1. What is the strcpy() function used for?

  2. Why is a strcpy() function even necessary in the first place?

  3. What are the errors in the following program when compiled with an ANSI C compiler?

    There are (at least!) 6 syntactic errors, 2 semantic errors, and 1 logic error.

        #include <stdio.h>;
        #include <string.h>;
        int main();
    	float PI = 3.1415926;
    	int radius_increment = 1;
    	puts("This program prints the area of circles from size 1" to 5".");
    	int radius;
    	for (radius=1; radius < 5; radius += radius_increment);
    	    printf("Circle of radius %d is %d\n",
    		radius * radius * PI);
    	return 0;

  4. Assuming no optimization by the compiler, where is the memory for PI and radius_increment from the above example allocated from?

    1. the text section,
    2. the data section,
    3. the stack section, or
    4. the heap space?

  5. What is the difference between char *buffer; and char buffer[512];?

  6. Estimate how much space each of the above will require: ____________    ____________

  7. In general terms, what is a linked list?

How did you do?

If you were able to answer most or all of the above questions, you very likely are ready for the C++ course. The primary issue is syntax. Where do the braces go? Where does the semicolon go? When is the semicolon left off? How can you distinguish a function prototype from a function definition?