Posts

Showing posts from March, 2022

Road Map for Interview preparation

                                            Embedded Senior software Architect Linked List Typical Interview Question Function to check if a singly linked list is palindrome Given only a pointer to a node to be deleted in a singly linked list, how do you delete it? Find the middle of a given linked list Linked List Data Structure - GeeksforGeeks Priorities of OS programs , process and thread differences How to handle the Generic functions , like Void pointers Big & Little endian – definitions, representations, write it down, swap them, etc Lots of memory related questions Write a program to implement memcpy() on your own – Need to evaluate many other conditions like overlap situations and etc., Difference between library call and a system call Priority inversion in a RTOS and its solutions Producer and Consumer implement...

Behavioral Interview Questions

Personal Interview Questions:- Introduce yourself as an software Architect I am someone who is very passionate about my work as an Architect. I am highly-professional, creative, flexible and above all, i hold the relevant technical knowledge and expertise to carry out this job in line with expectations of your company. The past experiences i have relevant to this role include, previous stints as an Architect at both small and medium sized organizations, whereby i was often working with diverse range of clients on complex architectural projects that involved large numbers of interested stakeholders and contractors. I have never missed a project deadline and i am always able to come up with solutions to often complex software architectural issues that meet the needs of the clients. One of the main strength i posses as an Architect, that i feel makes me a strong contender for this position, is the fact i am someone who always takes ownership of challenging situations and i will go the ext...

Stack & Queue interview Questions

1. Implement stack using Queue. #include <iostream> #include<queue> using namespace std; class MyStack {   queue<int>Q;   public:   void push(int value)   {     int size = Q.size();     Q.push(value);     for(int i =0;i<size;i++)     {         Q.push(Q.front());         Q.pop();     }   }   void pop()   {       if (!Q.empty())       {           Q.pop();       }   }   bool empty()   {       return (Q.empty());   }   int top()   {       return (Q.front());   }   void printElement()   {       cout<<"Printing Queue Elements"<<endl;       queue<int>temp = Q;       while(!temp.empty())       {           c...

[15 May 2022] My Planner

  Crestron Project PPT Important Schedule Daily Schedule Work Daily plan:- Finish the below list of questions Today preparation plan: 1. Finish all questions from the link 2. Basic C++  preparation link 3. C++ Typecasting   4. Smart pointer 5. C++ 11 Features 6. Generalized lambda concept 7. move semantic 8. Composition and Aggregation 9. template pattern 10.Gdb debugging Basic C++ interview preparation Difference between std::deque and std::vector Custom deleter C++ Stage 1 C++ Stage 2

Requirement Engineering Concepts

Requirement Engineering Software Engineering | Requirements Engineering Process Software Engineering | Classification of Software Requirements How to write a good SRS for your Project Software Engineering | Quality Characteristics of a good SRS Software Engineering | Requirements Elicitation Software Engineering | Challenges in eliciting requirements Functional vs Non Functional Requirements Q1. What is requirement engineering ? Requirement Engineering is the process of defining, documenting and maintaining the requirements. It is a process of gathering and defining service provided by the system. Q2. What are different activities under requirement engineering? Requirements elicitation Requirements specification Requirements verification and validation Requirements management What is Requirements Elicitation: It is related to the various ways used to gain knowledge about the project domain and requirements. The various sources of domain knowledge include customers, business manuals, th...

