malloc function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • msq2004
    New Member
    • Jun 2007
    • 2

    malloc function

    Write a program using malloc function. In which you take input from user and allocate memory equal to square of this number. Which multiply numbers and draw a table in the following format?

    Hint: User enters 3 then program allocates equal to 9 integer memories.

    Output:1

    Enter a single digit number:
    2
    The multiplication table of 2 is:
    1 2
    ----------------
    1| 1 2
    2| 2 4

    Output:2

    Enter a single digit number:
    4
    The multiplication table of 4 is:
    1 2 3 4
    --------------------------------
    1| 1 2 3 4
    2| 2 4 6 8
    3| 3 6 9 12
    4| 4 8 12 16
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    All right, then, exactly what is your question?

    Comment

    • ilikepython
      Recognized Expert Contributor
      • Feb 2007
      • 844

      #3
      Originally posted by weaknessforcats
      All right, then, exactly what is your question?
      Also, this was posted in the articles section. You should move it to the forum.

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by ilikepython
        Also, this was posted in the articles section. You should move it to the forum.
        Consider it done.

        kind regards,

        Jos

        Comment

        • Silent1Mezzo
          New Member
          • Feb 2007
          • 208

          #5
          Already posted here

          Under a different name but exactly the same message.

          Comment

          Working...