Frequently asked questions and answers of COBOL in Programming Technologies of Computer Science to enhance your skills, knowledge on the selected topic. We have compiled the best COBOL Interview question and answer, trivia quiz, mcq questions, viva question, quizzes to prepare. Download COBOL 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 the role of PROCEDURE POINTER in COBOL?
Answer-1: It points to the entry address of a procedure or subprogram.
Question-2. What are some modern uses of COBOL?
Answer-2: COBOL is used in legacy systems, banking applications, and mainframe systems.
Question-3. What does COBOL stand for?
Answer-3: COBOL stands for Common Business Oriented Language.
Question-4. What is COBOL used for?
Answer-4: COBOL is primarily used for business, finance, and administrative systems for companies.
Question-5. Is COBOL a compiled or interpreted language?
Answer-5: COBOL is a compiled language.
Question-6. What are the divisions in a COBOL program?
Answer-6: The divisions are Identification, Environment, Data, and Procedure.
Question-7. What is the purpose of the Identification Division in COBOL?
Answer-7: The Identification Division specifies the program name and other program-related metadata.
Question-8. What does the Environment Division do in COBOL?
Answer-8: It defines the hardware and software environment for the program.
Question-9. What is the role of the Data Division in COBOL?
Answer-9: It declares all the variables and data structures used in the program.
Question-10. What is the Procedure Division in COBOL?
Answer-10: It contains the executable instructions and logic of the program.
Question-11. How is a variable defined in COBOL?
Answer-11: Variables are defined in the Data Division using level numbers like 01, 05, etc.
Question-12. What are level numbers in COBOL?
Answer-12: Level numbers represent the hierarchy of data elements. Examples are 01, 05, 77.
Question-13. What is the use of the PIC clause in COBOL?
Answer-13: The PIC (Picture) clause specifies the type and size of a data field.
Question-14. What does the VALUE clause do in COBOL?
Answer-14: It initializes a variable with a default value.
Question-15. How do you define a group variable in COBOL?
Answer-15: Use a level number followed by individual fields under it. Example: 01 PERSON.
Question-16. What are the types of data files in COBOL?
Answer-16: Sequential, Indexed, and Relative files.
Question-17. What is an Indexed file in COBOL?
Answer-17: It is a file where records are accessed using an index key.
Question-18. What is the ACCEPT statement in COBOL?
Answer-18: It takes input from the user or environment variables.
Question-19. What is the DISPLAY statement in COBOL?
Answer-19: It is used to print data to the console or screen.
Question-20. What is the purpose of the MOVE statement in COBOL?
Answer-20: It assigns values from one variable to another.
Question-21. What are COBOL?s conditional statements?
Answer-21: Examples include IF, EVALUATE, and PERFORM UNTIL.
Question-22. What is the EVALUATE statement in COBOL?
Answer-22: It is similar to a CASE or SWITCH statement in other languages.
Question-23. How do you perform looping in COBOL?
Answer-23: Using the PERFORM statement with UNTIL or VARYING.
Question-24. What is the PERFORM statement in COBOL?
Answer-24: It is used to execute a section or paragraph repeatedly or conditionally.
Question-25. What are sections and paragraphs in COBOL?
Answer-25: Sections are larger logical units containing paragraphs, and paragraphs contain code.
Question-26. What is the use of the STOP RUN statement?
Answer-26: It ends the execution of a COBOL program.
Question-27. What are the types of COBOL tables?
Answer-27: One-dimensional and multi-dimensional tables (arrays).
Question-28. How is a COBOL table defined?
Answer-28: Tables are defined using the OCCURS clause in the Data Division.
Question-29. What is the SEARCH statement in COBOL?
Answer-29: It is used to search for an element in an array or table.
Question-30. What is the difference between SEARCH and SEARCH ALL in COBOL?
Answer-30: SEARCH performs a linear search; SEARCH ALL performs a binary search.
Question-31. What is the REDEFINES clause in COBOL?
Answer-31: It allows one data field to share storage with another.
Question-32. What is the RENAMES clause in COBOL?
Answer-32: It groups contiguous fields under a new name for easier reference.
Question-33. What is the INSPECT statement in COBOL?
Answer-33: It examines a string for specific patterns and counts or replaces characters.
Question-34. What is the STRING statement in COBOL?
Answer-34: It concatenates multiple strings into a single target variable.
Question-35. What is the UNSTRING statement in COBOL?
Answer-35: It splits a string into multiple variables based on delimiters.
Question-36. What is the SORT statement in COBOL?
Answer-36: It arranges records in ascending or descending order.
Question-37. What is the MERGE statement in COBOL?
Answer-37: It combines two sorted files into a single sorted file.
Question-38. What is the CALL statement in COBOL?
Answer-38: It invokes a subprogram from another program.
Question-39. What are subprograms in COBOL?
Answer-39: Subprograms are separate programs called by the main program using the CALL statement.
Question-40. What is the LINKAGE SECTION in COBOL?
Answer-40: It is used to define variables passed between programs.
Question-41. How do you handle errors in COBOL?
Answer-41: Use file status codes or custom error-handling sections.
Question-42. What is the GO TO statement in COBOL?
Answer-42: It transfers control to a specified section or paragraph.
Question-43. What is the EXIT statement in COBOL?
Answer-43: It exits from a paragraph, section, or program.
Question-44. What is the difference between COMP and COMP-3?
Answer-44: COMP is binary format; COMP-3 is packed decimal format.
Question-45. What is COPY in COBOL?
Answer-45: It includes external code, like a header file, in a program.
Question-46. What is FILE SECTION in COBOL?
Answer-46: It defines the structure of input and output files.
Question-47. What are the types of file access modes in COBOL?
Answer-47: Sequential, Random, and Dynamic.
Question-48. How do you define a COBOL file structure?
Answer-48: Use the FD (File Description) entry in the File Section.
Question-49. What is a Working-Storage Section in COBOL?
Answer-49: It defines variables that persist for the program's lifetime.
Question-50. What are intrinsic functions in COBOL?
Answer-50: Built-in functions like NUMVAL, LENGTH, and UPPER-CASE.
Frequently Asked Question and Answer on COBOL
COBOL Interview Questions and Answers in PDF form Online
COBOL Questions with Answers
COBOL Trivia MCQ Quiz