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 |
Why do u use # before include in a C Progam?
Do you know what is a programing language ?
#define f(g,h) g##h main O int i=0 int var=100 ; print f ("%d"f(var,10));} wat would be the output??
How to write a multi-statement macro?
write a function that accepts an array A with n elements and array B with n-1 elements. Find the missing one in array B,with an optimized manner?
WHAT IS FLOAT?
What are the 5 types of organizational structures?
a character or group of characters that defines a register,or a part of storage a) memory b) byte c) address d) linear list
what is the use of getch() function in C program.. difference b/w getch() and getche()??
29 Answers HCL, IBM, Infosys, TCS, Wipro,
Write program to remove duplicate in an array?
What does != Mean in c?
A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM