Metacube Software
10+ VKC Group Interview Questions and Answers
Q1. If Rohan have n chocolates and he get 1 chocolate back for every 3 chocolate wrapper after eating. How many he can eat.
Rohan can eat n chocolates plus n/2 additional chocolates from the wrappers.
Rohan can eat n chocolates initially.
After eating n chocolates, he will have n wrappers, which can be exchanged for n/3 additional chocolates.
Therefore, Rohan can eat n + n/3 = n + n/2 chocolates in total.
Q2. Calculate second max without second loop and sorting
Find the second maximum value in an array without using a second loop or sorting.
Iterate through the array once, keeping track of the maximum and second maximum values.
Initialize the maximum and second maximum variables with the first and second elements of the array.
Compare each element with the maximum and second maximum variables, updating them if necessary.
At the end of the iteration, the second maximum variable will hold the second largest value.
Q3. how to import user defined class another file
To import user defined class from another file, use the import statement followed by the file path.
Use the import statement followed by the file path to import the user defined class
Make sure the file containing the class is in the same directory or specify the correct path
Use the class name to access the class in the importing file
Q4. A recursive function to reverse a string
A recursive function to reverse a string
Create a function that takes a string as input
If the length of the string is 0 or 1, return the string
Otherwise, return the last character of the string concatenated with the result of calling the function on the substring from the first character to the second-to-last character
Example: reverseString('hello') returns 'olleh'
Q5. difference between polymorphism and function overloading
Polymorphism is the ability of an object to take on many forms. Function overloading is having multiple functions with the same name but different parameters.
Polymorphism allows objects to be treated as if they are of different types, while function overloading allows multiple functions to have the same name but different parameters.
Polymorphism is achieved through inheritance and virtual functions, while function overloading is achieved through defining multiple functions wi...read more
Q6. Difference between a set and an array
An array is a collection of elements of the same data type, while a set is a collection of unique elements.
Arrays have a fixed size, while sets can dynamically grow or shrink.
Arrays can have duplicate elements, while sets only contain unique elements.
Arrays are accessed using an index, while sets are accessed using an iterator.
Arrays are commonly used for storing and manipulating data, while sets are used for mathematical operations like union and intersection.
Q7. write test cases for lift, atm machine, UPI transaction
Test cases for lift, ATM machine, and UPI transaction
Lift: Test for proper functioning of buttons, emergency stop, door opening/closing, weight limit, and floor selection
ATM machine: Test for card insertion, PIN entry, cash withdrawal, balance inquiry, receipt printing, and error handling
UPI transaction: Test for login, account linking, fund transfer, transaction history, error handling, and security measures
Q8. Check leap year.
A leap year is a year that is divisible by 4, except for years that are divisible by 100 but not by 400.
Check if the year is divisible by 4.
If the year is divisible by 100, also check if it is divisible by 400.
If both conditions are met, it is a leap year.
Q9. What is HTML and CSS ?
HTML and CSS are the building blocks of web design.
HTML stands for Hypertext Markup Language and is used to create the structure and content of web pages.
CSS stands for Cascading Style Sheets and is used to style and layout web pages.
HTML and CSS work together to create visually appealing and functional websites.
HTML uses tags to define elements such as headings, paragraphs, and images.
CSS uses selectors to target HTML elements and apply styles such as color, font, and layout...read more
Q10. what is smoke testing
Smoke testing is a preliminary testing to check if the basic functionalities of a software application are working fine.
Smoke testing is a subset of regression testing.
It is usually performed after a new build is received.
The main purpose is to verify if the critical functionalities are working without conducting exhaustive testing.
It helps in identifying major issues early in the development cycle.
Examples: checking if the application launches successfully, if login function...read more
Q11. what is Black box testing
Black box testing is a software testing method where the internal structure/design of the system being tested is not known to the tester.
Tester focuses on the functionality of the software without knowing its internal code.
Tests are based on requirements and specifications.
Input data is provided and output is validated without knowledge of how the system processes the data.
Examples: User acceptance testing, system testing, regression testing.
Q12. oops in java majorly
Object-oriented programming principles in Java
Encapsulation: bundling data and methods that operate on the data into a single unit
Inheritance: allows a class to inherit properties and behavior from another class
Polymorphism: ability for objects to be treated as instances of their parent class
Abstraction: hiding the implementation details and showing only the necessary features
Interview Process at VKC Group
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month