Submitted Questions

  • How many bytes occupied following comp example?

    Dear Friends, This is regarding COBOL comp. PIC X(3) occupy the 3 bytes... but PIC 9(3)V9(7) COMP occupied how much bytes? I said in interview that 10/2 = 5 bytes. V is specified for decimal point. Is that correct? But interviewer looked at me differently when I said this answer? If you are more confident, please reply this ...thanks in advance,.

    Jyoti Kalagi

    • Feb 15th, 2023

    We can store only 9 and S not V in comp ,if we want to store decimal use comp-3 not comp

    rathna

    • Aug 17th, 2022

    N/2 for even number and than +1. (n+1/2) for odd number.
    3+7=10
    10/5= 5
    5+1=6