Find Interview Questions for Top Companies
Amplelogic Interview Questions and Answers
Ques:- What is the difference between synchronous and asynchronous code
Right Answer:
Synchronous code executes sequentially, meaning each operation must complete before the next one starts. Asynchronous code allows operations to run independently, enabling other tasks to proceed without waiting for the previous ones to finish.
Ques:- What are JavaScript closures and how do they work
Right Answer:
JavaScript closures are functions that remember their outer scope even when the function is executed outside that scope. They work by capturing the variables from their surrounding environment, allowing access to those variables even after the outer function has finished executing. This is useful for data encapsulation and maintaining state in asynchronous programming.
Ques:- What is the difference between var let and const in JavaScript
Right Answer:
`var` is function-scoped or globally-scoped and can be re-declared and updated. `let` is block-scoped, can be updated but not re-declared in the same scope. `const` is also block-scoped, cannot be updated or re-declared, and must be initialized at the time of declaration.
Ques:- What are some popular frontend frameworks and libraries
Right Answer:
Some popular frontend frameworks and libraries are:

1. React
2. Angular
3. Vue.js
4. Svelte
5. Bootstrap
6. jQuery
7. Ember.js
8. Backbone.js
Ques:- What is the difference between frontend and backend development
Right Answer:
Frontend development refers to the part of a website or application that users interact with directly, including the layout, design, and user interface. Backend development involves the server-side, focusing on databases, server logic, and application functionality that users do not see.
Ques:- What is a test pyramid? Give an example!
Right Answer:
A test pyramid is a concept in software testing that suggests organizing tests in a way that emphasizes having more low-level tests (like unit tests) at the bottom, fewer integration tests in the middle, and even fewer end-to-end tests at the top. For example, a typical test pyramid might consist of 70% unit tests, 20% integration tests, and 10% end-to-end tests.
Ques:- What is the advantage of using a PreparedStatement?
Asked In :- ctf, amplelogic,
Right Answer:
The advantage of using a PreparedStatement is that it helps prevent SQL injection attacks, improves performance by allowing the database to cache the query plan, and makes it easier to execute parameterized queries safely.
Ques:- How do I convert a string to a number?
Comments
Admin May 17, 2020

Python contains several built-in functions to convert values from one data type to another data type.
The int function takes string and coverts it to an integer.
>>>s = "1234" # s is string
>>>i = int(s) # string converted to int
>>>print i+2
-------------------------
1236
The float function converts strings into float number.
>>>s = "1234.22" # s is string
>>>i = float(s) # string converted to float
>>>print i
-------------------------
1234.22

Ques:- How to get all logged-in user list or count
Right Answer:
To get the count of all logged-in users in Django, you can use the `Session` model to filter sessions that are currently active. Here's a simple way to do it:

```python
from django.contrib.sessions.models import Session
from django.utils import timezone

# Get all active sessions
active_sessions = Session.objects.filter(expire_date__gte=timezone.now())

# Count of logged-in users
logged_in_user_count = active_sessions.count()
```

To get a list of logged-in users, you can extract the user IDs from the sessions:

```python
logged_in_users = [session.get_decoded().get('_auth_user_id') for session in active_sessions]
```
Ques:- How will you check in a string that all characters are in lowercase ?
Right Answer:
You can check if all characters in a string are lowercase by using the `islower()` method. For example:

```python
string = "yourstring"
is_all_lowercase = string.islower()
```
Ques:- Why to use Cursor in Sql Server?
Right Answer:
Cursors in SQL Server are used to retrieve and manipulate data row by row, allowing for operations that require processing of individual records, such as complex calculations or updates that cannot be easily achieved with set-based operations.
Ques:- What are DTS subroutines? What is their use and How do you write them?
Right Answer:
DTS (Data Transformation Services) subroutines are reusable blocks of code that can be called from within a DTS package to perform specific tasks or operations. They are used to encapsulate logic that can be reused across multiple packages, improving maintainability and reducing redundancy.

To write a DTS subroutine, you typically use VBScript or JScript. You define the subroutine in the "Global Variables" section of the DTS package, and it can be called from tasks or other subroutines within the package. Here's a simple example in VBScript:

```vbscript
Function MySubroutine()
' Your code here
MsgBox "Hello from MySubroutine!"
End Function
```

You can call this subroutine from a task by using the following syntax:

```vbscript
Call MySubroutine()
```
Ques:- Differences between webforms and MVC
Right Answer:
1. **Architecture**: WebForms uses a page-based event-driven model, while MVC follows a Model-View-Controller pattern.
2. **State Management**: WebForms maintains state through ViewState, whereas MVC is stateless and relies on HTTP requests.
3. **URL Routing**: MVC uses clean URLs with routing, while WebForms typically uses file-based URLs.
4. **Testability**: MVC is more testable due to its separation of concerns, while WebForms can be harder to unit test.
5. **Control Over HTML**: MVC provides more control over the generated HTML, while WebForms abstracts it away with server controls.
AmbitionBox Logo

What makes Takluu valuable for interview preparation?

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