You shuld be more specific on this.
Suppose if the file contains number like this,
1 2
3 4
5 6
You can use a loop like this.
while( !feof(fileptr))
{
fscanf(fileptr, "%d %d", &arr[i][0], &arr[i][1]);
++i;
}
I hope this helps.
Cheers,
Baskar
baskar52@hotmail.com...
I guess you can just goto Page Setup of your Explorer or Navigator and remove the Headers and Footers.
Hope this helps.
Cheers,
Baskar
baskar52@hotmail.com
http://www.geocities.com/baskar52
Hi,
I remember doing this as my lab exercise in Digital Image processing Lab. If you post your snip may be we can help you.
Cheers,
Baskar.
Baskar
baskar52@hotmail.com
http://www.geocities.com/baskar52
Hi,
Same is applicable for functions also.
void func1();
func1 and &func1 are both equal.
Cheers,
Baskar.
Baskar
baskar52@hotmail.com
http://www.geocities.com/baskar52
Hi Lim,
From the way you are asking, I guess the answer should be 4. Bcoz once you convert it to void type, it doesnt matter what is there inside. I mean the value doesnt matter too much. May be if type cast it into double once again, I guess the answer will be 2. Am i right ?
Cheers,
Baskar...
I hope the follwoing code helps you.
int count;
float max = 1.5;
for ( j = 0; j < cols; j++)
{
count = 0;
for ( i = 0; i < rows; i++)
{
if ( matrix[j] > max)
{
count += 1;
printf(" The maxtrix[%d,%d] value %d is greater than %f\n And count is %d\n, i,j,max,count);
}
}...
Hi Kjb,
What exactly you want to be reported ?
Do you want the array element to be printed ?
If so try the below code.
int count = 0;
float max = 1.5;
for ( i = 0; i < rows; i++)
for ( j = 0; j < cols; j++)
{
if ( matrix[i][j] > max)
{
count += 1;
printf(" The maxtrix[%d,%d]...
Hi anna,<br> In Windows environment, you can use char 255, i.e press alt and press 255 then leave alt key , press enter, this means that u have entered EOF in stdin. BTW make sure that NUM lock is turned off.<br><br> Hope this helps you.<br><br>Regards,<br>Baskar...
Hi Anna,<br> I have a question, I dunno which platform you are working. If it is unix, you can use, ctrl D for specifying EOF and the above code will work perfectly.<br> If it is in windows platform. i think i need to check and come back to you.<br><br>Regards,<br>Baskar.
Hi Anna,<br> First of all I didnt get why you need to use a separate structure for storing words, instead of that you can simplify the tree structure by creating a structure like this.<br> struct treenode {<br> struct treenode *left, *right;<br> char...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.