Protonshub Technologies
CandorWorks Interview Questions and Answers
Q1. Why do we before_save call first and before_create after it?
before_save is called first to perform any necessary actions before saving the record, and before_create is called after it to perform actions specific to record creation.
before_save is a callback method that is triggered before a record is saved to the database.
before_create is a callback method that is triggered before a new record is created and saved to the database.
The order of these callbacks allows for performing general actions before saving and specific actions befor...read more
Q2. Difference between stored procedure and function. What are limitations of struct over class Coding question related to inheritance
Stored procedures are precompiled SQL queries stored in the database, while functions are reusable code blocks that return a value.
Stored procedures are used for performing specific tasks in the database, while functions are used to return a single value.
Stored procedures can contain multiple SQL statements, while functions contain a single SQL statement.
Stored procedures can have input and output parameters, while functions can only have input parameters.
Stored procedures ca...read more
Q3. What is the difference b/w SOAP and REST?
SOAP is a protocol while REST is an architectural style for web services.
SOAP uses XML for messaging while REST uses JSON or XML.
SOAP requires more bandwidth and processing power than REST.
REST is more flexible and scalable than SOAP.
SOAP has built-in error handling while REST relies on HTTP error codes.
SOAP is commonly used in enterprise applications while REST is used for web-based applications.
Q4. what is redux management
Redux management is a state management tool for JavaScript apps, allowing for centralized state management and predictable state changes.
Centralized state management for React applications
Stores the entire state of the application in a single immutable object
State changes are made through actions and reducers
Helps in managing complex state logic and data flow in large applications
Q5. what is settimeout
setTimeout is a function in JavaScript that executes a specified function or code snippet after a specified delay.
setTimeout is used to delay the execution of a function or code snippet.
It takes two parameters: a function to be executed and a delay time in milliseconds.
Example: setTimeout(() => { console.log('Delayed message') }, 2000) will log 'Delayed message' after 2 seconds.
Q6. what is interval
Interval is a time period between two specified points.
Interval is a duration of time between two specific points.
It can be used in programming to execute a function at regular intervals.
For example, setInterval() function in JavaScript is used to repeatedly execute a function at specified intervals.
Q7. what is context api
Context API is a feature in React that allows sharing data between components without having to pass props through every level of the component tree.
Context API provides a way to pass data through the component tree without having to pass props down manually at every level.
It is useful for sharing global data such as themes, user authentication, or language preferences.
Context API consists of three main parts: Provider, Consumer, and useContext hook.
Example: Using Context API...read more
Q8. Limitation of struct over class
Structs are limited in terms of inheritance, access control, and polymorphism compared to classes.
Structs do not support inheritance, while classes do.
Structs have limited access control (public by default), while classes can have private, protected, and public members.
Structs do not support polymorphism, while classes can have virtual functions for runtime polymorphism.
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month