Cisco interview questions for experienced Technical interview questions for cisco
1 / 10
public class FibonacciDemo{
public static void main(String args[]){
int i = 6;
for(int j = 1;j<=6;j )
  System.out.println(fibo(i) " ");
}
public static int fibo(int n){
if(n<=1)
return n;
return fibo(n-1) fibo(n-2);
}
}
No Tags on this question yet!
2 / 10
No Discussion on this question yet!
No Tags on this question yet!
3 / 10
No Discussion on this question yet!
No Tags on this question yet!
4 / 10
No Discussion on this question yet!
No Tags on this question yet!
5 / 10
public class InsertNodeInLinkedList {
   static class Node{
      int data;
      Node next;
      Node(int d){
         data = d;
         next = null;
      }
   }
  Â
  Â
   static Node head;
  Â
   public static int length(Node head){
      if(head == null)
         return 0;
      //create count to hold the length
      int count = 0;
      Node curr = head;
      while(curr != null){
         count ;
         curr = curr.next;
      }
      return count;
   }
  Â
   public static Node insertNodeAtPosition(Node head, int data, int position){
      //boundary condition
      int size = length(head);
      if(position < 1 || position > size 1){
         System.out.println("Invalid position ...");
         return head;
      }
     Â
      Node newNode = new Node(data);
      //insert in 1st position
      if(position == 1){
         newNode.next = head;
         return newNode;
      }else{
         Node prevNode = head;
         int count = 1;
         while(count < position-1){
            prevNode = prevNode.next;
            count ;
         }
        Â
         Node currNode = prevNode.next;
         newNode.next = currNode;
         prevNode.next = newNode;
         return head;
      }
   }
  Â
  Â
   public static void main(String[] args) {
      InsertNodeInLinkedList list = new InsertNodeInLinkedList();
      list.head = new Node(85);
      list.head.next = new Node(15);
      list.head.next.next = new Node(5);
      list.head.next.next.next = new Node(10);
      System.out.println("Print the list");
      printList(head);
      System.out.println();
      head = insertNodeAtPosition(head, 20, 1);
      System.out.println("Insert 20 at position 1");
      printList(head);
      System.out.println();
      System.out.println();
      head = insertNodeAtPosition(head, 25, 4);
      System.out.println("Insert 25 at position 4");
      printList(head);
   }
   private static void printList(Node n) {
      while(n != null){
         System.out.print(n.data " ");
         n = n.next;
      }
   }
}
No Tags on this question yet!
6 / 10
No Discussion on this question yet!
No Tags on this question yet!
7 / 10
No Discussion on this question yet!
No Tags on this question yet!
8 / 10
No Discussion on this question yet!
No Tags on this question yet!
9 / 10
a. Both under same network
b. under different network
-- Need to explain for ARP resolution
-- What should be L2 and L3 address in every step?
-- Which tables to look for, and which tables get updated. May need to explain one record from any of these tables.
No Discussion on this question yet!
No Tags on this question yet!
10 / 10
No Discussion on this question yet!
No Tags on this question yet!
1 / 11
No Discussion on this question yet!
No Tags on this question yet!
2 / 11
No Discussion on this question yet!
No Tags on this question yet!
3 / 11
No Discussion on this question yet!
No Tags on this question yet!
4 / 11
No Discussion on this question yet!
No Tags on this question yet!
5 / 11
No Discussion on this question yet!
No Tags on this question yet!
6 / 11
#include <stdio.h>
#pragma pack(2)
// if above line of code will be there then memory alignment boundry will be set to 2 so size of below will come as 2, else 4 byte.
int main()
{
typedef struct
{
unsigned int x:1
} x;
printf("size of bitfield struct %d ",sizeof(x));
return 0;
}
No Tags on this question yet!
7 / 11
No Discussion on this question yet!
No Tags on this question yet!
8 / 11
No Discussion on this question yet!
No Tags on this question yet!
9 / 11
No Discussion on this question yet!
No Tags on this question yet!
10 / 11
No Discussion on this question yet!
No Tags on this question yet!
11 / 11
No Discussion on this question yet!
No Tags on this question yet!
1 / 14
No Discussion on this question yet!
No Tags on this question yet!
2 / 14
No Discussion on this question yet!
No Tags on this question yet!
3 / 14
No Discussion on this question yet!
No Tags on this question yet!
4 / 14
No Discussion on this question yet!
No Tags on this question yet!
5 / 14
No Discussion on this question yet!
No Tags on this question yet!
6 / 14
What minimum configurations are required for communication between the two systems?
Explain with example of VLAN configuration. Then explaining it with different vlan and routing configurations.
No Discussion on this question yet!
No Tags on this question yet!
7 / 14
Then the pointer is incremented by 1, so that it points to next address location.
Then the same pointer is type casted to integer pointer.
Then the value pointed by this integer type casted pointer is fetched and printed.
No Discussion on this question yet!
No Tags on this question yet!
8 / 14
void * ptr;
No Discussion on this question yet!
No Tags on this question yet!
9 / 14
No Discussion on this question yet!
No Tags on this question yet!
10 / 14
Note: Write programs with enough clarity. Have a clear understanding of the program so that you can explain with any example.
No Discussion on this question yet!
No Tags on this question yet!
11 / 14
No Discussion on this question yet!
No Tags on this question yet!
12 / 14
No Discussion on this question yet!
No Tags on this question yet!
13 / 14
No Discussion on this question yet!
No Tags on this question yet!
14 / 14
struct funky {
double f;
int i;
char c[3];
void * p;
int x[0];
};
Why is it that size?
Is the size of this dependent on what machine I run on?
What does 'int x[0]' mean and what could that possibly be used for?
No Discussion on this question yet!
No Tags on this question yet!
- Cisco Interview Question Set 1
- Cisco Interview Question Set 2
- Cisco Interview Question Set 3
- Cisco Interview Question Set 4
- Cisco Interview Question Set 5
- >> Cisco Interview Question Set 6
- Cisco Interview Question Set 7
- Cisco Interview Question Set 8
- Cisco Interview Question Set 9
- Cisco Interview Question Set 10
- Cisco Interview Question Set 11
- Cisco Interview Question Set 12
- Cisco Interview Question Set 13