這些時間可以拿去做更多有意義的事情。
作業題目:
Please see below code and answer questions
#include <stdio.h>
void main()
{
int arr[]={1,2,3,4,5};
int *ptr=arr;
*(ptr++)+=1;
}
(1) What is the result of *ptr?
(2) What is the result of *(++ptr)?
(3) What is the result of arr array?
Ans:
---------------
Please fill in the blank.
a:
b:
c:
d:
public a class Dimensions
{
public const double pi = Math.PI;
protected double x, y;
public Dimensions(double x, double y)
{
this.x = x;
this.y = y;
}
public b double Area()
{
return x * y;
}
}
public class Sphere : Dimensions
{
public Sphere(double r)
: c (r, 0)
{
}
public d double Area()
{
return 4 * pi * x * x;
}
}