Axis Bank Digital Relationship Manager Interview Questions

What do you mean by lambda functions and how to use them?

As a programming technique, lambda functions are small anonymous functions that are often used when a function needs to be executed for a very short period of time. An anonymous function is a function without a name and it is declared using the lambda keyword in Python. In many cases, this can be used whenever you want to pass a function as an argument to a higher-order function, i.e., to a function that accepts other functions as arguments.

Syntax:

Even when there is no return statement, the function simply returns the expression result. The lambda function can accept several arguments but is restricted to only one expression.

Here, lambda x: x+10 is the lambda function. ‘x’ is the argument x + 10 is evaluated and the result of the expression is returned.

Output:

  • Example2: This example illustrates how anonymous functions can be used within another function.
  • Here, we have a function addfunc that takes one argument num, where the argument is to be multiplied by a number x that is unknown.

    Output:

    1 What will be the output of the following code?

    Code:

    Output:

    Reason:

    In this case, the main() method is overloaded. The JVM (Java Virtual Machine), however, only understands methods that have a String[] argument in their definition. ScalerEdge, as a result, is printed in the output and the overloaded main method is ignored.

    What data type would you use if you wanted it to be immutable?

    Unlike mutable data types, immutable data types cannot be altered following their creation. Mutable data types can be changed after they have been created, but immutable data types cannot. A few examples of immutable data types include bytes, numeric data types, strings, frozen sets, and tuples.

    AMCAT is Indias largest employability test. Taking AMCAT can open up multiple job opportunities for you and it also provides you detailed employability feedback with suggested resources for improving your skills and increasing your chances of getting a job. If you want to know more about AMCAT, want to buy AMCAT or have any support related questions, please fill the form and you can chat with our agents who are online (during business hours). Email ID Please provide your email ID. First name Please provide your first name. Last name Please provide your last name. Mobile number Please provide your mobile number. Choose the topic of your chat Please select Query Type. Subject Please provide Subject.

    1 What are the SQL Constraints?

    In SQL, constraints specify the rules for table data. To limit the type of data that can be entered into a table, constraints are used. This ensures that the tables data is accurate and reliable. Data actions are aborted when a constraint is violated. Constraints may be defined at the column or table level. As the name implies, a column-level constraint is applied to a particular column, whereas a table-level constraint is applied to the entire table. Constraints can be specified when creating the table, or afterward using the ALTER TABLE statement.

    Syntax:

    Constraints available in SQL

  • NOT NULL: This constraint prevents us from storing null values in a column. If a column is set to NOT NULL, then the null value can no longer be stored in the given column.
  • UNIQUE: If a column is set to UNIQUE, then every value in the column must be unique. This means that no value should be repeated in the column.
  • PRIMARY KEY: A primary key of a table is a field that uniquely identifies each row within the table. This constraint specifies a field as a primary key in a table.
  • FOREIGN KEY: A foreign key of a table is a field that uniquely identifies each row of another table. This constraint specifies a field as a foreign key in a table.
  • CHECK: Using this constraint, the values of a column can be validated to meet a specific condition. This ensures that the value stored within a column meets a particular condition.
  • DEFAULT: This constraint sets a default value for the column when no user value is specified.
  • RELATIONSHIP MANAGER Interview Questions and ANSWERS!

    Related Posts

    Leave a Reply

    Your email address will not be published. Required fields are marked *