51. #include
int main()
{
int x=20,y=35;
x=y++ + x++;
y=++y + ++x;
printf("%d %d",x,y);
return 0;
}
Answer: 57,94
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
52. How is Data in a queue accessed
Answer: First in First out
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
53. Item in priority queue can jump to the front on the line if they have priority
Answer: TRUE
Explanation:A priority queue is similar to a simple queue in that items are organized in a line and processed sequentially. However, items on a priority queue can jump to the front of the line if they have priority. Priority is a value that is associated with each item placed in the queue.
Workspace
BOA (Bank of America)
54. The dequeue process removes data from the front of the single ended queue
Answer: TRUE
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
55. What Member function places a new node at the end of the linked list?
Answer: addNode
Explanation:The appendNode() member function places a new node at the end of the linked list. The appendNode() requires an integer representing the current data of the node.
Workspace
BOA (Bank of America)
56. How would you make the middle node of a doubly linked list to the top of the list?
Let assume "X" is the middle node
Answer: X->next->prev = x->prev x->prev->next = x->next x->next = head head->prev=x
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America) Capgemini
57. #include
int main()
{
int to, from, count;
to=10; count= 5; from= 15;
char c;
int n =(count+ 7) / 8;
switch ( count % 8)
{
case 0:
do
{ to++ == from++;
case 7: to++; from++;
case 6: to++ ; from++;
case 5: to++ ; from++;
case 4: to++ ; from++;
case 3: to++ ; from++;
case 2: to++ ; from++;
case 1: to++ ; from++;
} while ( -n > 0 );
}
printf("%d %d",to, from);
}
Answer: 15,20
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
58. Selection sort and quicksort both fall into the same category of sorting algorithms. What is this category?
Answer: Interchange sorts
Explanation:Selection sort is not O(n log n) and not a Divide-conquer sort too and Average time of quicksort is not quadratic.
Workspace
BOA (Bank of America) TCS NQT
59. What would be the Output
int i;
for(i=1 ;i<5;i++ );
printf("%d",i);
Answer: 5
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)
60. What would be the Output?
int fun(unsigned int number)
{
if(number <= 1)
return 1;
return number * fun(number - 1 );
}
void main()
{
printf("%d",fun(5));
}
Answer: 120
Explanation:Here is no explanation for this answer
Workspace
BOA (Bank of America)