Find Interview Questions for Top Companies
South australia police Interview Questions and Answers
Ques:- What is the difference between REST and SOAP APIs
Right Answer:
REST (Representational State Transfer) is an architectural style that uses standard HTTP methods and is typically more lightweight and easier to use, while SOAP (Simple Object Access Protocol) is a protocol that relies on XML for message format and has strict standards for security and transactions. REST is generally more flexible and faster, while SOAP is more suited for enterprise-level services requiring high security and reliability.
Ques:- What is the role of an API Gateway in microservices architecture
Right Answer:
An API Gateway acts as a single entry point for clients to access multiple microservices, handling requests, routing them to the appropriate services, managing authentication, rate limiting, and aggregating responses.
Ques:- What is an API and how does it work
Right Answer:
An API (Application Programming Interface) is a set of rules and protocols that allows different software applications to communicate with each other. It defines the methods and data formats that applications can use to request and exchange information. APIs work by sending requests from one application to another, which then processes the request and sends back a response.
Ques:- What is OAuth and how does it work in API authentication
Right Answer:
OAuth is an open standard for access delegation commonly used for token-based authentication and authorization. It allows third-party applications to access a user's resources without sharing their credentials.

In API authentication, OAuth works by having the user authorize the application to access their data. The process involves:

1. The user is redirected to an authorization server to log in and grant permission.
2. The authorization server issues an access token to the application.
3. The application uses this access token to make API requests on behalf of the user.
4. The API validates the token and grants access to the requested resources.
Ques:- What are Webhooks and how do they differ from APIs
Right Answer:
Webhooks are user-defined HTTP callbacks that are triggered by specific events in a web application, allowing real-time data transfer. They differ from APIs in that APIs require a request to be made to receive data, while webhooks automatically send data when an event occurs without needing a request.
Ques:- Write Expression Evaluator (2*3 ^ 7 etc),
Asked In :- south australia police,
Right Answer:
Here is a simple implementation of an expression evaluator in Python that can handle basic arithmetic operations, including exponentiation:

```python
def evaluate_expression(expression):
import re

# Define the precedence of operators
precedence = {'^': 3, '*': 2, '/': 2, '+': 1, '-': 1}

def apply_operator(operators, values):
right = values.pop()
left = values.pop()
operator = operators.pop()
if operator == '+':
values.append(left + right)
elif operator == '-':
values.append(left - right)
elif operator == '*':
values.append(left * right)
elif operator == '/':
values.append(left / right)
elif operator == '^':
values.append(left ** right)

def evaluate(tokens):
values = []
operators = []
i = 0
while i < len(tokens):
if tokens[i].isdigit():
values.append(int
Ques:- What is the physical storage length of each of the following DB2 data types:
Right Answer:
The physical storage length of the following DB2 data types is:

- CHAR(n): n bytes
- VARCHAR(n): Length of the string + 2 bytes
- GRAPHIC(n): 2n bytes
- VARGRAPHIC(n): Length of the string in double-byte characters + 4 bytes
- INTEGER: 4 bytes
- SMALLINT: 2 bytes
- BIGINT: 8 bytes
- DECIMAL(p,s): Depends on p; up to 16 bytes
- FLOAT: 8 bytes
- DATE: 4 bytes
- TIME: 3 bytes
- TIMESTAMP: 10 bytes
AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users