Thread: I need help

  1. #1
    Registered User
    Join Date
    Oct 2017

    Post I need help

    1)Make a program in C that defines a struct type of BALL (typedef) name, containing a "Color" (which can be black or white) and a pointing field for the BALL type named "AP-prox". Create also a name "FIRST" for the BALL type. Then book an area of memory card to the "FIRST" pointer and initialize it with the black "Color" and AP-prox pointing to NULL. Then reserve a BOLA memory area with a new name pointer "SECOND" that will point to this area, initialize it with white color and AP-prox pointing to NULL. Make the AP-prox pointer field of the pointer "FIRST" point to the "SECOND" pointer. Create another pointer for the BALL type, named "THIRD" and reserve a memory area for it, initializing the "Color" field with the black value and the field "AP-prox" pointing to NULL. Make the value of the AP-prox field of the pointer "SECOND" point to the "THIRD" pointer.
    Last edited by dry; 10-05-2017 at 11:40 PM.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    How To Ask Questions The Smart Way

    So you've posted your assignment, but we've no idea what your current 'C' skill level is (however poor).

    Show us what you've managed to figure out for yourself, and then we can help you get over the next hurdle.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Tags for this Thread