468,783 Members | 1,621 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,783 developers. It's quick & easy.

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
Jun 5 '07 #1
4 1087
weaknessforcats
9,207 Expert Mod 8TB
All right, then, exactly what is your question?
Jun 5 '07 #2
ilikepython
844 Expert 512MB
All right, then, exactly what is your question?
Also, this was posted in the articles section. You should move it to the forum.
Jun 6 '07 #3
JosAH
11,448 Expert 8TB
Also, this was posted in the articles section. You should move it to the forum.
Consider it done.

kind regards,

Jos
Jun 6 '07 #4
Silent1Mezzo
208 100+
Already posted here

Under a different name but exactly the same message.
Jun 6 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

14 posts views Thread by Joseph | last post: by
34 posts views Thread by Richard Hunt | last post: by
231 posts views Thread by Brian Blais | last post: by
68 posts views Thread by James Dow Allen | last post: by
58 posts views Thread by Jorge Peixoto de Morais Neto | last post: by
71 posts views Thread by desktop | last post: by
10 posts views Thread by somenath | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
2 posts views Thread by Marin | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.