Add office photos
Engaged Employer

Cognizant

3.8
based on 47k Reviews
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

100+ Vivid Edge Interview Questions and Answers

Updated 29 Nov 2024
Popular Designations

Q1. Check for syntax error/logical error and correct the error to get the desired output. void maxReplace(int size,int *inputList) { int i,sum=0; for(i=0;i

Ans.

Fix syntax and logical errors in maxReplace function

  • Change 'o' to '0' in second for loop

  • Replace sum with inputList[i] in second for loop

  • Add a condition to check if inputList[i] is greater than sum in second for loop

  • Print sum instead of inputList[i] in third for loop

View 6 more answers
Q2. Alien dictionary

You have been given a sorted (lexical order) dictionary of an alien language. Write a function that finds the order of characters in the alien language. This dictionary will be given to you in t...read more

View 2 more answers

Q3. if you promised a customer for the product on a specific day and your company will not be able to give that product on time then how will you convince that customer ?

Ans.

I would apologize for the delay and offer a solution or compensation.

  • Acknowledge the inconvenience caused to the customer

  • Explain the reason for the delay and assure them that steps are being taken to resolve it

  • Offer a solution or compensation to make up for the delay

  • Maintain open communication with the customer throughout the process

Add your answer

Q4. What are OOP characteristics? Difference between abstraction and encapsulation? What are types of polymorphism ?4 to 5 Question on projects which I have mentioned in cv. Write a program to find the prime factor...

read more
Ans.

Answering questions related to OOP characteristics, polymorphism, and programming projects.

  • OOP characteristics include inheritance, encapsulation, abstraction, and polymorphism.

  • Abstraction is the process of hiding implementation details while encapsulation is the process of hiding data.

  • Types of polymorphism include compile-time and runtime polymorphism.

  • Projects mentioned in CV were discussed and explained.

  • A program to find prime factors of a number can be written using a loop...read more

Add your answer
Discover Vivid Edge interview dos and don'ts from real experiences

Q5. Why is java platform independent?

Ans.

Java is platform independent due to its bytecode and JVM.

  • Java code is compiled into bytecode which is platform-independent.

  • JVM (Java Virtual Machine) interprets the bytecode and executes it on any platform.

  • This eliminates the need for recompilation of code for different platforms.

  • For example, a Java program compiled on Windows can run on Linux or Mac without any changes.

  • This makes Java highly portable and flexible.

View 11 more answers
Q6. Star Pattern

Pattern for N = 4


The dots represent spaces.



Input Format :
N (Total no. of rows) 
Output Format :
Pattern in N lines 
Constraints :
0 <= N <= 50 
Add your answer
Are these interview questions helpful?

Q7. Which programming language are you familiar with? what are the datasets in python what is the difference between list and tuple in python? write a program to find number of white spaces in a given string? what ...

read more
Ans.

Answering questions related to programming language Python.

  • I am familiar with Python programming language.

  • Datasets in Python include NumPy, Pandas, and SciPy.

  • List is mutable while Tuple is immutable in Python.

  • Program to find number of white spaces in a given string: def count_spaces(string): return string.count(' ')

  • While loop executes a block of code as long as the condition is true, for loop executes a block of code for a specific number of times.

Add your answer

Q8. If you have given a 1 kg cake and you have given 3 chance to cut and you have to distribute among 8 people how will you do that? condition is that you have to distribute it equally among 8 people.

Ans.

Divide 1 kg cake equally among 8 people in 3 cuts.

  • Cut the cake into 8 equal pieces using 2 cuts.

  • Stack the pieces and cut them in half using the third cut.

  • Distribute the 16 pieces among 8 people.

View 1 answer
Share interview questions and help millions of jobseekers 🌟

Q9. What is the difference between Method and Function in programming language?

Ans.

Method and Function are both blocks of code that perform a specific task, but the main difference is that a method is associated with an object while a function is not.

  • A method is called on an object, while a function is called independently.

  • A method can modify the state of an object, while a function cannot.

  • A method is defined within a class, while a function is defined outside of a class.

  • Example of a method: object.methodName()

  • Example of a function: functionName()

View 1 answer

Q10. Write a program to check whether a string starts with 's' and if it starts with it convert it into an array named anything and print that array one by one.

Ans.

Program to check if a string starts with 's' and convert it to an array

  • Use string method startsWith() to check if the string starts with 's'

  • If it starts with 's', use split() method to convert it into an array

  • Loop through the array and print each element

Add your answer

Q11. Write a program to check whether a given integer is a prime or not and even or odd and it should not give any errors for any kind of inputs.

Ans.

Program to check if an integer is prime, even or odd without errors.

  • Take input integer from user

  • Check if input is valid integer

  • Check if input is prime or not

  • Check if input is even or odd

  • Display the result

Add your answer

Q12. Write a c program which will display your name in first line and from second line one word will be lesser from the previous line. Display this until one word remains

Ans.

The program will display the name of the user in the first line and then decrease one word in each subsequent line until only one word remains.

  • Create an array of strings containing the user's name split into individual words

  • Use a loop to iterate through the array and print the name with one less word in each iteration

  • Continue the loop until only one word remains

Add your answer

Q13. An sql query to find salary, department of employee

Ans.

An SQL query to find the salary and department of an employee.

  • Use the SELECT statement to retrieve the desired columns.

  • Specify the table name and join it with the department table using the appropriate join condition.

  • Use the WHERE clause to filter the results based on employee criteria if needed.

Add your answer

Q14. Which programming language you like the most and why?

Ans.

I like Python the most because of its simplicity and versatility.

  • Python has a simple syntax which makes it easy to learn and use.

  • It has a vast library of modules and frameworks for various purposes.

  • Python is used in various fields such as web development, data science, and automation.

  • It supports both object-oriented and functional programming paradigms.

  • Python is also known for its readability and maintainability of code.

  • For example, I have used Python for web scraping, data a...read more

Add your answer

Q15. what is the output for the given code sample explain

Ans.

The output of the code sample is 'Hello World'.

  • The code sample is likely to print a string.

  • The string being printed is 'Hello World'.

Add your answer

Q16. What error will you get if you enter a duplicate value to the primary key column

Ans.

You will get a primary key violation error if you enter a duplicate value to the primary key column.

  • A primary key is a unique identifier for each record in a database table.

  • When you try to insert a duplicate value into the primary key column, the database system will throw an error.

  • The error message will typically indicate a primary key violation or duplicate key error.

  • To resolve the issue, you need to ensure that each value in the primary key column is unique.

View 1 answer

Q17. Explain how the Software Development process works ? And what is it that we are following now a days ?

Ans.

Software development process involves planning, designing, coding, testing, and deployment of software.

  • Requirement gathering and analysis

  • Designing the software architecture

  • Coding and implementation

  • Testing and debugging

  • Deployment and maintenance

  • Agile methodology is commonly followed nowadays

View 1 answer

Q18. Find third lowest element from an array and count the occurrence of that number in the array.

Ans.

Find third lowest element and its occurrence in an array.

  • Sort the array and return the element at index 2 with its count.

  • Use a hash table to count occurrences while iterating through the array.

Add your answer

Q19. What is R programming? What is Public class? What are access specifiers? Write a array program and explain it for nested loop concept?

Ans.

R programming is a language and environment for statistical computing and graphics.

  • R programming is widely used for data analysis, statistical modeling, and visualization.

  • Public class in programming refers to a class that can be accessed from outside the package.

  • Access specifiers in programming define the accessibility of classes, methods, and variables.

  • An array program using nested loops can be used to iterate through a multi-dimensional array.

Add your answer
Q20. Aptitude Question

There was a star and at each vertex, there was a number on each vertice the number was not given so we have to find the missing number.

Add your answer

Q21. Under 'If' statement if more than 1 statements are there and curly brackets is not there then what will be the output?

Ans.

If more than 1 statements are under 'If' statement without curly brackets, what will be the output?

  • The first statement after 'if' will be executed

  • The second statement will be executed regardless of the condition

  • It can lead to unexpected behavior and bugs

  • Always use curly brackets to avoid confusion

Add your answer

Q22. What is machine learning, deep learning, artificial intelligence and cloud computing?

Ans.

Machine learning, deep learning, artificial intelligence and cloud computing are all related to advanced computing technologies.

  • Machine learning is a subset of AI that involves training algorithms to make predictions or decisions based on data.

  • Deep learning is a subset of machine learning that uses neural networks to learn and make decisions.

  • Artificial intelligence is the broader field of creating intelligent machines that can perform tasks that typically require human intell...read more

Add your answer

Q23. What are star and mesh topology?

Ans.

Star and mesh are network topologies used in computer networking.

  • Star topology connects all devices to a central hub or switch.

  • Mesh topology connects every device to every other device.

  • Star topology is easy to set up and troubleshoot.

  • Mesh topology is highly reliable and fault-tolerant.

  • Examples of star topology include Ethernet and Wi-Fi networks.

  • Examples of mesh topology include sensor networks and peer-to-peer networks.

Add your answer

Q24. What is the advantage of using netbeans for writing java ?

Ans.

NetBeans provides a user-friendly interface, powerful code editing features, and seamless integration with Java development tools.

  • NetBeans offers a user-friendly interface with drag-and-drop functionality for easy development.

  • It provides powerful code editing features like code completion, refactoring, and debugging.

  • NetBeans has seamless integration with Java development tools, making it easier to build, test, and deploy Java applications.

  • It supports various frameworks and te...read more

View 1 answer

Q25. As i am from ECE, difference between half duplex and full duplex

Ans.

Half duplex allows communication in both directions, but not simultaneously. Full duplex allows simultaneous communication in both directions.

  • Half duplex allows communication in both directions, but only one direction at a time.

  • Full duplex allows simultaneous communication in both directions.

  • Examples of half duplex communication include walkie-talkies and CB radios.

  • Examples of full duplex communication include telephone conversations and video conferencing.

Add your answer

Q26. What is difference between RDBMS and DBMS? What is differenence between stack and queue?

Ans.

RDBMS is a relational database management system that stores data in tables with predefined relationships. DBMS is a general-purpose database management system that stores data in various formats.

  • RDBMS enforces ACID properties while DBMS does not

  • RDBMS supports SQL while DBMS may or may not support SQL

  • RDBMS is used for large-scale applications while DBMS is used for small-scale applications

  • Stack is a LIFO data structure while Queue is a FIFO data structure

  • Stack uses push and p...read more

Add your answer

Q27. Tell about encoder, decoder and Multiplexer

Ans.

Encoders, decoders, and multiplexers are digital logic circuits used in data processing and communication systems.

  • An encoder is a circuit that converts a set of input signals into a coded output signal.

  • A decoder is a circuit that converts a coded input signal into a set of output signals.

  • A multiplexer is a circuit that selects one of many input signals and forwards it to a single output line.

  • Encoders and decoders are often used together to convert data between different forma...read more

Add your answer

Q28. Tell me some of the features of Java?

Ans.

Java is a popular programming language known for its platform independence and object-oriented features.

  • Java is platform independent, meaning it can run on any platform with a Java Virtual Machine (JVM)

  • Java is object-oriented, allowing for encapsulation, inheritance, and polymorphism

  • Java has automatic memory management through garbage collection

  • Java has a rich set of APIs and libraries for various tasks, such as networking and GUI development

  • Java supports multithreading, allo...read more

View 1 answer

Q29. Query to select the row of any table

Ans.

Query to select a row from any table

  • Use SELECT statement with WHERE clause to specify the row to be selected

  • Specify the table name and column names in the SELECT statement

  • Use appropriate conditions in the WHERE clause to filter the rows

  • Example: SELECT * FROM table_name WHERE column_name = value;

Add your answer

Q30. Write the any coding in c language?

Ans.

Here is a simple example of a C program that prints 'Hello, World!'

  • Declare a main function

  • Use the printf function to print 'Hello, World!'

  • Return 0 to indicate successful execution

View 1 answer

Q31. What is an object?can you explain with an example?

Ans.

An object is an instance of a class that encapsulates data and behavior.

  • Objects have attributes (data) and methods (behavior).

  • Objects can interact with each other through method calls.

  • Example: A car object has attributes like color, make, and model, and methods like start and stop.

  • Objects promote code reusability and modularity.

Add your answer

Q32. What is a latch-up in communications?

Ans.

Latch-up is a phenomenon in which a circuit becomes stuck in a high-current state.

  • It occurs when a parasitic thyristor is inadvertently created within a circuit

  • It can cause permanent damage to the circuit

  • It can be prevented by using proper design techniques and layout

  • Example: A latch-up can occur in a microcontroller when a voltage spike causes the input to exceed the maximum rating

Add your answer

Q33. What is encapsulation

Ans.

Encapsulation is the process of hiding implementation details and providing a public interface for accessing the functionality.

  • Encapsulation helps in achieving data abstraction and information hiding

  • It prevents unauthorized access to the internal details of an object

  • It allows for better control over the data and its behavior

  • Example: A bank account class may have private variables for account number and balance, but provide public methods for deposit and withdrawal

  • Example: A c...read more

Add your answer

Q34. what are oops and explain them with real time example?

Ans.

OOPs stands for Object-Oriented Programming. It is a programming paradigm based on the concept of objects.

  • OOPs is based on the concept of classes and objects.

  • It focuses on encapsulation, inheritance, and polymorphism.

  • Real-time examples of OOPs include a car, a bank account, and a smartphone.

  • In a car, the engine, wheels, and other components are objects, and the car itself is a class.

  • In a bank account, the account holder's name, account number, and balance are objects, and the...read more

Add your answer

Q35. what is a circular linked list?

Ans.

A circular linked list is a linked list where the last node points to the first node, forming a loop.

  • Each node has a pointer to the next node and the last node points to the first node

  • Traversal can start from any node and continue until the starting node is reached again

  • Used in applications where data needs to be accessed in a circular manner, such as a playlist

Add your answer

Q36. What is the main features of object oriented programming?

Ans.

Object oriented programming features include encapsulation, inheritance, and polymorphism.

  • Encapsulation: bundling of data and methods that operate on that data within a single unit

  • Inheritance: ability of a class to inherit properties and methods from a parent class

  • Polymorphism: ability of objects to take on multiple forms or behaviors depending on the context

  • Example: Java, C++, Python

Add your answer

Q37. What is the difference between primary and secondary winding

Ans.

Primary winding is the input coil while secondary winding is the output coil in a transformer.

  • Primary winding is connected to the input voltage source

  • Secondary winding is connected to the load

  • Primary winding has fewer turns than secondary winding

  • Secondary winding has higher voltage than primary winding

Add your answer

Q38. Give some examples where mechanical engineering and IT can work together.

Ans.

Mechanical engineering and IT can work together in various fields.

  • Designing and simulating mechanical systems using computer-aided design (CAD) software

  • Developing and implementing control systems for mechanical devices using programming languages

  • Using sensors and data analysis to optimize mechanical systems

  • Creating virtual reality simulations for training and testing mechanical systems

  • Developing software for 3D printing and additive manufacturing

  • Integrating IT systems with ma...read more

Add your answer

Q39. Difference between Java and c++?

Ans.

Java is a high-level, object-oriented programming language, while C++ is a low-level, general-purpose programming language.

  • Java is platform-independent, while C++ is platform-dependent.

  • Java has automatic memory management (garbage collection), while C++ requires manual memory management.

  • Java supports multithreading and exception handling by default, while C++ requires explicit implementation.

  • Java has a simpler syntax and is easier to learn, while C++ offers more control and p...read more

View 2 more answers

Q40. What is Repeater in Communications?

Ans.

A repeater is a device that receives a signal and retransmits it at a higher power or to an extended range.

  • Repeater is used to extend the range of a signal in communication.

  • It receives a signal and amplifies it before retransmitting it.

  • It can be used in radio, television, and telephone communication.

  • Example: Wi-Fi range extenders act as repeaters to boost the signal strength and extend the coverage area.

Add your answer

Q41. Give the logic of push and pop in stacks?

Ans.

Push adds an element to the top of the stack and pop removes the top element from the stack.

  • Push increases the stack size by 1 and places the new element at the top.

  • Pop removes the top element and decreases the stack size by 1.

  • Stack follows LIFO (Last In First Out) principle.

Add your answer

Q42. What are oops and explain all briefly?

Ans.

Object-oriented programming concepts including encapsulation, inheritance, polymorphism, and abstraction.

  • Encapsulation: bundling data and methods that operate on the data into a single unit (class)

  • Inheritance: ability of a class to inherit properties and behavior from another class

  • Polymorphism: ability to present the same interface for different data types

  • Abstraction: hiding the complex implementation details and showing only the necessary features

Add your answer

Q43. Do you want to work in Testing though seems like you have a good coding background?

Ans.

Yes, I am open to working in Testing despite having a strong coding background.

  • I believe that having experience in testing will make me a more well-rounded programmer.

  • Working in testing will help me understand the software development process from a different perspective.

  • I am open to learning new skills and gaining experience in different areas of software development.

Add your answer

Q44. What is normalisation in SQL, write a SQL query to select contents from a table.

Ans.

Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Normalization involves breaking down a table into smaller tables and defining relationships between them.

  • There are different levels of normalization, with each level having specific rules to follow.

  • A SQL query to select contents from a table would be: SELECT * FROM table_name;

  • Normalization helps to prevent data inconsistencies and anomalies.

  • Normalization can improve d...read more

Add your answer

Q45. What are the steps to create a table in SQL and display the output?

Ans.

Steps to create a table in SQL and display the output

  • Connect to the database using a tool like SQL Server Management Studio

  • Write a CREATE TABLE statement with table name and column definitions

  • Execute the SQL query to create the table

  • Use SELECT * FROM table_name to display the table output

Add your answer

Q46. what do you mean by tcp/ip?

Ans.

TCP/IP stands for Transmission Control Protocol/Internet Protocol. It is a set of protocols that allows computers to communicate over the internet.

  • TCP/IP is a suite of communication protocols used for transmitting data over networks.

  • It provides reliable, connection-oriented communication between devices.

  • TCP is responsible for breaking data into packets, ensuring they are delivered in order and error-free.

  • IP handles the addressing and routing of packets across the internet.

  • Exa...read more

Add your answer

Q47. What is bst? What is different typr of binary tree?

Ans.

BST stands for Binary Search Tree. It is a type of binary tree used for searching and sorting operations.

  • BST is a binary tree where each node has at most two children.

  • In a BST, the left subtree of a node contains only nodes with keys lesser than the node's key, and the right subtree contains only nodes with keys greater than the node's key.

  • Some examples of BST are AVL tree, Red-Black tree, and Splay tree.

Add your answer

Q48. Write the code block to print 4 stars , 3stars, 2stars, 1 star line by line ?

Ans.

Code block to print decreasing number of stars line by line

  • Use a loop to iterate from 4 to 1

  • Inside the loop, print the number of stars based on the current iteration

  • Use string concatenation to print the stars on the same line

Add your answer

Q49. What is artificial intelligence?

Ans.

Artificial intelligence is the simulation of human intelligence processes by machines, especially computer systems.

  • AI involves machines learning from data, recognizing patterns, and making decisions.

  • Examples include virtual assistants like Siri, self-driving cars, and recommendation systems like Netflix.

  • AI can be categorized into narrow AI (specific tasks) and general AI (human-like intelligence).

Add your answer

Q50. explain hello world in details why public static is used why it it important

Ans.

public static is used in Java to define a method that can be called without creating an instance of the class.

  • public static is used in Java to define a method that belongs to the class itself, rather than to any specific instance of the class.

  • public static methods can be called directly using the class name, without needing to create an object of the class.

  • In the 'Hello World' program, public static is used to define the main method, which is the entry point of the program.

  • Us...read more

Add your answer

Q51. How to add two numbers without using + operator?

Ans.

Adding two numbers without using + operator

  • Use bitwise operators like XOR, AND, and left shift to perform addition

  • Addition can be done recursively until there is no carry left

  • Example: 5 + 3 = 8 can be done as 5 XOR 3 = 6, 5 AND 3 = 1, 1 left shift 1 = 2, 6 + 2 = 8

Add your answer

Q52. write a code to swap 2 numbers without using pointer, using function

Ans.

Code to swap 2 numbers without using pointer, using function

  • Create a function that takes two integer parameters

  • Inside the function, swap the values of the parameters using a temporary variable

  • Return the swapped values

  • Call the function and pass the two numbers to be swapped as arguments

Add your answer

Q53. What will you do if the technology you are working obsoletes.

Ans.

I will adapt and learn new technologies to stay relevant in the industry.

  • Research and analyze emerging technologies

  • Attend training and workshops to learn new skills

  • Collaborate with colleagues to share knowledge and expertise

  • Update resume and portfolio to showcase new skills

  • Stay proactive and open-minded towards change

Add your answer

Q54. what is form factor, difference between generator and alternator

Ans.

Form factor is the ratio of RMS value to average value of a waveform. Generator converts mechanical energy to electrical energy while alternator converts electrical energy to mechanical energy.

  • Form factor is a measure of waveform distortion

  • Generator produces DC or AC power by converting mechanical energy

  • Alternator produces AC power by converting mechanical energy

  • Generator has a commutator while alternator has slip rings

  • Examples of generators are hydroelectric power plants and...read more

Add your answer

Q55. Prime numbers coding question in any language?

Ans.

A prime number is a number that is only divisible by 1 and itself.

  • Loop through numbers 2 to n-1 and check if n is divisible by any of them

  • Use the modulo operator to check for divisibility

  • Optimization: only check up to the square root of n

Add your answer

Q56. What is inheritance in Java?

Ans.

Inheritance is a mechanism in Java where a class acquires the properties and methods of another class.

  • It allows for code reusability and promotes a hierarchical structure of classes.

  • The subclass inherits all the non-private members (fields, methods) of the superclass.

  • The keyword 'extends' is used to create a subclass.

  • Example: class Dog extends Animal { ... }

  • Multiple inheritance is not allowed in Java.

Add your answer

Q57. Do you know C Programming?

Ans.

Yes, I know C Programming.

  • I have experience in writing programs in C language.

  • I am familiar with the syntax and structure of C language.

  • I have worked on projects using C language, such as developing a simple calculator program.

  • I am comfortable with concepts such as pointers, arrays, and structures in C language.

Add your answer

Q58. Program to print the prime numbers between 1 to n

Ans.

Program to print prime numbers between 1 to n.

  • Iterate from 2 to n and check if each number is prime

  • A number is prime if it is only divisible by 1 and itself

  • Use a nested loop to check if the number is divisible by any number between 2 and itself-1

  • If not divisible, print the number as prime

Add your answer

Q59. Explain any two OOPs concept with real life example?

Ans.

Encapsulation and Inheritance are two OOPs concepts with real-life examples.

  • Encapsulation: Wrapping data and methods into a single unit. Example: A car's engine is encapsulated as a single unit, and the driver only interacts with it through the dashboard controls.

  • Inheritance: Creating a new class from an existing class. Example: A sports car is a subclass of a car, inheriting all the properties and methods of a car but with additional features specific to sports cars.

Add your answer

Q60. Explain linked list,stack and queue concept

Ans.

Linked list, stack, and queue are data structures used to store and manipulate data.

  • Linked list is a collection of nodes where each node points to the next node. Example: Singly linked list, Doubly linked list.

  • Stack is a LIFO (Last In First Out) data structure. Example: Undo/Redo functionality in text editors.

  • Queue is a FIFO (First In First Out) data structure. Example: Print queue in a printer.

Add your answer

Q61. Whats the difference between sql union and union all

Ans.

SQL UNION combines and removes duplicates, UNION ALL combines without removing duplicates.

  • UNION merges the results of two or more SELECT statements into a single result set

  • UNION ALL includes all the rows from each SELECT statement, including duplicates

  • UNION removes duplicates from the result set, while UNION ALL does not

  • UNION requires the same number of columns in all SELECT statements, while UNION ALL does not have this requirement

Add your answer

Q62. What is dynamic memory allacation and its types ?

Ans.

Dynamic memory allocation is the process of allocating memory during runtime.

  • It allows programs to allocate memory as needed, rather than at compile time.

  • Types include malloc(), calloc(), realloc(), and free().

  • malloc() allocates a block of memory of specified size.

  • calloc() allocates a block of memory for an array of elements, initializing them to zero.

  • realloc() changes the size of a previously allocated block of memory.

  • free() deallocates the memory previously allocated by mal...read more

Add your answer

Q63. What is an Integrated Circuit?

Ans.

An Integrated Circuit is a miniaturized electronic circuit consisting of interconnected semiconductor devices.

  • ICs are used in almost all electronic devices

  • They can be analog, digital or mixed-signal

  • ICs can be classified as SSI, MSI, LSI or VLSI based on the number of transistors they contain

  • Examples of ICs include microprocessors, memory chips, and amplifiers

Add your answer

Q64. What is shortest path algorithm

Ans.

Shortest path algorithm is used to find the shortest path between two points in a graph.

  • It is commonly used in GPS navigation systems.

  • Dijkstra's algorithm and Bellman-Ford algorithm are two popular shortest path algorithms.

  • The algorithm works by exploring all possible paths and selecting the one with the lowest cost.

  • The cost can be distance, time, or any other metric depending on the problem.

  • Shortest path algorithms are used in various fields such as transportation, network r...read more

Add your answer

Q65. Explain the Oops concepts in detail with real-world examples.

Ans.

Object-oriented programming concepts with real-world examples.

  • Encapsulation: Hiding implementation details of a class. Example: A car's engine is encapsulated.

  • Inheritance: A class inheriting properties and methods from another class. Example: A dog is an animal.

  • Polymorphism: Ability of an object to take many forms. Example: A shape can be a circle, square, or triangle.

  • Abstraction: Focusing on essential features of an object. Example: A TV remote has buttons for essential func...read more

Add your answer

Q66. What is primary key and foriegn key

Ans.

Primary key uniquely identifies a record in a table, while foreign key refers to a field in another table.

  • Primary key is used to enforce data integrity and ensure uniqueness of records

  • Foreign key is used to establish a relationship between two tables

  • Example: CustomerID in Orders table is a foreign key that references the Customer table's primary key

  • Foreign key constraints ensure referential integrity

Add your answer

Q67. What is the difference between c and c++?

Ans.

C++ is an extension of C with object-oriented programming features.

  • C++ supports object-oriented programming while C does not.

  • C++ has classes and templates while C does not.

  • C++ has better support for exception handling than C.

  • C++ has a standard library that includes many useful functions.

  • C++ is more complex than C and can be harder to learn.

Add your answer

Q68. Write a program to check for palindrome.

Ans.

A program to check if a given string is a palindrome or not.

  • Remove all spaces and convert the string to lowercase for accurate results.

  • Compare the first and last characters of the string, then move towards the center.

  • If all characters match, the string is a palindrome.

  • If any character doesn't match, the string is not a palindrome.

Add your answer

Q69. What is example of python IDE ?

Ans.

PyCharm is a popular Python IDE.

  • PyCharm is a powerful and feature-rich IDE for Python development.

  • It provides intelligent code completion, debugging tools, and version control integration.

  • Other examples of Python IDEs include Visual Studio Code, Spyder, and Jupyter Notebook.

View 1 answer

Q70. Why we use object oriented programming?

Ans.

Object oriented programming allows for modular, reusable, and maintainable code.

  • Encapsulation allows for data hiding and protects code from external interference.

  • Inheritance allows for code reuse and promotes consistency.

  • Polymorphism allows for flexibility and extensibility.

  • Objects can be easily tested and debugged.

  • Object oriented programming promotes code organization and readability.

  • Examples include Java, Python, and C++.

Add your answer

Q71. What is inheritance and why we use it?

Ans.

Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.

  • Inheritance allows code reusability and saves time and effort in writing new code.

  • The existing class is called the parent or base class, and the new class is called the child or derived class.

  • The child class inherits all the properties and methods of the parent class and can also add new properties and methods.

  • For example, a class 'Vehicle' can ...read more

Add your answer

Q72. write a basic query to fetch data from a table ?

Ans.

Basic query to fetch data from a table in SQL

  • Use SELECT statement to fetch data

  • Specify the columns you want to retrieve after SELECT

  • Specify the table name after FROM

Add your answer

Q73. Why we are doing normalization ?

Ans.

Normalization is done to eliminate data redundancy and improve data integrity.

  • To avoid data duplication

  • To reduce storage space

  • To improve data consistency

  • To prevent update anomalies

  • To simplify queries

  • To follow database design principles

  • To ensure data accuracy and reliability

Add your answer

Q74. What are cypher technique and explain cypher

Ans.

Cypher is a cryptographic technique used to encrypt and decrypt data.

  • Cypher is a method of encoding information to keep it secure from unauthorized access.

  • It involves using algorithms to transform plaintext into ciphertext, and vice versa.

  • Examples of cypher techniques include AES, DES, and RSA.

Add your answer

Q75. What is object oriented programming language

Ans.

Object oriented programming language is a type of programming language that uses objects and classes to organize code.

  • Uses objects and classes to model real-world entities

  • Encapsulates data and behavior within objects

  • Supports inheritance, polymorphism, and encapsulation

  • Examples include Java, C++, Python

Add your answer

Q76. Write a Query to find the prime number upto n using python

Ans.

Query to find prime numbers up to n using Python

  • Use a for loop to iterate through numbers up to n

  • Check if each number is prime by dividing it by numbers up to its square root

  • If the number is only divisible by 1 and itself, it is prime

Add your answer

Q77. What is method Overloading and method overriding

Ans.

Method overloading is when multiple methods have the same name but different parameters. Method overriding is when a subclass provides a specific implementation of a method that is already provided by its superclass.

  • Method overloading allows a class to have multiple methods with the same name but different parameters.

  • Method overriding occurs in a subclass when a method has the same name, return type, and parameters as a method in its superclass.

  • Example of method overloading: ...read more

Add your answer

Q78. Projects done, write a code whether a number is odd or even

Ans.

Code to check if a number is odd or even

  • Use the modulo operator (%) to check if the remainder is 0 or 1

  • If remainder is 0, number is even. If remainder is 1, number is odd

  • Example: int num = 5; if(num % 2 == 0) { //even number } else { //odd number }

Add your answer

Q79. What is dbms and what are joins please explain.

Ans.

DBMS stands for Database Management System. Joins are used to combine rows from two or more tables based on a related column between them.

  • DBMS is a software system that allows users to define, create, maintain and control access to databases.

  • Joins in DBMS are used to retrieve data from multiple tables based on a related column between them.

  • Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.

  • Example: SELECT * FROM table1 INNER JOIN table2 ON table1.c...read more

Add your answer

Q80. What are the different types of joins in SQL?

Ans.

Different types of joins in SQL include inner join, left join, right join, and full outer join.

  • Inner join: Returns rows when there is a match in both tables.

  • Left join: Returns all rows from the left table and the matched rows from the right table.

  • Right join: Returns all rows from the right table and the matched rows from the left table.

  • Full outer join: Returns rows when there is a match in either table.

Add your answer

Q81. What are the types of index

Ans.

Indexes are used to improve database performance. There are mainly two types of indexes: clustered and non-clustered.

  • Clustered index determines the physical order of data in a table. A table can have only one clustered index.

  • Non-clustered index is a separate structure from the data table that stores the indexed columns and a pointer to the data row.

  • Other types of indexes include unique, full-text, filtered, and XML indexes.

  • Indexes can be created on one or more columns of a ta...read more

Add your answer

Q82. Can you write the code for bubble sort ?

Ans.

Bubble sort is a simple sorting algorithm that repeatedly steps through the list, compares adjacent elements and swaps them if they are in the wrong order.

  • Start by comparing the first two elements of the array and swap them if necessary

  • Continue comparing adjacent elements and swapping them until the entire array is sorted

  • Repeat this process for each element in the array until no more swaps are needed

Add your answer

Q83. What is difference between tupple and list?

Ans.

Tuples are immutable and ordered collections, while lists are mutable and ordered collections in Python.

  • Tuples are created using parentheses () while lists are created using square brackets []

  • Tuples are immutable, meaning their elements cannot be changed once assigned, while lists are mutable and can be modified

  • Tuples are faster than lists for accessing elements, but lists are more flexible for operations like adding or removing elements

  • Example: tuple = (1, 2, 3) and list = [...read more

Add your answer

Q84. Tell me something about image processing

Ans.

Image processing involves manipulating digital images to improve their quality or extract useful information.

  • Image enhancement: improving the quality of an image by adjusting brightness, contrast, etc.

  • Image restoration: removing noise or other imperfections from an image.

  • Image segmentation: dividing an image into multiple segments for analysis.

  • Object detection: identifying and locating objects within an image.

  • Pattern recognition: identifying patterns or objects based on prede...read more

Add your answer

Q85. what technology you want to work with

Ans.

I am interested in working with web development technologies such as JavaScript, React, and Node.js.

  • JavaScript

  • React

  • Node.js

Add your answer

Q86. How wifi works how Bluetooth works

Ans.

WiFi and Bluetooth are wireless communication technologies that allow devices to connect and exchange data.

  • WiFi uses radio waves to transmit data over a network, typically using a router or access point.

  • Bluetooth uses short-range radio waves to connect devices directly to each other.

  • WiFi operates on a larger scale, covering larger areas and allowing multiple devices to connect simultaneously.

  • Bluetooth operates on a smaller scale, typically connecting two devices in close prox...read more

Add your answer

Q87. What do you know about Big data tech

Ans.

Big data tech refers to technologies and tools used to process and analyze large volumes of data to extract valuable insights.

  • Big data tech includes tools like Hadoop, Spark, and Kafka for processing and storing large datasets.

  • It involves technologies like data mining, machine learning, and predictive analytics to extract insights from data.

  • Big data tech is used in various industries like finance, healthcare, and e-commerce to make data-driven decisions.

  • Examples of big data a...read more

Add your answer

Q88. Can you explain the 4 pillars of oops

Ans.

The 4 pillars of OOP are Abstraction, Encapsulation, Inheritance, and Polymorphism.

  • Abstraction: Hiding implementation details and showing only necessary information.

  • Encapsulation: Binding data and functions together to protect data from outside interference.

  • Inheritance: Creating new classes from existing ones, inheriting properties and methods.

  • Polymorphism: Using a single interface to represent different types of objects.

Add your answer

Q89. What is the rating of a transformer ?

Ans.

The rating of a transformer refers to its power capacity and is typically expressed in volt-amperes (VA) or kilovolt-amperes (kVA).

  • The rating of a transformer determines the maximum amount of power it can handle.

  • It is important to select a transformer with a rating that matches the power requirements of the load.

  • Transformer ratings can vary widely depending on the application, from small transformers used in electronic devices to large power transformers used in electrical gr...read more

Add your answer

Q90. What is front end ,sql ,c language, css,html, db

Ans.

Front end refers to the user interface of a software application. SQL is a database management language. C is a programming language. CSS and HTML are used for designing web pages. DB stands for database.

  • Front end - user interface of software

  • SQL - database management language

  • C - programming language

  • CSS/HTML - used for designing web pages

  • DB - stands for database

Add your answer

Q91. what do you know about cts?

Ans.

CTS is a multinational IT services company headquartered in India.

  • CTS stands for Cognizant Technology Solutions.

  • It provides services in areas like digital, technology, consulting, and operations.

  • It has a global presence with offices in over 40 countries.

  • CTS is one of the largest IT services companies in the world.

  • It has been ranked among the top companies for employee satisfaction and diversity.

Add your answer

Q92. What are iterations?

Ans.

Iterations are repetitive processes in programming that allow for the execution of a block of code multiple times.

  • Iterations are used to perform a task repeatedly until a certain condition is met.

  • They are commonly used in loops such as for, while, and do-while loops.

  • Iterations can also be used to iterate over data structures such as arrays and lists.

  • Examples of iterations include printing numbers from 1 to 10, summing the elements of an array, and searching for a specific val...read more

Add your answer

Q93. what is a database?

Ans.

A database is a structured collection of data that is organized and stored for easy access, retrieval, and management.

  • A database is used to store and manage large amounts of data.

  • It provides a way to organize and structure data for efficient storage and retrieval.

  • Databases can be relational, object-oriented, or hierarchical, depending on the data model used.

  • They support operations like inserting, updating, deleting, and querying data.

  • Examples of databases include MySQL, Oracl...read more

Add your answer

Q94. Explain the concept of Oops and what is a database

Ans.

OOPS is a programming paradigm that focuses on objects and their interactions. A database is a structured collection of data.

  • OOPS stands for Object-Oriented Programming System

  • It emphasizes the use of objects, classes, and inheritance

  • Encapsulation, polymorphism, and abstraction are key principles of OOPS

  • A database is a system for storing and managing structured data

  • It allows for efficient data retrieval, manipulation, and organization

  • Relational databases, like MySQL, use table...read more

Add your answer

Q95. tell me about if and function...

Ans.

If statements are used to make decisions in programming based on a condition. Functions are blocks of code that can be called and executed.

  • If statements are used to execute a block of code only if a specified condition is true.

  • Functions are reusable blocks of code that can be called multiple times.

  • Example: if (x > 5) { // do something }

  • Example: function addNumbers(a, b) { return a + b; }

Add your answer

Q96. What is polymorphism?

Ans.

Polymorphism is the ability of an object to take on many forms.

  • Polymorphism allows objects of different classes to be treated as if they are of the same class.

  • It can be achieved through method overloading or method overriding.

  • Example: A parent class Animal can have child classes like Dog, Cat, and Cow. All of them can have a method called 'makeSound', but each of them will make a different sound.

  • Polymorphism helps in achieving code reusability and flexibility.

Add your answer

Q97. What is JVM,JDK,Abstraction?

Ans.

JVM is a virtual machine that executes Java bytecode. JDK is a software development kit for Java. Abstraction is a concept of hiding implementation details.

  • JVM stands for Java Virtual Machine and is responsible for executing Java bytecode.

  • JDK stands for Java Development Kit and is a software development kit for Java.

  • Abstraction is a concept of hiding implementation details and exposing only necessary information.

  • Abstraction is achieved through interfaces and abstract classes ...read more

Add your answer

Q98. Write a program for a number is prime or not

Ans.

Program to check if a number is prime or not

  • A prime number is only divisible by 1 and itself

  • Loop through numbers from 2 to n-1 and check if n is divisible by any of them

  • If n is divisible by any number, it is not prime

  • If n is not divisible by any number, it is prime

Add your answer

Q99. Write any program demonstrating the use of the Double pointer.

Ans.

A program demonstrating the use of Double pointer.

  • Double pointer is a pointer that points to another pointer.

  • It is used to allocate memory dynamically.

  • It is also used in multi-dimensional arrays.

  • Example: int **ptr; //declaration of double pointer

Add your answer

Q100. What are lists? What are data structures?

Ans.

Lists are a collection of ordered elements. Data structures are ways of organizing and storing data.

  • Lists are used to store and manipulate data in a specific order.

  • Data structures are used to organize and store data in a way that makes it easy to access and manipulate.

  • Examples of data structures include arrays, stacks, queues, and trees.

Add your answer
1
2

More about working at Cognizant

Top Rated Mega Company - 2024
Top Rated IT/ITES Company - 2024
HQ - Teaneck. New Jersey., United States (USA)
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Vivid Edge

based on 112 interviews in the last 1 year
4 Interview rounds
Aptitude Test Round
Technical Round
HR Round 1
HR Round 2
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter