Question

In: Computer Science

1. What is the purpose of level numbers in COCOL records? 2.What are design issues for...

1. What is the purpose of level numbers in COCOL records?

2.What are design issues for character string types?

3.What are two common problems with pointers?

4.What is a C++ reference type, what is its common use, and why are they better than pointers for formal parameters?

5.What is a type error?

Solutions

Expert Solution

1. The level numbers play a very important role in the programming using COBOL records.The general purpose of level numbers in the COBOL records are:

  • They describe the hierarchy of the data items and variables declared.
  • They describe the properties of the data declared i.e. general purpose and special purpose.
  • Most importantly they are used for declaring the variables in the application programming of the COBOL.
  • The level numbers includes 1 to 49 and special purpose level numbers are 66, 77 and 88.

2. The two most important design issues in the character string types are:

  • Is it a primitive type or just a special kind of array?

  • Should the length of strings be static or dynamic.

2. The two most important design issues in the character string types are:

  • Is it a primitive type or just a special kind of array?

  • Should the length of strings be static or dynamic?

3. There are some of the problems faced with pointers.The two most common problems with the pointers are explained.One of the common problem with pointers is the dangling pointer, or dangling reference which is a pointer that contains the address of a heap-dynamic variable that has been deallocated. The other common problem with the pointer is a lost heap-dynamic variable which is an allocated heap-dynamic variable that is not longer accessible to the user program, i.e. it hasn’t a pointer. Such variables are called garbage because they are unusable.

4. C++ includes a special kind of pointer type, called a reference type. The C++ reference type variable is a constant pointer that is always implicitly dereferenced and is used primarily for the formal parameters in function definitions.Because a C++ reference type variable is a constant, it must be initialized with the address of some variable in its definition, and after initialization a reference type variable can never be set to reference any other variable.This is the reason why they are better than pointers for formal parameters.

5.Type error is more specific to the Javascript language. TypeError is an object in Javascript that represents an error when any value is not of the expected type.This TypeError is thrown when an operand or argument passed to a function is incompatible with the type expected by that operator or function.


Related Solutions

1.What is a code of practice and what is its purpose in structural design? 2.List the...
1.What is a code of practice and what is its purpose in structural design? 2.List the principal sources of uncertainty in structural design and discuss how these uncertainties are rationally allowed for in design. 3.The characteristic strengths and design strengths are related via the partial safety factor for materials. The partial safety factor for concrete is higher than for steel reinforcement. Discuss why this should be so 4. Describe in general terms the ways in which a beam and column...
1). Discuss some of the ethical issues relating to genetic testing. 2). Discuss the purpose of...
1). Discuss some of the ethical issues relating to genetic testing. 2). Discuss the purpose of the Health Insurance Portability and Accountability act of 1996. 3). Describe the public duties of physicians. 4). Why do good Samaritan laws exist in many states? 5). Discuss the ethical considerations relating to surrogate motherhood and contraception.
Design a single-purpose processor that outputs fibonacci numbers up to n places. Start with a function...
Design a single-purpose processor that outputs fibonacci numbers up to n places. Start with a function computing the desired result. translate it into a state diagram, and sketch a probable datapath.
What are the applicable payroll records to process payroll and what is the purpose of each?
What are the applicable payroll records to process payroll and what is the purpose of each?
What is meant by “Level 1,” “Level 2,” and “Level 3” valuations in accounting?
What is meant by “Level 1,” “Level 2,” and “Level 3” valuations in accounting?
1. What is the purpose of a database?2. What is the reason to use a...
1. What is the purpose of a database?2. What is the reason to use a database over a spreadsheet?3. Based on the previous answers (#1 & #2), there is a simple rule of thumb.A spread sheet is used when there is _________________________.A database is used when there are _________________________.
1. What is trade dress? 2. What is the USDA? What is the purpose of the...
1. What is trade dress? 2. What is the USDA? What is the purpose of the USDA? 3. Define Bait and Switch? 4. Describe an environmental impact statement and identify when one is needed? 5. Explain how environmental laws regulate the use of toxic substances and the disposal of hazardous wastes? 6. Describe the enforcement of federal antitrust laws? 7. Explain how the lawfulness of mergers is examined under Section 7 of the Clayton Act? 8. Explain the liability of...
What is the purpose of a research design in a quantitative research study?
What is the purpose of a research design in a quantitative research study?
What are Android User Design Tenets and what are they usedfor?What is the purpose...
What are Android User Design Tenets and what are they used for?What is the purpose of the AndroidManfiest.xml file?What is the res folder and what files are located here and uses?
2. What are data elements and records? 3. List three control structures in modular design. 4....
2. What are data elements and records? 3. List three control structures in modular design. 4. Draw a picture which shows an example of iteration structure. 5. Provide an example of structured English? 6. Provide an example of decision tables with three conditions. 7. Provide an example of the decision tree.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT