Write a C program for Structure With Memory.

struct serial_s 
    int (*available)(void);
    int Serial_available(void) 
    return 42
Function Main
    struct serial_s Serial;
    Serial.available = Serial_available;
    Serial.available()

struct serial_s {
    int (*available)(void);
};
int Serial_available(void) {
    return 42;
}
int main() {
    //! showMemory()
    struct serial_s Serial;
    Serial.available = Serial_available;
    Serial.available();
    return 0;
}

 Note: No output, See Memory.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.