Open In App

Cadence Interview Experience for SDE-2 | 3.5 Years Experienced

Last Updated : 28 May, 2021
Like Article

Technical Round 1(1 hr):

  1. Default functions provided by compiler in empty class?
  2. Which data structure you will use to represent a directory structure? Tree

    Write program to count files with a given name like “abc.txt”

  3. What are static variables, where are they stored? Data segment area
  4. Detect cycle in directed graph. Told DFS approach
  5. What is reference in C++.

    Find out mistakes in below code.


    int main() {
       int x=5;
       int &ptr=x;
       cout<<ptr;  //what will be printed?
       delete ptr;  //compilation error  
        return 0;


  6. New and delete operator syntax related question, also checked for memory leak scenario when variables are allocated dynamically
  7. Delete 4th item from single linked list
  8. What are Dynamic and static linked libraries? Do you know about .so files?
  9. How to make global variables accessible in different classes? Using extern variable
  10. What is heap memory.
  11. What are function pointers and why are they used?
  12. What design patterns do you know? Design pattern you have used in your code.
  13. Use runtime polymorphisms in your code. Why it is required?

Technical round 2(1 hr):

  1. Pros and cons of both C and C++ over each other.
  2. One problem with sorting. Given following class:


    class Apple{
     int weight;
     enum color ; //black, green , red


    You have a bunch of apples, need to sort them with these criteria.

    1) Red Good apples – Heavy to lighter

    2) Green apples – Heavy to lighter

    3) Bad – Heavy to lighter

  3. Provided some code and asked if it’s copy constructor or assignment function call
  4. What will happen if we don’t return anything from assignment operator?

    Also asked about rvalue concept.

  5. What is STL? How many types of iterators in C++?
  6. Difference b/w vector and list?

Director Round(1 hr):

  1. Coin Puzzle:

    I told answer. Then he asked me to pick coins accordingly and checked at each step how many coins are picked by me.

  2. Variation in question 1, player who picks last coin loses the game.
  3. Given a file, read that file and print last 10 lines of file. Suppose file having 25 lines. Print lines from 16 to 25. Told queue approach
  4. Why do you want to switch?

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads