below 'for' loop is the culprit
if( i > 0 )//comparing from the 2nd # & upwards
{
for( j=1; j<MAX+1; j++ )
Type: Posts; User: pprabhakar
below 'for' loop is the culprit
if( i > 0 )//comparing from the 2nd # & upwards
{
for( j=1; j<MAX+1; j++ )
Sorry for the Code Tags
Probably , you may be looking when the user hits an enter key then that is the end of the string.
while (charPtr = getchar())
{
line_of_text[i++] = charPtr;...
The below line of code will infinitely waiting by accepting the characters.
This is wrong
while (charPtr = getchar());
Probably , you may be looking when the user hits an enter key then...
Check the Usage of fgetc
int fgetc( FILE *stream );
You may wanted something like below
while ( ( something = fgetc(Textfile)...... ))
Yes , i can replace with array of structures .
but ,my issue is something like template in c++ ,where i wanna do like the below
Compute(channel)
{
REG_ADDR.SM[channel].COUNT = 10;
}...
Hi All,
The below is the snippet of code which i am working on .
i am wriiting a switch case to set each of the variables in structure .
Note : REG_ADDR is address of some say (0x1000) .
...
if i write to macro "SELECT" is it so i am writing to the perticular address as shown below ??
Can sombody explain what "Volatile" supports here.
whether typecast should be int or long ?...
Here is the code to compile/check .
float Util_Float_Abs( float data )
{
float ret_value = 0.0;
if( data > 0.0 )
{
i wanted to Round off Float value,but the correct computed value is not returning to calling Function .
i have following functions .
init -- which calls 'compare' function.
compare - ...
Software delay can be done using "for" loops
for( a=0;a<8; a++ )
for( b=0; b<80; b++ );
or
by using assembly lang delay routines can be written
Delay routines depend on Clock...
Hello All ,
is there difference between int* p1 and int *p1 .
:
int main()
{
int x =3;
int* p1;