Synopsys Part2
Synopsys Part2
Given a circuit diagram to me with resistors, inductors and capacitors. Now I need
to design a C++ classes to derive the power of whole circuit using C++ features and
describe how I use them. It was a long discussion of around 45 minutes
class B: public A{
B(){}
void foo(int var = 7) { std::cout<< var; }
};
int main(){
A *ptr = new B();
ptr->foo();
delete ptr;
return 0;
1000 coins/ 10 bags, distribute the coins so that each number can be made between 1
to 1000.
In how many different ways can the letters of the word ‘CORPORATION’ be arranged so
that the vowels always come together?
Poisened wine bottle puzzle.
Fill numbers from 1 to 8 puzzle.
Egg dropping puzzle.
50 over match calculate the maximum score of batsman. (49 * 31 + 36) can be
improved if run in last ball of every over are odd and > 1.
Divide a number by 8 without using division operator
Divide square in 7 parts. Divide horizontally.
20 heads and 80 tail you are blind divide equal heads between two people, you can
flip coin.
https://www.geeksforgeeks.org/puzzle-23-days-of-month-using-2-dice/
https://www.cut-the-knot.org/SimpleGames/EightDigitPuzzle.shtml
https://www.geeksforgeeks.org/puzzle-set-35-2-eggs-and-100-floors/
Given a value N, if we want to make change for N cents with the minimum number of
coins, and we have infinite supply of each of S = { S1, S2, .. , Sm} valued coins,
what will be the minimum value ?
What is an expression tree. How to store an expression in expression tree. Write a
code to evaluate an expression tree.
Design a 5 bit counter.
Function of clk in D-flip flop and some flipflop related question
What is the maximum score a Batsman can score in a cricket match.
The famous prisoner Hat puzzle . (I told him that i had solved this earlie
Discussion on memory manager. How does memory manager help to allocate memory?
Code analysis of a code that allocates memory using malloc until malloc returns
NULL.
Discussion on memory allocation using malloc
Process stack uninitialized data segment heap and stack
strcat function implementation
Program crashing before main() is called, what can be probable causes?
when does segmentation fault occurs..
which type of error can be cause by overwriting any allocated memory.
Design a compiler which can detect the circular inclusion of header files.
How to represent a large number[100 digits], convert a large number into binary,
provide bits in a particular ranges[eg but 45 to 78] for a 200 digit number
Explain types of Interrupts
What is pooling ?
If Cache is so fast why not eliminate Main memory and have a Cache memory by itself
What are the stages of compilation , explain how every step works.
She asked me about static and shared library and the differences between them and
told to write one library of my own and how static libraries are set up
How many processors and cores and sub processes running how to find out using
application (in windows) , using command (in linux).Here I answered Ill use Windows
task manager to find out 😛 but she said they show us the main processes and she
wants to see all the sub processes too
What are the main environment variables we use and what is ldpath ?
What debugging tools I have used till now and how debugging works internally? and
asked me few question on gdb
What does loader and linker do and in which part of memory everything is stored
Asked me to write a code of checking string is palindrome or not.
Dynamically allocate 2D array , array of strings , array of pointers (all using
malloc and new both)
Told me to write push and pop of stack using linked list.
Started with difference between
int *p[10];
int (*p)[10];