All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Ask a Question
Search
Search
Sign In
Register
study help
computer science
data structures and other objects using java
Questions and Answers of
Data Structures and Other Objects Using Java
The non-primitive linear data structure required to check whether an expression contains balanced parenthesis isA. StackB. QueueC. ArrayD. Tree
If the elements “A”, “B”, “C” and “D” are placed in a stack and are removed one at a time, in what order will they be deleted?A. ABCDB. DCBAC. DCABD. ABDC
What is the minimum number of stacks of size n required to implement a queue data structure of size n?A. OneB. TwoC. ThreeD. Four
Consider the following array implementation of stack:If the array index starts with 0, the maximum value of top that does not cause stack overflow is?A. 8B. 9 C. 10 D. 11 #define MAX 10 Struct
Which of the following applications utilizes a stack data structure?A. Parenthesis balancing programB. Syntax analyzer in compilerC. Keeping track of local variables at run timeD. All of the above
Consider the following operation performed on a stack of size 5.After the completion of all operations, the number of elements present on the stack areA. 1B. 2 C. 3 D. 4 Push (1); Pop (); Push (2);
What is the name where deletion can be done in a linear list of elements from one end (front) and insertion can take place only at the other end (rear)?A. QueueB. StackC. TreeD. Linked list
Let the following circular queue can accommodate maximum six elements with the following dataWhat will happen after ADD O operation takes place?A. front = 2 rear = 5queue = ______; L, M, N, O, ___B.
If the MAX_SIZE is the size of the array used in the implementation of the circular queue. How is rear manipulated while inserting an element in the queue?A. rear=(rear%1)+MAX_SIZEB.
What is the name where elements can be inserted or deleted, in a non-primitive linear data structure, from both the ends but not in the middle?A. QueueB. Circular queueC. DequeueD. Priority queue
Consider the following pseudo-code. Assume that IntQueue is an integer queue. What does the function fun do?A. Prints numbers from 0 to n-1B. Prints numbers from n-1 to 0C. Prints frst n Fibonacci
Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array
Following is a C like pseudo-code of a function that takes a queue as an argument and uses a stack S to do the processing.What does the above function do in general?A. Removes the last from QB. Keeps
A data structure in which elements can be inserted or deleted at/ from both the ends but not in the middle is?A. QueueB. Circular queueC. DequeueD. Priority queue
A circular queue is implemented using an array of size 10. The array index starts with 0, the front is 6, and the rear is 9. The insertion of the next element takes place in the array index.A. 0B.
Trees and graphs are which type of data structures?A. Linear data structuresB. Nonlinear data structuresC. Primitive data structuresD. None of the above
Consider the following pseudo-code. Assume that IntQueue is an integer queue. What does the function fun do?A. Prints numbers from 0 to n-1B. Prints numbers from n-1 to 0C. Prints first n Fibonacci
What is the use of void pointer?
Explain the generic pointer with a suitable example.
Differentiate between the void pointer, NULL pointer and an uninitialized pointer.
Write a note on dynamic memory allocation with a suitable example.
What are the different dynamic memory allocation functions and explain with suitable example?
Write a note on memory leakage.
What is the use malloc (), calloc (), realloc () and free () functions?
What are the differences between dangling pointer and memory leak?
What is mean by dangling pointer explain with an example?
What is the dangling pointer and how to avoid it?
What are the different proposed solutions to avoid the dangling pointers?
How to avoid dangling pointer issues and memory leakage problem?
What is the difference between malloc() and calloc() dynamic memory management functions?
What is the return type of malloc() function?A. float B. int *C. void *D. double *
Which of the below header files is required to be included to use dynamic memory allocation functions?A. stdlib.h B. stdio.h C. memory.h D. dos.h
Which memory partition stores dynamically allocated variables?A. Heap memory partition B. Stack memory partition C. Global memory partition D. Code memory partition
Which method is used to remove the dynamically allocated memory space? A. dealloc() function B. free() function C. realloc() function D. Both A an
Which of the following is correct function declaration for malloc() function in C language? A. void * malloc ( int size_t) B. char* malloc (char ) C. int * malloc (int size_t) D. float * malloc (
Which functions are used for memory allocation at runtime in C language? A. malloc() function B. calloc ( ) function C. realloc () function D. Both A and B
What is the problem with following code?A. Memory Leakage B. Dangling pointer C. Compiler error D. None of the the above #include #include void fun () { int *ptr = (int *) malloc (sizeof (int));
Consider the following program, where are x, y and z are stored in main memory partition?A. x is stored on the heap memory partition, y is stored on the global partition and z is stored on stack
Which of the following functions allocates multiple blocks of memory at runtime, each block allocated having same size and each byte of allocated space is initialized to zero? A. malloc() B.
Memory is reserved dynamically using malloc() or calloc() functions but memory area that is allocated dynamically is not accessible to programmer any more afterward is called as? A. Dangling
In realloc() library function, if the new size of the memory block is greater than the old size, then newly added memory space …..? A. is initialized to one B. is initialized to zero C. is not
What is dangling pointer? A. if pointer is assigned NULL value B. if pointer points to a memory location that has already been freed C. if pointer is assigned to more than one variable D. None of
The free() function frees the memory allocated at runtime and returns _____ A. pointer value B. the memory address of the freed variable C. no value is return D. an float value is return
Which of the following function allocates requested size of bytes for single element and returns a pointer to first byte of allocated space at runtime and initial element value is garbage. A.
Which of the following pointer stores a defined value that is zero or NULL address. A. NULL pointer B. void pointer C. Dangling pointer D. None of the above
Which of the following statements are correct?Statement 1: A NULL pointer stores a defined value that is zero or NULL address.Statement 2: The void pointer is a data type while NULL pointer is not a
Which of the following statements are true or false?Statement 1: malloc () is static memory management function having return type as void *.Statement 2: malloc () function reserves the memory
Which of the following statements are true or false?Statement 1: The realloc () function alters the size of the space already assigned.Statement 2: The malloc () function assigns space for an array
Which of the following statements are true or false?Statement 1: Compile time storage of a variable is allocated and released by the compiler depends on the scope of variable and lifetime of a
Which of the following statements are true or false?Statement 1: A memory leak occurs when a programmer creates a memory dynamically on heap partition and forget to delete it.Statement 2: A dangling
Which of the following statements are true or false?Statement 1: The free () function releases the space previously assigned by the malloc (), calloc () or realloc () function.Statement 2: A dangling
What are the advantages of linked list over array?
Can we apply binary search algorithm to a sorted linked list, why?
What is the difference between a stack and an array?
What are the disadvantages of array implementation over the linked list?
What are the disadvantages of linear linked list?
Define circular linked list.
What are the disadvantages of circular linked list?
Define and explain double linked list with a suitable example.
Explain whether linked list is linear or nonlinear data structure.
What are the parts of a linked list?
How will you represent a linear and circular linked list in a graphical view?
List all types of linked list. Explain circular linked list in detail.
Explain doubly linked list.
How do you search for a target key in a linked list?
What is a circular linked list? Explain its applications.
How many different pointers are necessary to implement a singly linear linked list?
How can we represent a doubly circular linked list node?
How can you insert a node to the beginning of a singly circular linked list? .
How can we insert a node at the end of doubly circular linked list?
Write a procedure which adds a node at the specifc position of doubly linear linked list?
How can we delete any specific node from the singly linear linked list?
Write a function which deletes first node from the singly circular linked list?
How can we reverse a singly circular linked list? .
How to calculate the length of a singly linear linked list?
Explain the drawbacks of the linked list.
What are the major differences between the linked list and linear array?
Write a C code for circular queue implementation using linked list?
Write a C code for stack implementation using linked list?
Implement C code for linear queue using linked list with a suitable example.
Write C code for displaying all data members of singly linear linked list in reverse manner.
Write an algorithm and C code for deleting any node from the singly linear linked list.
Which of the following statements is true regarding the data structure of the linked list when compared to the array?A. Arrays have better cache locality that can make them superior in terms of
The following C function takes a singly linked list as an input argument. It modifies the list by moving the last element to the front of the list and returns the modified list. Some part of the code
The following C function takes a list of integers as parameter and rearranges the elements in the list. The function is called with the list containing the 1, 2, 3, 4, 5, 6, 7 integers in the order
What does the following operation do for a given linked list with an initial node as head?A. Prints all nodes of linked lists B. Prints all nodes of linked list in reverse order C. Prints alternate
The following function reverse() is supposed to reverse a singly linked list. There is one line missing at the end of the function.A. *head_ref = prev;B. *head_ref = current;C. *head_ref = next;D.
What is the result of the following function to start pointing to the first node of follow linked list?A. 1 4 6 6 4 1 B. 1 3 5 1 3 5 C. 1 2 3 5 D. 1 3 5 5 3 1 1->2->3->4->5->6 void fun (struct node*
Consider, we are given pointers to first and last node of a singly linear linked list, which of the below functions are dependent on the length of the linked list.A. Delete the first node from the
Consider that a pointer to a node X in a singly linear linked list is given. Pointers to head node is not given, can we delete the node X from given singly linear linked list?A. Possible if X is not
Consider the function f defined below.For a given linked list p, the function f returns 1 if and only if (GATE CS 2003)A. the list is empty or has exactly one element B. the elements in the list are
Consider, a singly circular linked list is used to represent a Queue. There is only one p variable to access the queue. To which node should p point such that both the operations enQueue and deQueue
In a circular linked list which of the following is correct, A. Components are all linked together in some sequential manner.B. There is no beginning and no end.C. Components are arranged
In singly linear linked list each node contain minimum of two fields. One field is called as a data field to store the actual data second field is used for to store?A. Pointer to float data B.
Consider the following function that takes reference to head of a Doubly Linked List as parameter. Assume that a node of doubly linked list has previous pointer as prev and next pointer as
In the worst case, the number of comparisons needed to search a singly linked list of length n for a given element is (GATE CS 2002)A. log 2 n B. n/2 C. log 2 n – 1 D. n\
A linear collection of data elements where the linear node is given by means of pointer is called?A. Linked list B. Node list C. Primitive list D. None
Which of the following operations is carried out more efficiently by the doubly-linked list than by the singly-linked list?A. Deleting a node whose location in given B. Searching of an unsorted list
Consider an implementation of unsorted singly linked list. |||||Suppose it has its representation with a head and tail pointer. Given the representation, which of the following operation can be
Consider an implementation of unsorted singly linked list. Suppose it has its representation with a head pointer only. Given the representation, which of the following operation can be implemented in
Showing 200 - 300
of 507
1
2
3
4
5
6