If you are using C language to implement the heterogeneous
linked list, what pointer type will you use?
Answers were Sorted based on User's Feedback
Answer / knowledge
A void pointer...as it can be type casted to point to any
data type.
Is This Answer Correct ? | 25 Yes | 4 No |
Answer / rpr
In linked list a 'pointer' points to the next node which is written in a 'structure'. so we will use "struct node" as pointer data type.
struct node
{
void data; // void can be used here for heterogenous data
struct node *ptr;
};
Is This Answer Correct ? | 7 Yes | 5 No |
Answer / ajay vikram
The heterogeneous linked list contains different data types in its nodes and we need a link, pointer to connect them. It is not possible to use ordinary pointers for this. So we go for void pointer. Void pointer is capable of storing pointer to any type as it is a generic pointer type.
Is This Answer Correct ? | 0 Yes | 0 No |
i want to know details about SBI bank exam and date when to apply and what is the eligibility and the model papers related to it and various post available for Engineering in Information Technology.
What is the difference between while & do while loop
i possess a little knowledge of core java . so is it will be difficult for me to start advanced java?
in intel 8086 why is the segment register content appended by zero to generate physical address?
what do you mean by CPU register?
Write a program to maintain a singly linked list having the following functions: a) Creation of the list b) Displaying the list. c) Swap all nodes at consecutive even odd positions. E.g.: The nodes at position 1 should be swapped with node 2, node 3 with node 4 and so on.
funtionalities of loadining and linking
what is test initiation criteria in software testing
2 Answers CybAge, Seed Infotech,
Can anyone tell me the exact formulae with explanation for the questions related to cube which is asked for CTS? I have seen varieties of formulae in different sites.I need the exact on... So pls help me out!!!
a book consists of chapter ,chapter consist of sections and sections consists of subsections.construct a tree and print the node.
As a good company employee, can you report your supervisor to the company management if he or she is going against the company interest in his or her actions?
What is the weight of a foot square block of bronze.