What is the difference between null and void?



What is the difference between null and void?..

Answer / Tabinda Iram

Null and Void have different meanings:
1. Null: It is an assignment value in programming languages that represents no object or no value, depending on the language.
2. Void: It is a data type in some programming languages (such as C++ and Java) that represents the absence of any value or simply nothing. The special value void is returned by functions that do not return an actual value.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Structures Interview Questions

What is heap tree explain with example?

1 Answers  


How many pointers are necessary to implement a simple linked list?

1 Answers  


What is mergesort and hashtable?

1 Answers  


What is bubble sort and selection sort?

1 Answers  


Write a code for dynamic allocation of array.

1 Answers   iNautix,


What is the difference between classifying and sorting?

1 Answers  


I am given a sequential algorithm that does a routine search on an unordered list. N = 20. The probability that the value x does NOT appear in the list is exactly 60%, and the probability that x DOES appear is 40%. The 3 questions that I could not get were: A) What is the avg number of element comparisons performed when n = 20 and x does NOT appear in the List. (my answer was 20, is this correct?) B) What is the avg number of element comparisons peformed when n = 20 and x DOES appear in the list? C) What is the avg number of element comparisons performed when n = 20. This should be a single number answer they said.

3 Answers  


What are the types of algorithms?

1 Answers  


What is nsmutablearray?

1 Answers  


What is a binary search tree? Explain with example?

1 Answers  


What is minimum depth of binary tree?

1 Answers  


Which interfaces are implemented by concurrentskiplistset?

1 Answers  


Categories