PTC
30+ Mace Project and Cost Management Interview Questions and Answers
Q1. A ball is left from a height of 10 meters. After bouncing first time it looses 10% of its previous height the next time it bounces. Write a code to calculate the number of bounces the ball goes through until it...
read moreCode to calculate number of bounces a ball goes through until it comes to rest.
Use a loop to simulate the bounces until the ball stops bouncing
Calculate the height of each bounce using the given formula
Keep track of the number of bounces in a counter variable
Q2. There are 4 people on one side of the river, let them be A, B, C and D. There is a boat on the same side of the river. A takes 1 minute to row to the other side, B takes 2 minutes, C takes 9 minutes and D takes...
read moreA, B cross first (2 mins), A returns (1 min), C, D cross (10 mins), B returns (2 mins), A, B cross again (2 mins)
A, B cross first (2 mins)
A returns (1 min)
C, D cross (10 mins)
B returns (2 mins)
A, B cross again (2 mins)
Q3. Which is the best and less time consuming way to calculate factorial of a number?
The best and less time consuming way to calculate factorial of a number is using iterative approach.
Iteratively multiply the number with all the numbers from 1 to the given number
Start with a result variable initialized to 1
Multiply the result with each number in the range
Return the final result
Q4. You have a birthday cake. You need to divide it in 8 equal parts, but you can cut it only 3 times. How will you do it?
Cut the cake in half horizontally, then stack the halves and cut vertically twice.
Cut the cake horizontally to get 2 equal halves.
Stack the halves on top of each other and cut vertically to get 4 equal quarters.
Finally, stack the quarters and cut vertically again to get 8 equal parts.
Q5. Two people, A and B, are running on a circular track. Both start at the same position. A is running at a speed of "x" and B is running at a speed of "y" (x is not equal to y). At what distance will they meet ag...
read moreThey will meet again after the starting point at a distance of LCM(x, y).
The distance at which they will meet again is the least common multiple (LCM) of their speeds.
For example, if A is running at a speed of 4 m/s and B is running at a speed of 6 m/s, they will meet again after 12 meters.
Another example, if A is running at a speed of 3 km/hr and B is running at a speed of 5 km/hr, they will meet again after 15 km.
Q6. Code to print * in five consecutive lines
Code to print * in five consecutive lines
Use a loop to iterate five times
Inside the loop, print a string containing a single * character
Q7. There are three wires of same length. First is crafted into a circle, second is crafted into an equilateral triangle and third is crafted into a square. Which one will have the minimum area?
The wire crafted into a circle will have the minimum area.
The circle has the smallest perimeter to area ratio compared to the equilateral triangle and square.
The formula for the area of a circle is A = πr^2, where r is the radius.
For the equilateral triangle, the formula is A = (√3/4) * s^2, where s is the side length.
For the square, the formula is A = s^2, where s is the side length.
Q8. Write the code to find factorial using function recursion.
Code to find factorial using function recursion
Define a function that takes an integer as input
Check if the input is 0 or 1, return 1 in that case
Otherwise, call the function recursively with input-1 and multiply it with the input
Q9. How will you buy particular vehicle?
I will buy a particular vehicle by considering my budget, researching different models, test driving them, and negotiating the price.
Determine my budget for the vehicle
Research different vehicle models that meet my requirements
Test drive the shortlisted vehicles to assess their performance and comfort
Compare prices from different sellers and negotiate for the best deal
Q10. Swapping two numbers using different techniques. All possible test cases and where one can go wrong.
Swapping two numbers using different techniques and discussing possible test cases and errors.
Using a temporary variable to swap the numbers
Using arithmetic operations to swap the numbers
Using bitwise XOR operation to swap the numbers
Test cases: positive numbers, negative numbers, zero, large numbers, floating point numbers
Possible errors: not using a temporary variable correctly, overflow/underflow with arithmetic operations, not handling edge cases
Q11. How much was my understanding about PTC core values.
I have a strong understanding of PTC core values.
PTC core values include customer success, innovation, integrity, and teamwork.
I have demonstrated my understanding of these values through my work on projects that prioritize customer satisfaction and collaboration.
I have also shown my commitment to integrity by always following ethical guidelines in my work.
I stay updated on industry trends and technologies to contribute to innovation within the company.
Q12. What would you do if Changes are not impact assessed properly? What are the qualities a Change Manager must have? What are some Release Management tools? Mention how Release & Change Management processes overla...
read moreIf changes are not impact assessed properly, a Change Manager should take corrective actions to ensure proper assessment and minimize risks.
Identify the root cause of the issue
Communicate with stakeholders to understand the impact of the change
Reassess the change and update the impact assessment
Implement necessary changes to minimize risks
Ensure proper documentation and reporting
Conduct a post-implementation review to identify areas of improvement
Q13. To find bugs between simple program for addition
Test all possible input combinations and edge cases to find bugs in the addition program.
Test with positive and negative numbers
Test with decimal numbers
Test with large numbers
Test with zero
Test with one number being zero
Test with non-numeric inputs
Test with overflow or underflow
Test with different data types
Test with different operating systems and browsers
Q14. What is real time example of polymorphism
Polymorphism in software development is like a person driving different vehicles using the same driving skills.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
For example, a superclass 'Shape' can have subclasses like 'Circle' and 'Rectangle' which can be treated as 'Shape' objects.
Calling a method like 'draw()' on a 'Shape' object will execute the specific implementation in 'Circle' or 'Rectangle' based on the actual object ty...read more
Q15. Is multiple inheritance allowed in java?
No, multiple inheritance is not allowed in Java.
Java does not support multiple inheritance for classes to avoid the diamond problem.
However, multiple inheritance is allowed for interfaces in Java.
Example: class A extends B, C is not allowed, but interface A extends B, C is allowed.
Q16. Program to find if a number is prime or not.
A program to determine if a given number is prime or not.
Check if the number is less than 2, if so it is not prime
Iterate from 2 to the square root of the number and check for divisibility
If the number is divisible by any number other than 1 and itself, it is not prime
If no divisors are found, the number is prime
Q17. Write function to find factorial of number
Function to find factorial of a number
Create a function that takes a number as input
Use a loop to multiply the number by decreasing integers until reaching 1
Return the final result as the factorial of the input number
Q18. How do you create schema, difference between data types
To create a schema, use CREATE SCHEMA statement. Data types include VARCHAR2, NUMBER, DATE, etc.
Create a schema using CREATE SCHEMA statement
Specify data types for columns when creating tables
Common data types include VARCHAR2, NUMBER, DATE, etc.
Use appropriate data types based on the type of data being stored
Q19. Oops Concepts and explain it in detail
Oops Concepts are fundamental principles of object-oriented programming that help in organizing and designing code.
Encapsulation: Bundling data and methods that operate on the data into a single unit.
Inheritance: Allowing 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 to the outside world.
Q20. Correct mislabelled jars problem.
Correct mislabelled jars by relabelling them with correct labels.
Identify the mislabelled jars
Check the correct labels for each jar
Remove the mislabelled label
Apply the correct label to the jar
Ensure all jars are correctly labelled
Q21. commands for rman backups and difference between them
RMAN backups can be performed using commands like BACKUP DATABASE, BACKUP ARCHIVELOG, BACKUP CONTROLFILE, etc.
BACKUP DATABASE: used to backup the entire database
BACKUP ARCHIVELOG: used to backup archived redo logs
BACKUP CONTROLFILE: used to backup the control file
BACKUP TABLESPACE: used to backup specific tablespaces
BACKUP AS COPY: used to create a physical copy of data files during backup
Q22. Program for Fibonacci Series.
A program to generate Fibonacci series using iterative or recursive approach.
Iterative approach: Use a loop to generate Fibonacci numbers by adding the previous two numbers.
Recursive approach: Define a function that calls itself to generate Fibonacci numbers.
Example: Fibonacci series up to 10 - 0, 1, 1, 2, 3, 5, 8, 13, 21, 34
Q23. What technology you have worked on?
I have worked on a variety of technologies including XML, HTML, CSS, JavaScript, and API documentation.
XML
HTML
CSS
JavaScript
API documentation
Q24. Explanation on any Framework
A framework is a set of guidelines or rules that provide structure and support for developing software applications.
Frameworks help in organizing code and promoting best practices
They provide reusable components and modules to speed up development
Frameworks can be front-end (like React or Angular) or back-end (like Spring or Django)
Q25. Reverse a number using recursion.
Reverse a number using recursion.
Define a recursive function that takes the number as input
Base case: if the number is less than 10, return the number
Recursive case: return the last digit of the number concatenated with the result of calling the function with the number divided by 10
Call the function with the input number
Q26. What is inheritance
Inheritance is a concept in object-oriented programming where a class inherits properties and behaviors from another class.
Allows a class to inherit attributes and methods from another class
Promotes code reusability and reduces redundancy
Creates a parent-child relationship between classes
Example: Class 'Car' can inherit properties and methods from class 'Vehicle'
Q27. 1. Diff Between CSRF and SSRF. 2. Types of XSS 3. DOM 4. XSS 5. IDOR
CSRF is a type of attack where unauthorized commands are transmitted from a user that the web application trusts. SSRF is a type of attack where an attacker can send a crafted request from a vulnerable web application.
CSRF stands for Cross-Site Request Forgery, while SSRF stands for Server-Side Request Forgery.
CSRF involves tricking a user into making a request they did not intend to, while SSRF involves an attacker sending a crafted request from a vulnerable web application....read more
Q28. Constrain in autocad/solidworks
Constrain is a tool used in AutoCAD/SolidWorks to restrict the movement of objects.
Constraining objects ensures that they maintain a specific position or relationship to other objects
Examples of constraints include horizontal, vertical, tangent, and concentric constraints
Constraints can be added manually or automatically using the software's constraint tools
Q29. Basic tools of solidworks
Basic tools of SolidWorks include sketching, modeling, assembly, and drawing tools.
Sketching tools: used to create 2D sketches that can be extruded or revolved to create 3D models
Modeling tools: used to create 3D models by extruding, revolving, sweeping, lofting, and more
Assembly tools: used to assemble multiple parts into a single model
Drawing tools: used to create 2D drawings of 3D models for manufacturing or documentation purposes
Q30. What is interface
Interface is a point where two systems, subjects, organizations, etc. meet and interact with each other.
Interface is a boundary or point of interaction between two entities.
It allows for communication, data transfer, or interaction between the entities.
Examples include user interfaces on electronic devices, software interfaces, and physical interfaces like USB ports.
Q31. Diff between queryparam n pathparam
Queryparam is used to pass parameters in the URL query string, while pathparam is used to pass parameters in the URL path.
Queryparam is appended to the end of the URL after a '?' symbol, while pathparam is included in the URL path itself.
Queryparam is optional and can be used for filtering or sorting data, while pathparam is required for identifying a specific resource.
Example of queryparam: /api/users?name=John&age=30
Example of pathparam: /api/users/123
Q32. Reverse the linkedlist
Reverse a linked list
Iterate through the linked list and reverse the pointers
Use three pointers to keep track of current, previous, and next nodes
Update the next pointer of each node to point to the previous node
Q33. Implement stack in c++
Implement stack using array in C++
Create a class with an array to store elements
Implement push() and pop() functions to add and remove elements
Include functions like isEmpty() and isFull() to check stack status
Q34. Program for HashMap
A program for HashMap implementation in Java
HashMap is a data structure that stores key-value pairs
Use put() method to add key-value pairs to HashMap
Use get() method to retrieve values based on keys
HashMap allows null keys and values
Example: HashMap<String, Integer> map = new HashMap<>()
Q35. Implement singleton in C++
Singleton is a design pattern that restricts the instantiation of a class to a single object.
Use a private static member variable to hold the single instance of the class.
Make the constructor private to prevent direct instantiation of the class.
Provide a static method that returns the single instance of the class.
Ensure thread safety if the singleton needs to be accessed concurrently.
Q36. Reverse of string
Reverse a string by iterating through each character and appending to a new string.
Iterate through each character of the input string
Append each character to a new string in reverse order
Return the reversed string
More about working at PTC
Top HR Questions asked in Mace Project and Cost Management
Interview Process at Mace Project and Cost Management
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month