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 can i make a program with this kind of output.. Enter a number: 5 0 01 012 0123 01234 012345 01234 0123 012 01 0
find largest element in array w/o using sorting techniques.
what is difference between overriding and overloading?
what is the output of the program and explain why?? #include<stdio.h> void main ( ) { int k=4,j=0: switch (k) { case 3; j=300; case 4: j=400: case 5: j=500; } printf (ā%d\nā,j); }
How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?
2 Answers Aricent, Manipal University,
struct node {struct node*temp,*new} prinf("%d",sizeof(struct node));
main() { float f1=10.5; double db1=10.5 if(f1==db1) printf("a"); else printf("b") }
how does the C compiler interpret the following two statements p=p+x; q=q+y; a. p=p+x; q=q+y b. p=p+xq=q+y c. p=p+xq; q=q+y d. p=p+x/q=q+y
Is boolean a datatype in c?
what is the use of c program?
4 Answers Synergy, Web Synergies,
What are directives in c?
we compile c program in 32 processor and 64 bit processor .exe file is created in both the processors. if we want to run .exe file in 64 bit processor which is created in 32 bit processor. is that .exe file is run or not if it is not run why?