Enable contrast version

Tutor profile: Inder C.

Inactive
Inder C.
Software developer
Tutor Satisfaction Guarantee

Questions

Subject: Python Programming

TutorMe
Question:

What are lambda functions in python?

Inactive
Inder C.
Answer:

The Lambda function is an anonymous function in python. They are defined without a name. They can have any number of arguments, but can only have a single expression. An example of the same is: addition = lambda a,b : a+b print(addition(2,4)) #output: 6

Subject: Databases

TutorMe
Question:

Explain the ACID properties of transactions in DBMS?

Inactive
Inder C.
Answer:

A transaction is simply a set of tasks done on a database. For example, sending money from your account to your friend's account is a transaction. Database Management System follows certain properties, widely known as ACID properties, to maintain the availability and consistency of data in the database. Consider an example transaction to explain ACID properties -> Person A sends the money to Person B's account. Atomicity (A) -> It states that either full transaction should happen or nothing happens. There shouldn't be a stage. In the above example, either money from Person A's account is deducted and credited to Person B's account or no transaction happens at all. Consistency (C) -> Before and after the transaction, the integrity of data should be maintained. For example, if 200$ were debited from A's account that exact 200$ should be credited to B's account to ensure that database is in a consistent state. Isolation (I) -> If multiple transactions are going on, then those transactions should not see the intermediate state of other transactions as that can cause inconsistency on a database. So, for these transactions that run concurrently, we can provide a serialized order of these transactions. For example, if another transaction is happening along with the above example, either that transaction sees money completely transferred or none at all. Durability (D) -> Once the transaction is completed, it ensures that changes persist in the database even if there is a system failure or a restart. In the above example, even if there is a system failure, the transaction will not be reversed.

Subject: C++ Programming

TutorMe
Question:

What are different ways to pass an argument in a function?

Inactive
Inder C.
Answer:

There are majorly three ways to do so: 1. Pass by value -> Only value is sent. The variable value in the parent function does not change. This is done in the following way: void func(int a) { a=10; } int main() { int a=5; func(a); cout<<a<<endl; //outputs: 5 return 0; } 2. Pass by reference -> Variable's reference is sent to the function. This changes the variable value in the parent function as well. This is done in the following way: void func(int &a) { a=10; } int main() { int a=5; func(a); cout<<a<<endl; //outputs: 10 return 0; } 3. Pass by address -> Here, we send the address of the variable to the calling function. This changes the variable value in the parent function. This is done in the following way: void func(int *a) { *a=10; } int main() { int a=5; func(&a); cout<<a<<endl; //outputs: 10 return 0; }

Contact tutor

Send a message explaining your
needs and Inder will reply soon.
Contact Inder

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.
BEST IN CLASS SINCE 2015
TutorMe homepage
Made in California by Zovio
© 2013 - 2021 TutorMe, LLC
High Contrast Mode
On
Off