HW38
COP-3223H
Submit via webcourses.
Using only your mind and/or pencil and paper (do not compile and run the program) Write a program that uses malloc to initialize a 12-element array of struct player structs called ptr:
- What does the type declaration look for pointer to a
struct player. - What does the
malloccall and assignment to the look like
#include <stdio.h>
struct player {
int x;
int y;
};
int main() {
// write your declaration of ptr here
// write your assignment to ptr and call to malloc here
}