By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,409 Members | 893 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,409 IT Pros & Developers. It's quick & easy.

malloc function

P: 2
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
Share this Question
Share on Google+
4 Replies


weaknessforcats
Expert Mod 5K+
P: 9,197
All right, then, exactly what is your question?
Jun 5 '07 #2

ilikepython
Expert 100+
P: 844
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

Expert 10K+
P: 11,448
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

100+
P: 208
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.