Given the following piece of code:
typedef struct {
char name[10];
char surname[10];
float score;
float ve[10];
} student;
Suppose that your system is a 64-bit machine, and float variables occupy 32 bits. Assume that both the variable and the array ve have been initialized, even if the corresponding code is not shown. Answer the following questions:
A) What is the memory occupation in bytes of the variable?
B) What is the memory occupation in bytes of the array ve?
C) Are the following lines of code correct? Say yes or no. In case the answer is no, briefly say why.
student ve;
ve.ve += 2;
3 = -ve.ve;
A) What is the memory occupation in bytes of the variable?
B) What is the memory occupation in bytes of the array ve?
C) Are the following lines of code correct? Say yes or no. In case the answer is no, briefly say why.
3++;
geve.ve;
ve.ve += 2;
ve.c;