Logo 
Search:

Interview FAQs

Submit Interview FAQ
Home » Interview FAQsRSS Feeds
C++ Programming
Comments: 0

Write an algorithm for Pushing a Node at the end of queue using Singly Linked List in dfs.

PROCEDURE PUSH_QUEUE(TOP)
[Where the starting pointer head has been caught in pointer ‘TOP’]

1. [Traversing to end of queue]

while (LINK(TOP) !=0)
TOP <-- LINK (TOP).

2. [Allocating the memory for new node & pushing it into queue]

...
Posted By:Redmond Fischer      Posted On: Dec 12

C++ Programming
Comments: 0

What will be the output of the mentioned code?

Consider the following code segment:
void main()
{
string s1("Time and tide wait for none");
int f;
f=s1.find("t");
cout< f=s1.find_first_of("t");
cout<<"\t"< f=s1.find_last_of("t");
cout<<"\t"< f=s1.find_first_not_...
Posted By:Waggoner Fischer      Posted On: Dec 10

C++ Programming
Comments: 0

Identify the manipulators in C++:

Options

a) endl
b) setw
c) Both a and b
d) None of the above


Answer : c) Both a and b
Posted By:Harrison Evans      Posted On: Dec 09

C++ Programming
Comments: 0

What is Dangling pointer in dfs (data file structure)?

If a node is being pointed by pointer p and q is pointer which points to p, so now if we free the pointer p, then the memory for pointer p is also freed. So now q no longer points to desired location. So such pointer q is called dangling pointer.
Posted By:Isaac Evans      Posted On: Dec 09

C++ Programming
Comments: 0

Write an algorithm for Creating Queue(fifo) using Singly Linked List in dfs.

PROCEDURE CREATE_QUEUE(TOP)
[Where ‘head’ pointer has been caught in pointer ‘TOP’ and function is void]

1. [Allocating memory for new node & having the value from user]

Call GETNODE (TOP)
DATA (TOP) <-- ‘xyz’
LINK (TOP) <--...
Posted By:Bittan Fischer      Posted On: Dec 04

C++ Programming
Comments: 0

Find if the following function prototype contains any error: double area(int )

Options

a) No error
b) Variable name is not included in the argument list
c) Semicolon is not found
d) None of the above


Answer : c) Semicolon is not found
Posted By:Bailey Evans      Posted On: Dec 02

  89  90  91  92  93  94  95  96  97  98  99