Like Tree1Likes
  • 1 Post By Salem

struct and extern

This is a discussion on struct and extern within the C Programming forums, part of the General Programming Boards category; hello, typedef struct __test { int x; } TEST; extern TEST t; Is this the valid statement?, If so, what ...

  1. #1
    Registered User
    Join Date
    Apr 2011
    Posts
    8

    Cool struct and extern

    hello,

    typedef struct __test
    {
    int x;
    } TEST;

    extern TEST t;

    Is this the valid statement?, If so, what is the linkage the variable 't' is going to keep?

    Regards,
    JGtech.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,489
    > Is this the valid statement?
    Did you try? I think it is valid.

    > If so, what is the linkage the variable 't' is going to keep?
    Go on, make a guess - let's see if you're right.
    CommonTater likes this.
    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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Extern Struct from .h file not finding elements
    By Fillis52 in forum C Programming
    Replies: 5
    Last Post: 11-19-2010, 06:27 AM
  2. cannot compile with extern struct
    By jeanluca in forum C Programming
    Replies: 4
    Last Post: 06-08-2009, 02:51 AM
  3. extern struct
    By beginner.c in forum C Programming
    Replies: 10
    Last Post: 07-01-2007, 07:43 PM
  4. Replies: 17
    Last Post: 12-15-2006, 10:02 AM
  5. extern struct...
    By Supar in forum C++ Programming
    Replies: 7
    Last Post: 01-07-2003, 01:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21