Skip to main content
Engineering LibreTexts

26.16: Quiz Question Answers - Chapter 16

  • Page ID
    54434
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    Quiz question answers for chapter 16 are as follows:

    1. An item in a derived data type is referred to as a component.
    2. Components in a derived data type are accessed with the %.
    3. The definition is as follows:
      type circle
          character(20) :: name
          real :: radius
          integer :: x, y, x
      end type circle
    4. The declaration is as follows:
      type(circle) :: ring1, ring2
    5. The definition is as follows:
      type planet
          character(15) :: name
          real :: radius, volume
      end type planet
      
      type(planet) :: earth, mars
    6. The definition is as follows:
      type date
          character(10) :: monthname
          integer :: month, day, year
      end type date
    7. The answers are as follows:
      1. The statements are as follows:
        type(date) :: today
        
        today%monthname = "December"
        today%month = 12
        today%date = 25
        today%year = 2013
      2. The statements are as follows:
        type(date) :: newyear
        
        newyear%monthname = "January"
        newyear%month = 1
        newyear%date = 1
        newyear%year = 2011

    This page titled 26.16: Quiz Question Answers - Chapter 16 is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Ed Jorgensen via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.