Search Results

Search: Posts Made By: disaster
Forum: Programming 04-12-2011
3,039
Posted By disaster
The dd function you posted would actually copy...
The dd function you posted would actually copy three times a junk of 1024 bytes, ie. 3K bytes in total.
But I understand your question in such a way that you want to read 3 bytes in at once and do...
Forum: Programming 04-04-2011
2,662
Posted By disaster
They are not getting NULL as return value. That...
They are not getting NULL as return value. That NULL is still the initial NULL from main. The reason is that you only pass a pointers to the function. These pointers will be copied to the function...
3,483
Posted By disaster
First of all, you make a common mistake...
First of all, you make a common mistake (http://en.wikipedia.org/wiki/C_file_input/output#EOF_pitfall): getchar() returns an int and not a char. This may cause errors in the != EOF condition
Ok, so...
Forum: Programming 03-25-2011
1,640
Posted By disaster
I think the only way to do this is to scan the...
I think the only way to do this is to scan the input and then have according printfs.


if(!strcmp(argv[1], "int"))
printf("%d\n", sizeof(int));
else if(!strcmp(argv[1], "double")
...
2,134
Posted By disaster
I don't understand why you put your...
I don't understand why you put your if(IS_WHITE_SPACE) at the end.
Also getchar returns the integer represantation fo a char. I always cast them.
So my approch would be:

int c;

while((c =...
Showing results 1 to 5 of 5

 
All times are GMT -4. The time now is 11:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy