Академический Документы
Профессиональный Документы
Культура Документы
2. In the Linked list each node contain minimum two fields ,one field is called data stores data
and another field is called _______________________
6. What is self reference pointer and declare self reference pointer for the following structure
struct node
{
int data;
struct node *p;
}*head=NULL;
9. struct node
{
int data;
struct node *link;
}*head=NULL:
Consider the above representation and predict what will be printed on screen by the following
statement
head->link->data
a. Access data of 1st node
b. Access data of 2nd node
c. Access data of 3rd node
d. Access data of head node
struct node
{
int data;
struct node *link;
}*head=NULL:
What will be the value of the following statement
head -> link-> link -> link -> data
11.
if start is pointing to first node of linked list then consider the following statement
start=start->next;
current=start->next;
what will be the value of address of current
a. The five items : P,Q,R,S and T are inserted into a stack A one after other starting from from T in
reverse order
b. The stack is popped three times and each item is inserted into another stack B
c. The two elements are deleted from the stack B and pushed back onto to the stack A
what are the top most elements stack A and stack B respectively
13. Stack has three elements in it say X,Y and Z with X is on top
a. Stack B is empty
b. An element popped from stack A can be printed immediately or pushed to stack B
c. An element popped from stack B can only be printed
in the arrangement which of the following permutation of X,Y and Z are not possible ?
a. Z Y X
b. Y X Z
c. Y Z X
d. Z X Y
14. write a C statement allocate memory for one node using calloc() function
15. ………… is very useful in situation when data have to stored and then retrieved in reverse order.
a. Stack
b. Queue
c. List
d. Link list