Posts

[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<...