How can I implement opaque (abstract) data types in C?
What's the difference between these two declarations?
struct x1 { ... };
typedef struct { ... } x2;
Answers were Sorted based on User's Feedback
Answer / phani kumar s
using the structures and the pointers
n structures the memory will be allocated for each object at
different locations struct x1 { ... };
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / pankaj
Abstract data type in C can be implemented using structures :
struct abstract;
typedef struct abstract abstract_type;
Note that this didn't define the struct abstract fully, only an opaque struct. sizeof() can be used on it. Memory can be allocated by using some macros and typecasted into this type.
| Is This Answer Correct ? | 0 Yes | 1 No |
How to write a program to receive an integer & find its octal equivalent by using for loop?
how to write a program which adds two numbers without using semicolon in c
What are variables and it what way is it different from constants?
plz answer..... a program that reads non-negative integer and computes and prints its factorial
how to find turn around time in operating system?
Magic square
What are register variables in c?
how many error occurs in C language ?
what is the difference between i++ and ++i?
What is difference between array and structure in c?
What are the different flags in C? And how they are useful? And give example for each in different consequences?
How do you write a program which produces its own source code as its output?