Cognizant
200+ Dodla Dairy Interview Questions and Answers
Q1. 1 Tell me about your self 2 What is c# 3 What is oops concept 4 What is Delegate 5 Difference between polymorphism and what are its type 6 What is out and ref keyword 7 What is call by ref and call by value 8 W...
read moreInterview questions for Programmer Analyst position
C# is a programming language used for developing Windows applications
OOPS concepts include inheritance, encapsulation, abstraction, and polymorphism
Delegate is a type that represents references to methods with a specific parameter list and return type
Polymorphism is the ability of an object to take on many forms. Types include compile-time and runtime polymorphism
Out and ref keywords are used for passing arguments by referenc...read more
Q2. What is stack? How do you convert a queue to stack?
Stack is a data structure that follows LIFO (Last In First Out) principle. Converting a queue to stack requires dequeuing and pushing elements.
Stack is a collection of elements with two main operations: push and pop.
Push adds an element to the top of the stack, while pop removes the top element.
Converting a queue to stack requires dequeuing all elements and pushing them onto a stack.
Example: Queue: 1-2-3-4-5, Stack: 5-4-3-2-1
Q3. What is the difference between structure and class?
Structures are value types while classes are reference types.
Structures are allocated on stack while classes are allocated on heap.
Structures do not support inheritance while classes do.
Structures cannot have explicit parameterless constructors while classes can.
Structures are used for small data structures while classes are used for larger, more complex objects.
Example of structure: struct Point { int x, y; }
Example of class: class Person { string name; int age; }
Q4. Two defined table and fetching data is done one table has 20 records of 20 students another table has 10 student information if i want to pick the common record how to pick?
Use SQL JOIN to fetch common records from two tables.
Use SQL JOIN to combine the two tables based on a common column (e.g. student ID).
Select the columns you want to retrieve from both tables.
Use the WHERE clause to filter out the records that are common between the two tables.
Q5. What is the difference between RDBMS and DBMS? Explain database with a real life example of database.
RDBMS is a type of DBMS that uses a relational model to store and manage data.
DBMS is a general term for any software that manages data
RDBMS uses tables with rows and columns to store data
RDBMS enforces relationships between tables using keys
Example: MySQL, Oracle, SQL Server
Example of a database: a customer database for a retail store
Q6. Q1. Write a program to check whether the given String is pallindrome or not using two pointers approach in 3 mins?
Program to check if a given string is palindrome or not using two pointers approach.
Initialize two pointers, one at the start and one at the end of the string.
Compare the characters at both pointers and move them towards each other until they meet.
If all characters match, the string is a palindrome.
If any character doesn't match, the string is not a palindrome.
Q7. 1] Introduction 2] Explain automation framework in you project 3] Difference between Smoke, Sanity & Regression 4] Scenario based questions 5] Defect severity vs priority 6] BDD, Cucumber 7] Selenium basic ques...
read moreInterview questions for Programmer Analyst role
Explained automation framework used in the project
Differentiated between Smoke, Sanity & Regression testing
Answered scenario-based questions
Discussed defect severity vs priority
Explained BDD and Cucumber
Answered basic questions on Selenium
Q8. What is the difference between object storage and block storage?
Object storage stores data as objects while block storage stores data as blocks.
Object storage is ideal for unstructured data like images, videos, and documents.
Block storage is ideal for structured data like databases and virtual machines.
Object storage uses unique identifiers to access data while block storage uses block addresses.
Object storage is more scalable and cost-effective than block storage.
Examples of object storage include Amazon S3 and Google Cloud Storage while...read more
Q9. If i want to select uncommon records which does not match how to pick?
To select uncommon records that do not match, use the NOT IN or NOT EXISTS clause in SQL.
Use the NOT IN clause to select records that do not match a specific list of values.
Use the NOT EXISTS clause to select records that do not have a matching record in a subquery.
Example: SELECT * FROM table_name WHERE column_name NOT IN (value1, value2);
Example: SELECT * FROM table1 WHERE NOT EXISTS (SELECT * FROM table2 WHERE table1.id = table2.id);
Q10. How do you change region your deployed AWS EC2 instance?
To change region of deployed AWS EC2 instance, create an AMI of the instance and launch it in the desired region.
Create an AMI of the instance in the current region
Copy the AMI to the desired region
Launch the copied AMI in the desired region
Q11. Explain me about OOPS Concepts. Write a program in C++ to calculate Fibonacci Series. Write a program in C ++ to calculate Factorial. What is Call by value, Call by reference? Explain abstraction, encapsulation...
read moreOOPS Concepts, Fibonacci Series, Factorial, Call by value/reference, Abstraction, Encapsulation, Polymorphism, Switch, Router, Hub, OSI Model
OOPS Concepts include inheritance, polymorphism, encapsulation, and abstraction
Example of Fibonacci Series program: int fib(int n) { return (n <= 1) ? n : fib(n-1) + fib(n-2); }
Example of Factorial program: int fact(int n) { return (n == 1 || n == 0) ? 1 : n * fact(n-1); }
Call by value passes a copy of the variable, while call by referen...read more
Q12. Technical: SQL queries of join b/w three tables Sorting in descending order c program Full c code to print helloworld Little data structure,dbms Weakness HR: any movies or series recently watched and explain th...
read moreThe question asks for SQL queries for joining three tables, sorting in descending order in C program, and printing 'Hello, World!' in C.
To join three tables in SQL, use the JOIN keyword with appropriate conditions.
To sort in descending order in C, use the qsort() function with a custom comparison function.
To print 'Hello, World!' in C, use the printf() function with the desired message.
Q13. What are availability zones and regions in AWS?
Availability zones and regions are geographical locations in AWS data centers.
Availability zones are isolated locations within a region that contain their own power, cooling, and networking infrastructure.
Regions are separate geographic areas that consist of two or more availability zones.
Each region is completely independent and isolated from the others.
Customers can deploy resources in multiple availability zones to achieve high availability and fault tolerance.
Examples of ...read more
Q14. What is S3? What are the difference classes in S3?
S3 is a cloud-based object storage service provided by Amazon Web Services (AWS).
S3 stands for Simple Storage Service.
It allows users to store and retrieve data from anywhere on the web.
S3 offers different storage classes such as Standard, Infrequent Access, and Glacier.
Standard is for frequently accessed data, Infrequent Access is for data that is accessed less frequently, and Glacier is for long-term archival storage.
S3 also provides features like versioning, lifecycle poli...read more
Q15. If we have to return table, how to create a stored procedure?
To create a stored procedure that returns a table, use SELECT statement within the procedure.
Create a stored procedure using CREATE PROCEDURE statement.
Within the procedure, use SELECT statement to query the data and return the table.
Specify the columns to be returned in the SELECT statement.
Execute the stored procedure to retrieve the table data.
Q16. What is Object oriented programming? What are the 4 principal of Object oriented programming?
Object oriented programming is a programming paradigm that focuses on objects and their interactions to solve problems.
Encapsulation: bundling data and methods that operate on that data within a single unit.
Inheritance: creating new classes from existing ones, inheriting their properties and methods.
Polymorphism: the ability of objects to take on many forms, allowing them to be used in different ways.
Abstraction: hiding implementation details and only showing the necessary in...read more
Q17. What do you know about OOPS?
OOPS stands for Object-Oriented Programming System.
OOPS is a programming paradigm that focuses on objects and their interactions.
It emphasizes on encapsulation, inheritance, and polymorphism.
Encapsulation is the process of hiding implementation details from the user.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take on multiple forms or behaviors.
Examples of OOPS languages include Java, C++, Python, and Ruby.
Q18. What if a wheel of a car suddenly screws off while driving will u apply break suddenly ?
No, I would not apply the brake suddenly.
I would try to maintain control of the car by steering it to the side of the road or a safe area.
Applying the brake suddenly could cause the car to skid or lose control.
I would also turn on the hazard lights to alert other drivers of the situation.
Once the car is safely stopped, I would assess the damage and call for assistance if necessary.
Q19. 1. What is the difference between Inheritance and Abstract Class?
Inheritance is a way to create a new class from an existing class while Abstract Class is a class that cannot be instantiated.
Inheritance allows a subclass to inherit properties and methods from a superclass.
Abstract Class is used as a blueprint for other classes to inherit from.
An Abstract Class can have abstract methods that must be implemented by its subclasses.
Inheritance can create a hierarchy of classes with shared properties and methods.
An Abstract Class cannot be inst...read more
Q20. How flexibility can help, what are its advantages and disadvantages
Flexibility can bring advantages like adaptability and creativity, but can also lead to indecisiveness and lack of focus.
Flexibility allows for adaptability to changing situations and creativity in problem-solving.
It can also lead to indecisiveness and lack of focus if not balanced with structure and clear goals.
Advantages include increased resilience, better teamwork, and improved communication.
Disadvantages include potential for burnout and difficulty in prioritizing tasks....read more
Q21. 2. What are sealed classes and partial classes in C#?
Sealed classes cannot be inherited while partial classes allow a class to be divided into multiple files.
Sealed classes prevent inheritance and are used to restrict the class hierarchy.
Partial classes allow a class to be divided into multiple files for easier management.
Sealed classes are marked with the 'sealed' keyword while partial classes are marked with the 'partial' keyword.
Example of sealed class: 'sealed class MyClass {}'
Example of partial class: 'public partial class...read more
Q22. 3. What is the difference between method overloading and overriding?
Method overloading is having multiple methods with the same name but different parameters, while method overriding is having a subclass method with the same name and parameters as the superclass method.
Method overloading is used to provide different ways of calling the same method with different parameters.
Method overriding is used to provide a specific implementation of a method in a subclass that is already defined in the superclass.
Method overloading is resolved at compile...read more
Q23. 10. What is meant by Dependency injection in dot net?
Dependency injection is a design pattern used to remove dependencies between objects and make them more modular.
It allows objects to be created and configured externally, rather than within a class.
It helps to reduce coupling between classes and makes code more testable.
There are three types of dependency injection: constructor injection, property injection, and method injection.
Example: Instead of creating a database connection object within a class, it can be injected from ...read more
Q24. Can you mention some data structures? Explain Stack and Queue?
Data structures are ways to organize and store data. Stack and Queue are two commonly used data structures.
Stack is a Last-In-First-Out (LIFO) data structure where the last element added is the first one to be removed.
Queue is a First-In-First-Out (FIFO) data structure where the first element added is the first one to be removed.
Stack is used in undo-redo functionality, while Queue is used in scheduling tasks.
Examples of Stack include browser history, call stack in programmin...read more
Q25. Tell me what you know about AWS cloud.
AWS cloud is a platform that provides a wide range of cloud computing services.
AWS stands for Amazon Web Services
It offers services like computing, storage, databases, analytics, and more
AWS provides a pay-as-you-go pricing model
Examples of AWS services include EC2, S3, RDS, and Lambda
Q26. Swapping of two variables without using temporary variables
Swapping two variables without using temporary variables.
Use arithmetic operations to swap values
X = X + Y
Y = X - Y
X = X - Y
Q27. How to add moving images in flipkart?
Moving images can be added in Flipkart by using HTML and CSS animations.
Use HTML tag to insert the image
Apply CSS animations to create the moving effect
Use keyframes to define the animation behavior
Q28. Inverse of a number has to be found whose digits difference and sum was given.
To find the inverse of a number, calculate the difference and sum of its digits.
Iterate through each digit of the number to calculate the sum and difference.
Reverse the order of the digits to get the inverse number.
For example, if the number is 123, the sum of digits is 1+2+3=6 and the difference is 3-2-1=0. The inverse would be 321.
Q29. what do you mean by machine learning , how you implemented your project .
Machine learning is a subset of AI that enables machines to learn from data and improve their performance.
Machine learning involves training algorithms to make predictions or decisions based on data.
Supervised learning involves training a model on labeled data to make predictions on new data.
Unsupervised learning involves finding patterns in unlabeled data.
Reinforcement learning involves training a model to make decisions based on rewards or punishments.
Examples of machine le...read more
Q30. What are OOPS concepts and how will be used in problem solving?
OOPS concepts refer to Object-Oriented Programming principles like inheritance, encapsulation, polymorphism, and abstraction.
Inheritance allows a class to inherit properties and behavior from another class.
Encapsulation involves bundling data and methods that operate on the data into a single unit.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
Abstraction focuses on hiding the implementation details and showing only the necess...read more
Q31. 4. Write a LINQ query to find all the employees with salary greater than 25000?
LINQ query to find employees with salary > 25000
Use the 'where' clause to filter employees based on salary
Specify the condition for salary greater than 25000
Select the required employee details using 'select'
Example: var result = employees.Where(e => e.Salary > 25000).Select(e => new { e.Name, e.Department });
Q32. What is NoSQL and how is it different from RDBMS.
NoSQL is a non-relational database that stores and retrieves data in a flexible and scalable manner.
NoSQL databases are schema-less and do not require a fixed table structure like RDBMS.
NoSQL databases are horizontally scalable, meaning they can handle large amounts of data and traffic.
Examples of NoSQL databases include MongoDB, Cassandra, and Redis.
RDBMS databases are vertically scalable, meaning they can handle more traffic by adding more resources to a single server.
Examp...read more
Q33. Write a program in java to find the middle element in a list.
Java program to find the middle element in a list.
Create a list and add elements to it.
Find the size of the list using size() method.
Calculate the middle index using size()/2.
Retrieve the middle element using get() method.
Handle cases where the list has even number of elements.
Q34. What do know about Networking ?
Networking involves connecting devices to share resources and communicate with each other.
Networking is the practice of linking devices together to share resources and information.
It involves protocols such as TCP/IP, DNS, and DHCP.
Networking can be wired or wireless, and can be used for local or wide area connections.
Examples of networking devices include routers, switches, and modems.
Networking is essential for internet connectivity and cloud computing.
Q35. Logic behind tree and graphs codes?
Trees and graphs are used to represent hierarchical and non-linear relationships respectively in data structures and algorithms.
Trees are used to represent hierarchical relationships between data points, such as in file systems or organizational structures.
Graphs are used to represent non-linear relationships between data points, such as in social networks or transportation systems.
Both trees and graphs can be traversed using various algorithms, such as depth-first search or ...read more
Q36. Time complexity of nested for loop.
Time complexity of nested for loop.
The time complexity is O(n^k) where n is the size of the outer loop and k is the size of the inner loop.
Nested loops can lead to exponential time complexity.
Optimizing the inner loop can improve performance.
Q37. Writer any program in your preferred language.
I wrote a program in Python to calculate the factorial of a number.
Used a while loop to multiply the number with its previous value until it reaches 1
Implemented error handling for negative numbers and non-integer inputs
Q38. do you know python solve the particular piece of code and tell what will be the output
I am familiar with Python and can solve the given code snippet to determine the output.
Identify the code snippet provided
Analyze the syntax and logic used in the code
Execute the code in a Python environment to determine the output
Q39. Q2. Difference between supervised learning and unsupervised learning.
Supervised learning uses labeled data to train a model, while unsupervised learning uses unlabeled data to find patterns.
Supervised learning requires a target variable to be predicted, while unsupervised learning does not.
Supervised learning algorithms include linear regression, logistic regression, and decision trees.
Unsupervised learning algorithms include clustering, principal component analysis, and anomaly detection.
Supervised learning is used in applications such as ima...read more
Q40. What is space complexity?
Space complexity refers to the amount of memory used by an algorithm.
It is a measure of how much memory an algorithm needs to solve a problem.
It is usually expressed in terms of the amount of memory used by the algorithm as a function of the size of the input.
Space complexity can be affected by the data structures used in the algorithm.
For example, an algorithm that uses a hash table will have a higher space complexity than one that uses a simple array.
Q41. Q3. Implement a min stack program in 5 mins.
A min stack program is implemented to find the minimum element in a stack in constant time.
Create two stacks, one for storing the elements and the other for storing the minimum values.
Push the elements onto the stack and also push the minimum value onto the minimum stack if it is smaller than the current minimum.
When popping an element from the stack, also pop the top element from the minimum stack if it is the same as the popped element.
The minimum value can be obtained by p...read more
Q42. What is difference between procedurea and functions and how they work
Procedures and functions are both subroutines in programming, but functions return a value while procedures do not.
Procedures are used to perform a specific task and do not return a value.
Functions are used to perform a specific task and return a value.
Procedures are called using the CALL statement, while functions are called by assigning their return value to a variable.
Functions can be used in expressions, while procedures cannot.
Functions can have parameters, while procedu...read more
Q43. Given an array, write a code to check which number is prime number.
Code to check prime numbers in an array
Iterate through each number in the array
For each number, check if it is divisible by any number from 2 to the square root of the number
If the number is only divisible by 1 and itself, it is a prime number
Q44. what is linked list and array list what is your preference for data manupulation and all
Linked list and array list are data structures used for storing and manipulating collections of data. Linked list allows for dynamic size and efficient insertion/deletion, while array list provides fast random access.
Linked list is a data structure where each element points to the next element in the list. Example: singly linked list, doubly linked list.
Array list is a data structure that stores elements in contiguous memory locations. Example: ArrayList in Java, List in C#.
L...read more
Q45. 7. Difference between viewbag, viewdata and Tempdata in ASP.NET MVC?
ViewBag, ViewData and TempData are used to pass data between controller and view in ASP.NET MVC.
ViewBag is a dynamic object used to pass data from controller to view.
ViewData is a dictionary object used to pass data from controller to view.
TempData is a dictionary object used to pass data from one controller action to another.
ViewBag and ViewData are short-lived and can only be used to pass data from controller to view.
TempData is used to pass data between controller actions ...read more
Q46. 5. Difference between Primary key and Unique key in SQL?
Primary key uniquely identifies a record in a table, while Unique key ensures uniqueness of a column.
Primary key cannot have null values, while Unique key can have one null value.
A table can have only one Primary key, but multiple Unique keys.
Primary key is automatically indexed, while Unique key is not necessarily indexed.
Q47. 6. Difference between Temptable and table variable in sql server?
Temptable is a physical table created in tempdb while table variable is a variable created in memory.
Temptable is used for large data sets or complex queries
Table variable is used for small data sets or simple queries
Temptable can be indexed and have constraints while table variable cannot
Temptable can be accessed by multiple sessions while table variable is limited to the current session
Q48. Tell me some technologies that were used in IT industry
Technologies used in IT industry include cloud computing, artificial intelligence, blockchain, and internet of things.
Cloud computing: AWS, Azure, Google Cloud
Artificial intelligence: Machine learning, natural language processing
Blockchain: Bitcoin, Ethereum
Internet of things: Smart homes, wearables
Q49. write a prog to find whether the no is palindrome or not.
Program to check if a number is a palindrome or not.
Convert the number to a string to easily check for palindrome
Reverse the string and compare it with the original string
If they are the same, the number is a palindrome
Q50. Difference between a motor and generator?
A motor converts electrical energy into mechanical energy, while a generator converts mechanical energy into electrical energy.
Motors use electrical energy to create motion, while generators use motion to create electrical energy.
Motors have a rotor and a stator, while generators have a stator and a rotor.
Examples of motors include electric fans, washing machines, and power tools, while examples of generators include wind turbines and hydroelectric dams.
Q51. Libraries used in pythons and how do use it.
Python has a vast collection of libraries for various purposes. Some popular ones are NumPy, Pandas, Matplotlib, and Scikit-learn.
NumPy is used for numerical computing and data analysis.
Pandas is used for data manipulation and analysis.
Matplotlib is used for data visualization.
Scikit-learn is used for machine learning and data mining.
To use a library, it must be imported at the beginning of the code using the 'import' statement.
For example, to use NumPy, we can write 'import ...read more
Q52. 1. If this a (showed an obj) and this is b, write a code to add both and get results
Code to add two objects and get results
Use the + operator to add the values of the objects
Ensure that the objects have compatible data types for addition
Handle any potential errors or exceptions that may occur during the addition
Q53. Difference between sql and sql server?
SQL is a language used to manage databases, while SQL Server is a Microsoft product that includes a database management system.
SQL is a language used to interact with databases, while SQL Server is a Microsoft product that includes a database management system.
SQL can be used with various database management systems like MySQL, Oracle, etc., while SQL Server is specific to Microsoft.
SQL is a standard language for querying and managing databases, while SQL Server provides addi...read more
Q54. Write a simple on how to find prime number in a series of a numbers
To find prime numbers in a series, iterate through each number and check if it's divisible by any number other than 1 and itself.
Start iterating through the series of numbers
For each number, check if it's divisible by any number other than 1 and itself
If it's not divisible by any other number, it's a prime number
Keep track of all the prime numbers found
Q55. Q4. Find the output of the given recursive code
Output of a given recursive code
Understand the logic of the recursive function
Trace the function calls and their return values
Identify the base case and recursive case
Check for any errors or infinite loops
Q56. Explain the Quicksort algorithm. Steps only.
Quicksort is a divide-and-conquer algorithm that sorts an array by partitioning it into two sub-arrays, then recursively sorting the sub-arrays.
Choose a pivot element from the array.
Partition the array into two sub-arrays, with elements less than the pivot in one sub-array and elements greater than the pivot in the other sub-array.
Recursively apply the quicksort algorithm to each sub-array.
Combine the sorted sub-arrays to obtain the final sorted array.
Q57. A program to check if the number is Palindrome or not.
A program to check if a number is Palindrome or not.
Convert the number to a string
Reverse the string
Compare the original string with the reversed string
If they are equal, the number is a palindrome
If not, the number is not a palindrome
Q58. 1) what is capture action and record action in AA?
Capture action is used to extract data from an application while record action is used to automate user actions.
Capture action is used to capture data from an application's UI elements such as text boxes, drop-downs, etc.
Record action is used to record user actions such as mouse clicks, keyboard inputs, etc. to automate them later.
Capture action is used in conjunction with data scraping to extract data from web pages or desktop applications.
Record action is used to create aut...read more
Q59. Explain how recursion works with example?
Recursion is a programming technique where a function calls itself to solve a problem.
Recursion involves breaking down a problem into smaller subproblems and calling the function recursively to solve them.
Each recursive call works on a smaller input until a base case is reached to stop the recursion.
Example: Factorial calculation, Fibonacci sequence, tree traversal.
Q60. Write a pseducode for printing a 5 rows triangle having element as star .
Pseducode for printing a 5 rows triangle with star elements.
Use nested loop to print the triangle
The outer loop will iterate for 5 rows
The inner loop will print the stars for each row
The number of stars to print will increase with each row
Q61. What are the benefits of using python ?
Python is a versatile programming language known for its simplicity, readability, and vast library support.
Easy to learn and use, making it ideal for beginners and experienced programmers alike
Has a large standard library with built-in modules for various tasks, reducing the need for external libraries
Supports multiple programming paradigms, including procedural, object-oriented, and functional programming
Cross-platform compatibility allows code to run on different operating ...read more
Q62. Write a code to covert smaller case to upper case within a mixed word
Code to convert lowercase to uppercase within a mixed word
Iterate through each character in the word
Check if the character is lowercase using ASCII values
If lowercase, convert to uppercase using ASCII values
Q63. What is the difference between a linked list and Graph
Linked list is a linear data structure where elements are linked using pointers, while a graph is a non-linear data structure consisting of nodes and edges.
Linked list is a collection of nodes where each node contains data and a reference to the next node.
Graph is a collection of nodes (vertices) and edges that connect these nodes.
Linked list is used for implementing data structures like stacks, queues, and hash tables.
Graph is used to represent relationships between differen...read more
Q64. 8. Can a method in C# return multiple values?
Yes, a method in C# can return multiple values using tuples.
Tuples can be used to return multiple values from a method.
Tuples can be declared with the 'Tuple' class or using shorthand syntax.
Example: (int, string) method() { return (1, 'hello'); }
Deconstructing tuples can be used to access individual values.
Q65. Function to find the length of string without inbuilt function
Use a loop to iterate through the characters of the string and count them.
Create a function that takes a string as input.
Initialize a counter variable to 0.
Use a loop to iterate through each character of the string and increment the counter.
Return the counter as the length of the string.
Q66. Explain react in website making?
React is a JavaScript library for building user interfaces.
React allows developers to create reusable UI components.
It uses a virtual DOM for efficient rendering.
React can be used to build single-page applications.
React is maintained by Facebook and a community of developers.
React can be combined with other libraries like Redux for state management.
Q67. Explain and list linux commands used to on a day-to-day basis.
Common Linux commands used by Programmer Analysts on a daily basis.
ls - list directory contents
cd - change directory
pwd - print working directory
grep - search for patterns in files
cat - concatenate and display files
chmod - change file permissions
rm - remove files or directories
mkdir - create directories
tar - archive files
ssh - secure shell access
Q68. What is the data type of get colour activity?
The data type of get colour activity is string.
The data type of get colour activity is most likely a string, as it typically represents a color name or code.
Examples of possible data types for get colour activity include 'red', 'blue', '#FFFFFF', etc.
Q69. What is difference between while and Do while
While loop checks the condition before executing the code block, while Do while loop executes the code block first and then checks the condition.
While loop is entry controlled, Do while loop is exit controlled
While loop may not execute at all if the condition is false initially, Do while loop executes at least once
Example: while loop - while(i < 5) { //code } vs. do { //code } while(i < 5)
Q70. Explain Framework structure that you have worked on your previous organization?
I have worked on a MVC framework structure in my previous organization.
Utilized Model-View-Controller architecture for organizing code
Separated business logic (Model), presentation (View), and user input (Controller)
Examples: Laravel, Ruby on Rails, Spring MVC
Q71. What is OOP, explain Polymorphism, Abstaction
OOP is a programming paradigm based on objects and classes. Polymorphism allows objects to be treated as instances of their parent class. Abstraction hides implementation details.
OOP stands for Object-Oriented Programming, where data and behavior are encapsulated within objects.
Polymorphism allows objects of different classes to be treated as objects of a common superclass. For example, a Dog and Cat class both inheriting from Animal class.
Abstraction is the concept of hiding...read more
Q72. 11. What is CORS attack?
CORS attack is a type of security exploit where a malicious website gains access to data on another website.
CORS stands for Cross-Origin Resource Sharing
It occurs when a website allows access to its resources from other domains without proper security measures
Attackers can use this vulnerability to steal sensitive data or perform actions on behalf of the user
Prevention measures include setting proper CORS headers and using authentication tokens
Q73. Which Layer in ISO OSI Model handles security
The security layer in the ISO OSI Model is the Presentation Layer.
The Presentation Layer is responsible for encryption, decryption, and data compression.
It ensures that data is securely transmitted between applications.
Examples of security protocols at this layer include SSL (Secure Sockets Layer) and TLS (Transport Layer Security).
Q74. What is cia triad, cybersecurity, cryptography
The CIA Triad is a foundational concept in cybersecurity that consists of three core principles: confidentiality, integrity, and availability.
Confidentiality ensures that data is only accessible to authorized individuals or systems.
Integrity ensures that data is accurate and has not been tampered with.
Availability ensures that data and systems are accessible when needed.
Cryptography is the practice of secure communication in the presence of third parties.
Examples of cryptogra...read more
Q75. Explain Agile. How it is different from waterfall
Agile is an iterative approach to software development that focuses on delivering small, incremental releases.
Agile involves breaking down projects into small, manageable chunks called sprints
It emphasizes collaboration, flexibility, and customer feedback throughout the development process
In Agile, requirements and solutions evolve through the collaborative effort of self-organizing and cross-functional teams
Unlike waterfall, Agile allows for changes to be made at any point i...read more
Q76. How to integrate the website with API?
To integrate a website with an API, you need to establish a connection between the two and define the data exchange format.
Identify the API endpoints and methods needed for the website functionality
Create a developer account and obtain API keys or tokens
Implement the API calls in the website code using a programming language or framework
Define the data exchange format, such as JSON or XML
Handle errors and exceptions in the API calls
Test the integration thoroughly before deplo...read more
Q77. tell me different ways to introduce infinite loop
Different ways to introduce infinite loop in programming
Using while loop with condition that always evaluates to true
Using for loop with condition that never becomes false
Using recursion without a base case
Using goto statement to jump back to the beginning of the loop
Q78. write some loop statements in any programming lang you know and explain it line by line.
Examples of loop statements in programming languages with line by line explanation.
For loop in Python: for i in range(5): print(i) - iterates over numbers 0 to 4 and prints each number.
While loop in Java: int i = 0; while(i < 5) { System.out.println(i); i++; } - prints numbers 0 to 4 using a while loop.
Do-while loop in C++: int i = 0; do { cout << i; i++; } while(i < 5); - prints numbers 0 to 4 using a do-while loop.
Q79. Write a code to print your name
Code to print name
Use a print statement to output the name
Enclose the name in quotes
Separate first and last name with a space
Q80. what is long form iof SQL.
Long form of SQL is Structured Query Language.
SQL stands for Structured Query Language
It is a standard language for accessing and manipulating databases
Commonly used commands include SELECT, INSERT, UPDATE, DELETE
Q81. 9. Difference between out and ref in C#?
Out and ref are both used for passing parameters by reference in C#. Out is used for output parameters while ref is used for both input and output parameters.
Out parameters are used to return values from a method while ref parameters are used to pass values to and from a method.
Out parameters must be assigned a value inside the method while ref parameters must be assigned a value before being passed to the method.
Out parameters are declared using the 'out' keyword while ref p...read more
Q82. What does Finalize method do in java
The finalize() method in Java is used to perform cleanup operations before an object is garbage collected.
Finalize method is called by the garbage collector before reclaiming the memory occupied by an object.
It can be used to release system resources like closing files or sockets.
It is not recommended to rely on finalize() for resource cleanup as it is not guaranteed to be called.
Q83. For Java all oops concepts and differences between static,private,final keywords
Java OOPs concepts include inheritance, polymorphism, encapsulation, and abstraction. Static, private, and final keywords have specific uses in Java programming.
Inheritance allows a class to inherit properties and behavior from another class. Example: class B extends A {}
Polymorphism allows objects to be treated as instances of their parent class. Example: Animal a = new Dog();
Encapsulation hides the internal state of an object and only allows access through methods. Example:...read more
Q84. Any questions?
Yes, I have a few questions regarding the company culture and team dynamics.
Can you tell me more about the team I will be working with?
What is the company's approach to professional development?
How does the company foster collaboration and communication among teams?
What is the company's policy on work-life balance?
Q85. What is an interpreted language
An interpreted language is a type of programming language that executes instructions directly, without the need for compilation.
Interpreted languages are executed line by line, translating each line into machine code at runtime.
Examples of interpreted languages include Python, Ruby, and JavaScript.
Interpreted languages are generally slower than compiled languages, as they do not undergo a separate compilation step.
Q86. Explain healthcare ? Copay deductable and coinsurance
Healthcare copay, deductible, and coinsurance are key components of out-of-pocket costs for medical services.
Copay is a fixed amount paid by the patient for each medical service or prescription.
Deductible is the amount the patient must pay out of pocket before the insurance company starts covering costs.
Coinsurance is the percentage of costs shared between the patient and the insurance company after the deductible is met.
Q87. Compile time polymorphism vs runtime polymorphism
Compile time polymorphism is method overloading while runtime polymorphism is method overriding.
Compile time polymorphism is resolved at compile time while runtime polymorphism is resolved at runtime.
Method overloading is an example of compile time polymorphism while method overriding is an example of runtime polymorphism.
Compile time polymorphism is faster than runtime polymorphism as it is resolved at compile time.
Runtime polymorphism is more flexible than compile time poly...read more
Q88. Technological advancements in distributed file systems.
Distributed file systems have advanced with features like fault tolerance, scalability, and data consistency.
Distributed file systems allow for data to be stored across multiple servers and accessed from anywhere.
Advancements include fault tolerance to ensure data availability even if a server fails.
Scalability allows for easy expansion as data storage needs grow.
Data consistency ensures that all nodes in the system have the same view of the data.
Examples of distributed file ...read more
Q89. Difference between Linked list and array list?
Linked list is a dynamic data structure while array list is a static data structure.
Linked list can grow or shrink dynamically while array list has a fixed size.
Linked list uses pointers to connect nodes while array list uses indexes to access elements.
Insertion and deletion operations are faster in linked list while accessing elements is faster in array list.
Linked list is suitable for implementing stacks, queues, and graphs while array list is suitable for implementing list...read more
Q90. What is introduced in java 8
Java 8 introduced lambda expressions, functional interfaces, streams, and default methods.
Lambda expressions allow functional programming in Java.
Functional interfaces are interfaces with a single abstract method.
Streams provide a way to process collections of data in a functional way.
Default methods allow interfaces to have method implementations.
Date and Time API improvements.
Nashorn JavaScript engine.
Type annotations.
Parallel array sorting.
Base64 encoding and decoding.
Opti...read more
Q91. Latest technologies and mainly their usage
Latest technologies and their usage
Artificial Intelligence and Machine Learning for automation and predictive analysis
Blockchain for secure and transparent transactions
Internet of Things for connected devices and data collection
Virtual and Augmented Reality for immersive experiences
5G for faster and more reliable communication
Cloud Computing for scalable and cost-effective solutions
Q92. Explain joins in detail and their types.
Joins are used to combine data from two or more tables based on a related column.
Types of joins include inner join, left join, right join, and full outer join.
Inner join returns only the matching rows from both tables.
Left join returns all rows from the left table and matching rows from the right table.
Right join returns all rows from the right table and matching rows from the left table.
Full outer join returns all rows from both tables, with NULL values for non-matching rows...read more
Q93. Why is java platform independent
Java is platform independent due to its bytecode and JVM.
Java code is compiled into bytecode which is platform-neutral.
JVM (Java Virtual Machine) interprets the bytecode and executes it on any platform.
JVM acts as an abstraction layer between the code and the underlying hardware.
This allows Java programs to run on any platform that has a JVM installed.
For example, a Java program written on a Windows machine can run on a Linux machine without any modifications.
Q94. Call by value and call by reference difference
Call by value passes a copy of the value while call by reference passes the memory address of the value.
Call by value passes a copy of the value to the function while call by reference passes the memory address of the value.
In call by value, any changes made to the parameter inside the function do not affect the original value outside the function.
In call by reference, any changes made to the parameter inside the function affect the original value outside the function.
Call by...read more
Q95. What is most popular in language
Python is currently the most popular programming language.
Python is widely used for web development, data analysis, artificial intelligence, and scientific computing.
It has a large and active community, extensive libraries, and easy syntax.
Examples of companies using Python include Google, Facebook, Instagram, and Spotify.
Q96. what is the difference between knowldge and wisdom
Knowledge is information gained through learning, while wisdom is the ability to apply that knowledge in a meaningful way.
Knowledge is theoretical, while wisdom is practical.
Knowledge is acquired through education and experience, while wisdom is gained through reflection and introspection.
Knowledge is objective, while wisdom is subjective.
Examples: Knowing how to drive a car is knowledge, but knowing when to drive and when not to drive is wisdom. Knowing the facts about a dis...read more
Q97. How to perform type casting in Java
Type casting in Java is the process of converting one data type into another.
Use the syntax (newType) variableName to perform type casting.
Type casting can be done implicitly or explicitly.
Explicit type casting is done by the programmer and may result in data loss if the new type cannot hold the original value.
Q98. What is ML and random forest classifier
ML stands for Machine Learning, a subset of AI that uses algorithms to learn from data and make predictions. Random Forest is an ensemble learning method that creates multiple decision trees and combines their predictions.
ML is a subset of AI that uses algorithms to learn from data and make predictions
Random Forest is an ensemble learning method that creates multiple decision trees and combines their predictions
Random Forest is used for classification and regression tasks
Rand...read more
Q99. What about python language?
Python is a high-level programming language known for its simplicity and readability.
Python is widely used for web development, data analysis, artificial intelligence, and scientific computing.
It has a large standard library and supports multiple programming paradigms.
Python code is easy to read and maintain, making it a popular choice for beginners and experienced programmers alike.
Q100. difference between spring versus spring boot
Spring is a framework for building Java applications, while Spring Boot is an extension that simplifies the setup and development process.
Spring is a comprehensive framework that provides various modules for building Java applications.
Spring Boot is an extension of the Spring framework that simplifies the setup and development process by providing defaults and auto-configuration.
Spring Boot includes embedded servers, which makes it easier to deploy applications.
Spring Boot re...read more
More about working at Cognizant
Top HR Questions asked in Dodla Dairy
Interview Process at Dodla Dairy
Top Programmer Analyst Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month