<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>problem in Generating random nmber using rand() function in embedded c</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/33035/problem-in-generating-random-nmber-using-rand-function-in-embedded-c</link><description> 
i modified the example random number generation program from keil
help section. 
keil example program 
Code: 

 
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt; /* for printf */

void tst_rand (void) {
 int i;
 int r;

 for (i = 0; i &amp;lt; 10; i++) {
 printf (&amp;quot;I</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: problem in Generating random nmber using rand() function in embedded c</title><link>https://community.arm.com/thread/81934?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2015 11:39:11 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a5be7231-fe98-4b0e-b544-ffd2e46d1ba0</guid><dc:creator>eaman sehar</dc:creator><description>&lt;p&gt;&lt;p&gt;
may i know that what is the purpose of this in this program int
int_amt; int_amt = time_val/1000; lcd_data(int_amt+48); time_val =
time_val%1000; int_amt = time_val/100; lcd_data(int_amt+48); time_val
= time_val%100; int_amt = time_val/10; lcd_data(int_amt+48); int_amt
= time_val%10; lcd_data(int_amt+48);&lt;br /&gt;
why we divide &amp;amp; add over her?? can any one explain this
program&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: problem in Generating random nmber using rand() function in embedded c</title><link>https://community.arm.com/thread/68710?ContentTypeID=1</link><pubDate>Mon, 02 Jun 2014 04:55:01 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8424e57a-e693-4f00-998e-c10af417ad56</guid><dc:creator>ImPer Westermark</dc:creator><description>&lt;p&gt;&lt;p&gt;
May I guess that you have one of your own files named rand.c?&lt;/p&gt;

&lt;p&gt;
Note the first warning: &amp;quot;*** WARNING L7: MODULE NAME NOT
UNIQUE&amp;quot;&lt;/p&gt;

&lt;p&gt;
Consider solving that one by renaming one of your modules, and
take it from there...&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>