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
Can you please explain the difference between malloc() and calloc() function?
What is cohesion in c?
What are variables c?
In a byte, what is the maximum decimal number that you can accommodate?
Explain modulus operator. What are the restrictions of a modulus operator?
Is c still relevant?
Explain what are header files and explain what are its uses in c programming?
c program to compute AREA under integral
Write a C program in Fibonacci series.
What is derived datatype in c?
Do you know what are the properties of union in c?
You are to write your own versions of strcpy() and strlen (). Call them mystrcpy() and mystrlen(). Write them first as code within main(), not as functions, then, convert them to functions. You will pass two arrays to the function in the case of mystrcpy(), the source and target array.
Explain the difference between malloc() and calloc() function?
What does malloc () calloc () realloc () free () do?
What is hash table in c?