Tell How To Check Whether A Linked List Is Circular ?
Answer / dhayalan.n
we will store the header node into some other variable, then traverse the list, if we get null at the next part of any node, then that is not circular, otherwise we will check the next node is same as the stored node or not, if so then that is circular
| Is This Answer Correct ? | 0 Yes | 0 No |
What is Copy Constructor?
What is placement new?
Implement a 2D bit-matrix representing monochrome pixels which will have only OFF/ON values and will take on an average only one bit of memory for each stored bit. How to perform various operations on it?
explain the term 'resource acquisition is initialization'?
What is a COPY CONSTRUCTOR and when is it called?
What Is Polymorphism in C++ ?
2 Answers IBS, Impetus, ITC Indian Tobacco Company, Motorola,
There is a base class sub, with a member function fnsub(). There are two classes super1 and super2 which are sub classes of the base class sub.if and pointer object is created of the class sub which points to any of the two classes super1 and super2, if fnsub() is called which one will be inoked?
What is Advantage and Use of THIS pointer in C++ – Scenarios?
Declare a pointer to a function that takes a char pointer as argument and returns a void pointer.
Difference between Call by pointer and by reference.
Identify the error in the following program. #include<iostream.h> void main() { int i = 0; i = i + 1; cout « i « " "; /*comment *//i = i + 1; cout << i; }
What Is A Default Constructor in C++ ?