Skip to main content

Posts

Showing posts with the label interview

Git Commands

Question:  Configure Git   Answer:  git config --global user.name "Your Name"    git config --global user.email "your.email@example.com" Question:  Create a new Git repository   Answer:  git init Question:   Clone a remote repository to your local machine   Answer:  git clone <repository_url> Question:   Check the status of your working directory and staging area Answer:  git status Question:   Add changes to the staging area Answer:  git add <file_name>  # To stage a specific file    git add .            # To stage all changes Question:   Commit changes to the repository with a descriptive message Answer: git commit -m "Your commit message here" Question:   Push changes to a remote repository Answer:     git push origin <branch_name> Question:   Pull changes from a remote repository Answer:     git pull origin <branch_name> Question:   Create a new branch Answer:     git branch <branch_name> Question:   Switch to an existing

Git MCQ

Question : What is Git? A version control system A programming language An operating system A web browser Correct Answer :  A version control system    Question : How do you create a new Git repository? `git init` `git create` `git new` `git repo init` Correct Answer :  `git init`    Question : How do you clone an existing Git repository? `git clone <repository_url>` `git pull <repository_url>` `git checkout <repository_url>` `git fetch <repository_url>` Correct Answer :  `git clone <repository_url>`    Question : How do you stage changes in Git? `git add .` `git commit -m 'message'` `git stage .` `git push` Correct Answer :  `git add .`    Question : How do you commit changes in Git? `git commit -m 'message'` `git add .` `git push` `git commit -a -m 'message'` Correct Answer :  `git commit -m 'message'`    Question : How do you check the status of your Git repository? `git status` `git info` `git check` `git show` Correct A

API Questions

Question:  What is API Answer:  API stands for Application Programming Interface . It is a set of rules and protocols that allows different software applications to communicate with each other. APIs define the methods and data formats that developers can use to request and exchange information between applications, services, or systems. Question:  API Examples Answer:  API Call      Action GET /users      List all users  GET /users?name={username} Get user by username GET /users/{id} -   Get user by ID  GET /users/{id}/configurations    Get all configurations for user POST /users/{id}/configurations     Create - a new configuration for user DELETE /users/{id}/configurations/{id}   Delete configuration for user PATCH /users/{id}/configuration/{id}   Update configuration for use Question: Explain API Gateway Answer:  An API Gateway is a server or service that acts as an intermediary between an application or client and a collection of microservices or backend services. It serves as a c