Google Test (gtest) Notes

  A good unit test: Is able to be fully automated has full control over all the pieces running(Uses mocks or fakes to achieve this isolation when needed Can run in any order Runs fast Test a single logical concepts in system Is readable is maintainable Runs in memory(no DB or File access ) How to run it ? ccmake localmake /sdev/user/bin/run_ut Mock Objects Each unit test case test a single logical solution That is, test the behavior of a single function in a single scenario But many functions call other functions with their own complex behavior The complex behavior make it hard to test a single logical solution It is also difficult to get the called function to exhibit bad whether behavior So instead of calling the actual calling those other functions we call test doubles One particular kind of test double is mock What is Mock ? A Mock check that the double is called as expected It substitutes a behavior for the function that would be called EXPECT_CALL Mac...

C++ interview Strategy before any interview

 All basic concepts of C++ Basic C++ interview concepts IPC Mechanism  Typical C++ Programs revision Google Test Framework(GTest) C Prep Document before interview C Program to practice Revise all C++ concepts mentioned in this Link Revise STL concepts like most asked question about list and vector Link Basic C++ interview Concepts Revision https://www.geeksforgeeks.org/private-destructor-in-cpp/?ref=lbp

System Programming

Linux Book : Link Semaphore and Mutex  Different between mutex and semaphore Discuss a real time example for semaphore How to synchronize two process for accessing shared memeory Discuss the semaphore  pthread API for semaphore What are pthread api used for thread creation and semaphore Difference between binary semaphore and mutex What is difference between semaphore and conditional variable ? Complete semaphore concept, check video Shared Memory What is shared Memory ? Refer video link What are different api for shared memory ? Pthread library API Basic knowledge What are different param of shmget() shmat() API ftok() api for shared memeory used shmctl  shmdt() Notes: The initial value of the semaphore that allows only one of the many processes to enter their critical sections, is 1. Socket Programming Baisc Socket Concept Pipes: Introduction Code example:- #include <unistd.h> int main() {   int pfd[2], fv;   pipe(pfd);   fv = fork();   if (fv)...

Practice Program by writing on bare sheet and running it online

 Date: 04 March 2022  For more program practice, refer my blog Link Array Programs Collection Sort an array of 0s, 1s and 2s Median in a stream of integers (running integers) Find Second largest element in an array Find Second largest element in an array Move all negative elements to end in order with extra space allowed C++ Program to Rearrange positive and negative numbers in O(n) time and O(1) extra space Largest Sum Contiguous Subarray Majority Element Find the Number Occurring Odd Number of Times Finding sum of digits of a number until sum becomes single digit Sliding Window Maximum (Maximum of all subarrays of size k) Matrix  Program to find transpose of a matrix Print matrix in diagonal pattern Program to print the Diagonals of a Matrix Efficiently compute sums of diagonals of a matrix Print a given matrix in spiral form Array- Set2 K’th Smallest/Largest Element in Unsorted Array .   Minimum Number of Platforms Required for a Railway/Bus Station Run Length Enc...

C++ 11 Quizz

 Predict the output of the below set of programs [1]  #include <iostream> #include<memory> void foo(std::shared_ptr<int> i) {     (*i)++; } int main () {     auto ptr = std::make_shared<int>(23);     foo(ptr);     cout<<*ptr<<endl;     return 0; } [2] Can you change the baove program now using unique_ptr ? [3] #include <iostream> #include<memory> void foo(std::unique_ptr<int> i) {     (*i)++; } int main () {     auto ptr = std::make_unique<int>(23);     foo(ptr);     cout<<*ptr<<endl;     return 0; } [4]  void foo(std::unique_ptr<int> i) {     (*i)++;     cout<<" i am in foo() function"<<endl;     cout<<*i<<endl; } int main () {     auto ptr = std::make_unique<int>(23);     foo(std::move(ptr));     cout<...

Predict Output for C++ program

 Predict the output of the below set of programs [1] What is the issue with below program, it prints " After x = 20" where it is expected to print x = 50. Please fix it. #include <iostream> #include <thread> using namespace std; void fun(int x) {     cout<<"I am in thread function"<<endl;     cout<<"x="<<x<<endl;      x = 50; } int main() {     int x =20;     cout<<"Before x="<<x<<endl;     std::thread thobj(fun, std::ref(x));     cout<<"After x="<<x<<endl;     thobj.join();     return 0; } void foo() {     //...     char* p = new char[ 5 ];     p = "Hello";     free( p );     //... } Predict the output of the below program void fun(int &x) {     cout<<"I am in thread function"<<endl;     cout<<"x="<<x<<endl; ...