Frequently asked questions and answers of MUMPS in Artificial Intelligence and Machine Learning of Computer Science to enhance your skills, knowledge on the selected topic. We have compiled the best MUMPS Interview question and answer, trivia quiz, mcq questions, viva question, quizzes to prepare. Download MUMPS FAQs in PDF form online for academic course, jobs preparations and for certification exams .
Intervew Quizz is an online portal with frequently asked interview, viva and trivia questions and answers on various subjects, topics of kids, school, engineering students, medical aspirants, business management academics and software professionals.
Question-1. What is MUMPS?
Answer-1: MUMPS is a high-performance, hierarchical database and programming language designed for healthcare systems and large-scale applications.
Question-2. What is another name for MUMPS?
Answer-2: MUMPS is also known as "M" or "M Language."
Question-3. When was MUMPS developed?
Answer-3: MUMPS was developed in the late 1960s at Massachusetts General Hospital.
Question-4. What is MUMPS primarily used for?
Answer-4: MUMPS is primarily used in healthcare, financial systems, and database-driven applications.
Question-5. What type of language is MUMPS?
Answer-5: MUMPS is a procedural programming language with built-in database capabilities.
Question-6. What is the key feature of MUMPS?
Answer-6: Its key feature is its hierarchical and multi-dimensional database integration.
Question-7. How do you declare a variable in MUMPS?
Answer-7: Variables are declared implicitly when assigned a value, e.g., SET x=10.
Question-8. What is a global variable in MUMPS?
Answer-8: A global variable is a persistent variable stored in the database, starting with ^, e.g., ^patients.
Question-9. How do you define a function in MUMPS?
Answer-9: Use the SET command with a label, e.g., SET result=$PIECE(string,"-",2).
Question-10. How do you create a loop in MUMPS?
Answer-10: Use the FOR command, e.g., FOR i=1:1:10 WRITE i.
Question-11. What is the WRITE command in MUMPS?
Answer-11: The WRITE command outputs data to the terminal or file.
Question-12. What is the READ command in MUMPS?
Answer-12: The READ command takes user input from the terminal or file.
Question-13. How do you access global variables in MUMPS?
Answer-13: Use the caret symbol (^), e.g., ^patients("John Doe").
Question-14. What is the DO command in MUMPS?
Answer-14: The DO command is used to execute a subroutine or label block.
Question-15. What is a subroutine in MUMPS?
Answer-15: A subroutine is a block of code executed using the DO command, defined with a label.
Question-16. How do you handle errors in MUMPS?
Answer-16: Use the ZTRAP command to define an error handler, e.g., SET $ZTRAP="ErrorHandler".
Question-17. What is the IF command in MUMPS?
Answer-17: The IF command is used for conditional execution, e.g., IF x>10 WRITE "Large".
Question-18. What is the $PIECE function in MUMPS?
Answer-18: $PIECE extracts a substring from a string using a delimiter, e.g., $PIECE("A-B-C","-",2) returns B.
Question-19. How do you concatenate strings in MUMPS?
Answer-19: Use the underscore _, e.g., SET result="Hello "_ "World".
Question-20. What is the $FIND function in MUMPS?
Answer-20: $FIND returns the position of a substring within a string, e.g., $FIND("Hello","e").
Question-21. What is the role of NEW in MUMPS?
Answer-21: NEW temporarily saves and restores the value of variables within a block.
Question-22. What is the QUIT command in MUMPS?
Answer-22: QUIT terminates the execution of a routine or block.
Question-23. How do you implement a database in MUMPS?
Answer-23: Databases in MUMPS are implemented using hierarchical global variables.
Question-24. What is the $ORDER function in MUMPS?
Answer-24: $ORDER retrieves the next or previous subscript in a global or local array.
Question-25. What is the $NEXT function in MUMPS?
Answer-25: $NEXT is an alias for $ORDER and retrieves the next subscript.
Question-26. What is the $DATA function in MUMPS?
Answer-26: $DATA checks if a variable or global exists and its type (data or subnodes).
Question-27. How do you open a file in MUMPS?
Answer-27: Use the OPEN command, e.g., OPEN "file.txt".
Question-28. How do you close a file in MUMPS?
Answer-28: Use the CLOSE command, e.g., CLOSE "file.txt".
Question-29. What is the $IO variable in MUMPS?
Answer-29: $IO specifies the current input/output device.
Question-30. How do you exit a program in MUMPS?
Answer-30: Use the HALT command.
Question-31. What is the SET command in MUMPS?
Answer-31: The SET command assigns a value to a variable, e.g., SET x=5.
Question-32. How do you create an indexed database in MUMPS?
Answer-32: Use subscripted globals, e.g., SET ^patients("ID123")="John Doe".
Question-33. What is the purpose of KILL in MUMPS?
Answer-33: KILL deletes variables or global entries, e.g., KILL x or KILL ^patients.
Question-34. What is a label in MUMPS?
Answer-34: A label is a named point in a program used for defining subroutines or code blocks.
Question-35. How do you call a subroutine in MUMPS?
Answer-35: Use the DO command followed by the label, e.g., DO SubroutineName.
Question-36. What are intrinsic functions in MUMPS?
Answer-36: Intrinsic functions are built-in functions like $PIECE, $FIND, $DATA, etc.
Question-37. What is the $HOROLOG variable in MUMPS?
Answer-37: $HOROLOG provides the current date and time as the number of days since 1840 and seconds of the day.
Question-38. How do you retrieve the current date in MUMPS?
Answer-38: Use the $HOROLOG variable and parse it with $PIECE.
Question-39. What is the $JOB variable in MUMPS?
Answer-39: $JOB identifies the current process ID.
Question-40. How do you write multi-line commands in MUMPS?
Answer-40: Use a dot . to indicate continuation lines.
Question-41. How do you execute system commands in MUMPS?
Answer-41: Use the ZSYSTEM command, e.g., ZSYSTEM "ls".
Question-42. What is the purpose of $ZNAME in MUMPS?
Answer-42: $ZNAME provides the name of the current routine.
Question-43. How do you handle string comparison in MUMPS?
Answer-43: Use relational operators like = or '=, e.g., IF name="John".
Question-44. What is a transaction in MUMPS?
Answer-44: Transactions ensure atomic operations on globals using TSTART, TCOMMIT, and TROLLBACK.
Question-45. How do you create a local variable in MUMPS?
Answer-45: Assign a value without a caret, e.g., SET x=10.
Question-46. How do you increment a value in MUMPS?
Answer-46: Use the SET command, e.g., SET x=x+1.
Question-47. How do you debug a program in MUMPS?
Answer-47: Use a debugger provided by the MUMPS implementation, like GT.M or Cache.
Question-48. What are some MUMPS implementations?
Answer-48: Common implementations include GT.M, Cach?, and OpenVista.
Question-49. How do you export data from a MUMPS database?
Answer-49: Use routines to write global data to files or use database-specific tools.
Question-50. What are the advantages of MUMPS?
Answer-50: Advantages include high performance, scalability, and efficient handling of hierarchical data.
Frequently Asked Question and Answer on MUMPS
MUMPS Interview Questions and Answers in PDF form Online
MUMPS Questions with Answers
MUMPS Trivia MCQ Quiz