What's the difference between struct x1 { ... }; and
typedef struct { ... } x2; ?
Answer Posted / 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 |
Post New Answer View All Answers
How variables are declared in c?
What is the explanation for prototype function in c?
What are the types of macro formats?
How can I find out how much free space is available on disk?
Write a program to print factorial of given number without using recursion?
5 Write an Algorithm to find the maximum and minimum items in a set of ‘n’ element.
Why do we use return in c?
Write a program of prime number using recursion.
In C programming, what command or code can be used to determine if a number of odd or even?
What is variable declaration and definition in c?
What is use of #include in c?
How does free() know explain how much memory to release?
Tell me the use of bit field in c language?
Is r written in c?
Explain the meaning of keyword 'extern' in a function declaration.