Hello Everyone, I am new here and I want to know the Difference in NULL and VOID in data structure? In my previous interview, I have faced this question but I didn’t know the answer. Can anyone knows these difference and help me out or suggest some data structure based interview questions as a beginner point.
I suggest you view a tutorial video on C# programming. Even if you know the difference and you land the job, you will need to understand the basics of programming to succeed. There are many useful tutorial videos out there, so …
That really is a basic, core fundamental you need to know before trying to do this professionally.
To answer your question, null is the absence of a value and void is the existence, or rather non-existence, of a value. So string x could have a value and equal “asdf” or “”, or the value could be missing and it is null. A void doesn’t exists. It can’t ever be anything.
Here is the difference between NULL and VOID Data Structure:
-
Null is actually a value, whereas Void is a data type identifier.
-
A variable that is given a Null value simply indicates an empty value.
-
Void is used to identify pointers as having no initial size.
About the interview questions visit here:
- Question: What do you understand by a data structure?
- Question: How does a linear data structure differ from a non-linear data structure?
- Question: Please enumerate the various operations that can be performed on a data structure.
- Question: Can you tell which data structures are used for BFS and DFS of a graph?
- Question: Please explain stack and also mention some of its important applications.
- Question: What is a queue? How is it different from a stack?
- Question: What do you understand by a binary search? What is the best scenario of using it?
- Question: Could you explain how to reference all the elements in a one-dimension array?
- Question: Please explain what do you understand by FIFO and LIFO?
- Question: Do you know how does dynamic memory allocation help in managing data?
- Question: What is the difference between NULL and VOID?
- Question: How does a POP operation differ from a PUSH operation?
- Question: Could you explain how does variable declaration affect memory allocation?
- Question: Please explain the concept of data abstraction.
- Question: How will you insert a new item in a binary search tree?
- Question: Could you explain how does the selection sort work on an array?
- Question: Do you know how the memory is affected by signed and unsigned numbers?
- Question: Does all declaration statements result in a fixed memory reservation?
- Question: How does an array differ from a stack?
- Question: What do you understand by an AVL tree?
- Question: Please explain how does an Array differ from a Linked List?
- Question: What do you understand by Infix, Prefix, and Postfix notations?
- Question: Please explain the Linked List and its various types.
- Question: How will you implement a stack using queue and vice-versa?
- Question: Which data structures are used for implementing LRU cache?
- Question: Could you give a brief explanation of the various approaches for developing algorithms?
- Question: Please enumerate some examples of greedy and divide and conquer algorithms.
- Question: How does insertion sort differ from selection sort?
- Question: What do you understand by shell sort?
- Question: Can you explain tree traversal?
- Question: Please explain a spanning tree. What is the maximum number of spanning trees a graph can have?
- Question: How does the Kruskal’s Algorithm work?
- Question: What do you understand by Heap in data structure?
- Question: Please explain recursion.
- Question: Can you explain the Tower of Hanoi problem?
- Question: How do the BFS (Breadth-First Search) and DFS (Depth First Search) algorithms work?
- Question: What do you understand by hashing?
- Question: Please explain an MST (Minimum Spanning Tree). Also, explain how does Prim’s algorithm finds a minimum spanning tree.
- Question: Can you explain the interpolation search technique?
- Question: How will you check whether the given Binary Tree is BST or not?
Getting answers to these questions read our blog .