Synopsys Interview Experience for R&D Senior Engineer 1

20 Aug, 2021
Recently I had gone through four rounds of Synopsys Interviews for R&D Senior Engineer 1
Round 1: 
Output-based questions:
C++C++int j = 0;  for(int i = n; i > 1; i = i/2) j++;  int add(int &a, int &b)  {   int c = a + b;   return c;  }  int main()  {   int int1, int2, sum;   sum = add(int1, int2);  }C++C++int a =10;  int &r = a;  int b = 25;  r = b;  r++;  cout << r << endl << a << endl << b << endl;  void printArray(int A[])  {   // write code here  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   printArray(Arr);   return 0;  }C++C++void ChangeArray(int A[], int n)  {   for(int i = 0; i < n; i++)    A[i]++;  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   ChangeArray(Arr, 5);   for(int i = 0; i < 5; i++)       cout << Arr[i] << " ";   return 0;  }C++C++void func(int n)  {   cout << n;   func(n-1);  }  int main()  {   func(3);   return 0;  }  int func(int n)  {   static int x = 0;   if(n<=0)    return 0;   x++;   return func(n-1) + x;  }  main()  {   func(5);  }C++C++void foo(int n, int sum)  {   if(n==0) return;   int k = n%10;   int j = n/10;   sum = sum + k;   foo(j, sum);   cout << k << ", ";  }  int main()  {   int a = 2048, sum = 0;   foo(a, sum);   cout << sum << endl;  }C++C++int j = 0;  for(int i = n; i > 1; i = i/2) j++;  int i = n; 8  int j = 0;  while(i > 1) {  j++;  i = i/2;  }C++C++void printArray(int A[])  {   // write code here   int len = sizeof(A)/sizeof(A[0]);   for(int i = 0; i < len; i++) {    printf("%d ", A[i]);   }  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   printArray(Arr);   return 0;  }C++C++int func(int n)  {   static int x = 0;   if(n<=0)    return 0;   x++;   return func(n-1) + x;  }  main()  {   func(5);  }C++C++void foo(int n, int sum)  {   if(n==0) return;   int k = n%10;   int j = n/10;   sum = sum + k;   foo(j, sum);   cout << k << ", ";  }  int main()  {   int a = 2048, sum = 0;   foo(a, sum);   cout << sum << endl;  }Build Binary search tree using preorder and inorder traversalVirtual function questions in C++
C++C++int j = 0;  for(int i = n; i > 1; i = i/2) j++;  int add(int &a, int &b)  {   int c = a + b;   return c;  }  int main()  {   int int1, int2, sum;   sum = add(int1, int2);  }
C++
int j = 0;  for(int i = n; i > 1; i = i/2) j++;  int add(int &a, int &b)  {   int c = a + b;   return c;  }  int main()  {   int int1, int2, sum;   sum = add(int1, int2);  }
C++C++int a =10;  int &r = a;  int b = 25;  r = b;  r++;  cout << r << endl << a << endl << b << endl;  void printArray(int A[])  {   // write code here  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   printArray(Arr);   return 0;  }
C++
int a =10;  int &r = a;  int b = 25;  r = b;  r++;  cout << r << endl << a << endl << b << endl;  void printArray(int A[])  {   // write code here  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   printArray(Arr);   return 0;  }
C++C++void ChangeArray(int A[], int n)  {   for(int i = 0; i < n; i++)    A[i]++;  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   ChangeArray(Arr, 5);   for(int i = 0; i < 5; i++)       cout << Arr[i] << " ";   return 0;  }
C++
void ChangeArray(int A[], int n)  {   for(int i = 0; i < n; i++)    A[i]++;  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   ChangeArray(Arr, 5);   for(int i = 0; i < 5; i++)       cout << Arr[i] << " ";   return 0;  }
C++C++void func(int n)  {   cout << n;   func(n-1);  }  int main()  {   func(3);   return 0;  }  int func(int n)  {   static int x = 0;   if(n<=0)    return 0;   x++;   return func(n-1) + x;  }  main()  {   func(5);  }
C++
void func(int n)  {   cout << n;   func(n-1);  }  int main()  {   func(3);   return 0;  }  int func(int n)  {   static int x = 0;   if(n<=0)    return 0;   x++;   return func(n-1) + x;  }  main()  {   func(5);  }
C++C++void foo(int n, int sum)  {   if(n==0) return;   int k = n%10;   int j = n/10;   sum = sum + k;   foo(j, sum);   cout << k << ", ";  }  int main()  {   int a = 2048, sum = 0;   foo(a, sum);   cout << sum << endl;  }
C++
void foo(int n, int sum)  {   if(n==0) return;   int k = n%10;   int j = n/10;   sum = sum + k;   foo(j, sum);   cout << k << ", ";  }  int main()  {   int a = 2048, sum = 0;   foo(a, sum);   cout << sum << endl;  }
C++C++int j = 0;  for(int i = n; i > 1; i = i/2) j++;  int i = n; 8  int j = 0;  while(i > 1) {  j++;  i = i/2;  }
C++
int j = 0;  for(int i = n; i > 1; i = i/2) j++;  int i = n; 8  int j = 0;  while(i > 1) {  j++;  i = i/2;  }
C++C++void printArray(int A[])  {   // write code here   int len = sizeof(A)/sizeof(A[0]);   for(int i = 0; i < len; i++) {    printf("%d ", A[i]);   }  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   printArray(Arr);   return 0;  }
C++
void printArray(int A[])  {   // write code here   int len = sizeof(A)/sizeof(A[0]);   for(int i = 0; i < len; i++) {    printf("%d ", A[i]);   }  }  int main()  {   int Arr[5] = {2, 4, 6, 8, 10};   printArray(Arr);   return 0;  }
C++C++int func(int n)  {   static int x = 0;   if(n<=0)    return 0;   x++;   return func(n-1) + x;  }  main()  {   func(5);  }
C++
int func(int n)  {   static int x = 0;   if(n<=0)    return 0;   x++;   return func(n-1) + x;  }  main()  {   func(5);  }
C++C++void foo(int n, int sum)  {   if(n==0) return;   int k = n%10;   int j = n/10;   sum = sum + k;   foo(j, sum);   cout << k << ", ";  }  int main()  {   int a = 2048, sum = 0;   foo(a, sum);   cout << sum << endl;  }
C++
void foo(int n, int sum)  {   if(n==0) return;   int k = n%10;   int j = n/10;   sum = sum + k;   foo(j, sum);   cout << k << ", ";  }  int main()  {   int a = 2048, sum = 0;   foo(a, sum);   cout << sum << endl;  }
Build Binary search tree using preorder and inorder traversal
Virtual function questions in C++
Round 2:
Design Queue using stacksNext Greater element and previous smaller elementDeclare 2d array in C++What each declaration means belowconst char* p; // pointer itself is constant
char * const p; // value is consstant  
const char * const p; // both are constantsDesign your own vector class and difference between vector and array.
Design Queue using stacks
Next Greater element and previous smaller element
Declare 2d array in C++
What each declaration means belowconst char* p; // pointer itself is constant
char * const p; // value is consstant  
const char * const p; // both are constants
const char* p; // pointer itself is constant
char * const p; // value is consstant  
const char * const p; // both are constants
Design your own vector class and difference between vector and array.
Round 3:
Second largest element in a BST.Cycle in a directed and undirected graphBasic C++ questions related to virtual functions and constructors.
Second largest element in a BST.
Cycle in a directed and undirected graph
Basic C++ questions related to virtual functions and constructors.
Round 4:
Find the next number in the series3, 5, 8, 13, 22
3 * 2 = 6 - 1   5  
5 * 2 = 10 - 2  8  
8 * 2 = 16 - 3  13  
13 * 2 = 26- 4  22
22 * 2 = 44- 5  39Convert string number to integer like atoi and ensure proper test cases are coveredWhy looking for a change and few other behavioral questions.
Find the next number in the series3, 5, 8, 13, 22
3 * 2 = 6 - 1   5  
5 * 2 = 10 - 2  8  
8 * 2 = 16 - 3  13  
13 * 2 = 26- 4  22
22 * 2 = 44- 5  39
3, 5, 8, 13, 22
3 * 2 = 6 - 1   5  
5 * 2 = 10 - 2  8  
8 * 2 = 16 - 3  13  
13 * 2 = 26- 4  22
22 * 2 = 44- 5  39
Convert string number to integer like atoi and ensure proper test cases are covered
Why looking for a change and few other behavioral questions.
Marketing
Synopsys
Interview Experiences
Synopsys
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
Google SWE Interview Experience (Google Online Coding Challenge) 2022
Samsung Interview Experience Research & Institute SRIB (Off-Campus) 2022
Amazon Interview Experience for SDE 1
Amazon Interview Experience SDE-2 (3 Years Experienced)
TCS Ninja Interview Experience (2020 batch)
Write It Up: Share Your Interview Experiences
Samsung RnD Coding Round Questions
Nagarro Interview Experience
Amazon Interview Experience for SDE-1
Nagarro Interview Experience | On-Campus 2021