strcpy() function used for?
strcpy() function even necessary in the first place?
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 sq.in.\n",
radius,
radius * radius * PI);
}
return 0;
}
PI and radius_increment from the above
example allocated from?
char *buffer; and
char buffer[512];?
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?