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 |
Tell about strtok & strstr functions
2 Answers HCL, iFlex, Motorola,
Write a program in C to convert date displayed in gregorian to julian date
Explain how are portions of a program disabled in demo versions?
What is your stream meaning?
how to find that no is int or float?
What is indirection in c?
Differentiate between a for loop and a while loop? What are it uses?
Write a code of a general series where the next element is the sum of last k terms.
Write any data structure program (stack implementation)
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
whitch value return void main?
how to devloped c lenguege?