Note 1

Take Note:

Take a note while surfing.





Note With Ink

Give your Note a Colorful Tag.




Easy to Access

Stay on same information and in Sync wherever you are.

Note 2

Take Note:

Organize your information,It may take Shape.





Think With Ink

Differ your Content by Color.




Easy to Access

Easy to pull up your content from anywhere anytime.

Note 3

Take Note:

Don't Let information to miss,Because it take shape





Note With Ink

Simple an Easy Way to take a note.




Easy to Access

Get the same in next visit.


Please wait...

Interview Questions and Answers :: Cisco

Home > Experience Archives > Cisco > Interview Question Set 9
Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F)
    Question :: 1
    Tell me about yourself and about the project you have done. Then few questions were from projects.

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 2
    What is static and volatile variable, and its use.

    Answer:
    The Java volatile keyword guarantees visibility of changes to variables across threads.
    The java static keyword, If we declare any variable or method as a static then there is no need to create object of it. It is directly accessible from class reference.
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 3
    How do you think mallow works?

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 4
    What is virtual memory? and What is its use?

    Answer:

    Virtual memory is a memory management capability of an OS that uses hardware and software to allow a computer to compensate for physical memory shortages by temporarily transferring data from random access memory (RAM) to disk storage.

    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 5
    Give example of virtual memory.

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 6
    Explain different memory segments of a program.

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F)
    Question :: 1
    How would you detect if two linked list crosses each other? In fastest way, How would you find the point of intersection

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 2
    Write a program to reverse a string.

    Answer:
    No Discussion on this question yet!
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 3
    Write your own malloc, and free

    Answer:
    static unsigned char our_memory[1024 * 1024]; //reserve 1 MB for malloc
    static size_t next_index = 0;

    static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;

    void *malloc(size_t sz)
    {
    void *mem;
    pthread_mutex_lock
    (&lock);
    if(sizeof our_memory - next_index < sz){
    pthread_mutex_unlock
    (&lock);
    return NULL;
    }

    mem
    = &our_memory[next_index];
    next_index
    += sz;
    pthread_mutex_unlock
    (&lock);
    return mem;
    }

    void free(void *mem)
    {
    //we cheat, and don't free anything.
    }
    Please Login First :
    Tags:

    No Tags on this question yet!

    Question :: 4
    Given two linked list, one a subset of other, find the subset elements in fastest way.

    Answer:

    // C++ program to find a list in second list 

    #include <bits/stdc++.h> 

    using namespace std; 


    // A Linked List node 

    struct Node 

    int data; 

    Node* next; 

    }; 


    // Returns true if first list is present in second 

    // list 

    bool findList(Node* first, Node* second) 

    Node* ptr1 = first, *ptr2 = second; 


    // If both linked lists are empty, return true 

    if (first == NULL && second == NULL) 

    return true; 


    // Else If one is empty and other is not return 

    // false 

    if ( first == NULL || 

    (first != NULL && second == NULL)) 

    return false; 


    // Traverse the second list by picking nodes 

    // one by one 

    while (second != NULL) 

    // Initialize ptr2 with current node of second 

    ptr2 = second; 


    // Start matching first list with second list 

    while (ptr1 != NULL) 

    // If second list becomes empty and first 

    // not then return false 

    if (ptr2 == NULL) 

    return false; 


    // If data part is same, go to next 

    // of both lists 

    else if (ptr1->data == ptr2->data) 

    ptr1 = ptr1->next; 

    ptr2 = ptr2->next; 


    // If not equal then break the loop 

    else break; 


    // Return true if first list gets traversed 

    // completely that means it is matched. 

    if (ptr1 == NULL) 

    return true; 


    // Initialize ptr1 with first again 

    ptr1 = first; 


    // And go to next node of second list 

    second = second->next; 


    return false; 


    /* Function to print nodes in a given linked list */

    void printList(Node* node) 

    while (node != NULL) 

    printf("%d ", node->data); 

    node = node->next; 


    // Function to add new node to linked lists 

    Node *newNode(int key) 

    Node *temp = new Node; 

    temp-> data= key; 

    temp->next = NULL; 

    return temp; 


    /* Driver program to test above functions*/

    int main() 

    /* Let us create two linked lists to test 

    the above functions. Created lists shall be 

    a: 1->2->3->4 

    b: 1->2->1->2->3->4*/

    Node *a = newNode(1); 

    a->next = newNode(2); 

    a->next->next = newNode(3); 

    a->next->next->next = newNode(4); 


    Node *b = newNode(1); 

    b->next = newNode(2); 

    b->next->next = newNode(1); 

    b->next->next->next = newNode(2); 

    b->next->next->next->next = newNode(3); 

    b->next->next->next->next->next = newNode(4); 


    findList(a,b) ? cout << "LIST FOUND" : 

    cout << "LIST NOT FOUND"; 


    return 0; 


    Please Login First :
    Tags:

    No Tags on this question yet!

Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F) Telephonic Round First Round (F-2-F) Second Round (F-2-F) Third Round (F-2-F)