What's the difference between struct x1 { ... }; and
typedef struct { ... } x2; ?
Answers were Sorted based on User's Feedback
Answer / vikraman85
In the first its simply structure,by declaring structure
variable accessors we can access those elements inside the
structure..
eg.struct x1 a,b,c;
In the next one the x2 acts as a datatype..
b'coz of the typedef function..
we can use x2 as datatype for the further calculations like
int,float which are predefined datatypes,but this is
manually defined datatype..
| Is This Answer Correct ? | 16 Yes | 3 No |
Answer / guest
The first structure is named by a tag, the second by a typedef
name.
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / esperto informatico
in theory, for my opiniol the difference is connected to
the use of memory.... the correct and easy answer it could
be that the first define a struct and a second define a
struct type.... =).....
| Is This Answer Correct ? | 0 Yes | 3 No |
What is Conio.h ?
is c language is a object oreinted language?
Tell me is null always defined as 0(zero)?
how will you write a program on linked lists using JAVA programming???????????
Print all the palindrome numbers.If a number is not palindrome make it one by attaching the reverse to it. eg:123 output:123321 (or) 12321
Explain what is the difference between null and nul?
What is the default value of local and global variables in c?
dennis ritchie invented C language in AT&T bell laboratory what is the extension of AT&T?
Are pointers really faster than arrays?
Why clrscr is used after variable declaration?
What is the value of c?
What is graph in c?