Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



How can I implement opaque (abstract) data types in C? What's the difference between these two..

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

How can I implement opaque (abstract) data types in C? What's the difference between these two..

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

Post New Answer

More C Interview Questions

How to write a program to receive an integer & find its octal equivalent by using for loop?

1 Answers   Google,


how to write a program which adds two numbers without using semicolon in c

2 Answers  


What are variables and it what way is it different from constants?

0 Answers  


plz answer..... a program that reads non-negative integer and computes and prints its factorial

2 Answers  


how to find turn around time in operating system?

3 Answers  


Magic square

0 Answers  


What are register variables in c?

0 Answers  


how many error occurs in C language ?

22 Answers   Infosys, Wipro,


what is the difference between i++ and ++i?

5 Answers  


What is difference between array and structure in c?

0 Answers  


What are the different flags in C? And how they are useful? And give example for each in different consequences?

1 Answers  


How do you write a program which produces its own source code as its output?

4 Answers  


Categories