-
What does the symbol * signifies?
Skill/Topic: Variables and PointersA) Tells the computer that you are declaring a pointerB) Tells the computer that you are declaring a variableC) Both a) and b)D) None of the aboveExplanation: The symbol * Tells the computer that you are declaring a pointer
-
__________ Method removes the value from the top of a stack?
Skill/Topic: Stacks using an ArrayA) push() member methodB) pop() member methodC) isFull() member methodD) isEmpty() member methodExplanation: The pop() member method removes the value from the top of a stack, which is then returned by the pop() member method to the statement that calls the pop() member method.
-
A Linked list can grow and shrink in size dynamically at _______.
Skill/Topic: Linked ListA) BeginningB) Run timeC) EndingD) None of the above
-
The node in a single linked list can reference the previous node in the linked list.
Skill/Topic: Linked ListA) TrueB) FalseExplanation: A single linked list is a linked list consisting of nodes that have only the next element and not the previous element. This links the node to only the next node in the linked list. There is no way for the node to reference the previous node in the linked list
-
Value of the first linked list index is _______.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) OneB) ZeroC) -1D) None of the above
-
What is a leaf node?
Skill/Topic: TreeA) A leaf node is the last node on a branch
-
The depth of a tree is the _______ of a tree.
Skill/Topic: TreeA) number of nodes on the treeB) number of levels of a treeC) Number of branches
-
What is the most efficient way of finding a loop in linklist?
Traversing the link list with two pointers, both traversing at different speed.
-
Function f(x) is continuous
The function f(x) is continuous in [0,1], such that f(0)=-1, f(1/2)=1 and f(1)=-1, We can conclude that 1. f attains the value zero at least twice in [0,1] 2. f attains the value zero exactly once in [0,1] 3. f is non-zero in [0,1] 4. f attains the value zero exactly twice in [0,1]
-
An _________ data type is a keyword of a programming language that specifies the amount of memory needed to store data and the kind of data that will be stored in that memory location.
Skill/Topic: Memory, Abstract Data Types, and AddressesA) abstract
-
The size of a structure is determines by the Product of sizes of all primitive data types within the structure?
Skill/Topic: Variables and PointersA) TrueB) FalseExplanation: The size of a structure is the sum of the sizes of all the primitive data types within the structure
-
What is a linked list?
Skill/Topic: Linked ListA) A linked list is a data structure consisting of elements called nodes. Each node points to the next and the previous node, thereby linking nodes together to form a linked list.
-
Can a linked list store data other than integers?
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) YesB) NoExplanation: Integers are usually used, but you can modify the data type of the data in the definition of the node to change the kind of data stored in the linked list.
-
scanf("%s",&A.name);
printf("Enter your age: ");
scanf("%d",&A.age);
printf("Name=%s Age=%d",A.name,A.age);
}">What would be the output of the following progam?union check{ char name[10]; int age;}A;void main(){ printf("Enter your name: "); scanf("%s",&A.name);printf("Enter your age: "); scanf("%d",&A.age);printf("Name=%s Age=%d",A.name,A.age);}
-
-
-
Linear and Non-Linear Data Structures
Explain what are linear data structure & non-linear data structure?
-
Circular Queue
What is Circular Queue? Explain with examples.
-
Pointer as Functions
How a value can be accessed through an address?How pointers can be used a funtions?
-
Double Linked List
Make a middle node of doubly link list to the top of the list.
Data Structures Interview Questions
Ans