- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 3
- Posts with Downvotes
- 2
- Downvoting Members
- 3
5 Posted Topics
what's wrong: 1 - [CODE]return ();[/CODE] this is not C valid. Do: [CODE]return;[/CODE] Or write nothing at all, you don't need to call return at the end of a void function. 2 - lines like: [CODE] (celsius = (kelvin - 273)); [/CODE] You don't need to put parenthesis, this can …
See www.ioccc.org where many people write funny code as you paste. Note that the industry won't like this "coding style" at all. Pure and raw fun.
you can have: [CODE] char hexadecimal[16]={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'}; [/CODE] but your code is inefficient at the least. Don't read the binary number with scanf("%d"), it will convert to an integer. You should: 1 - read the string 2 - check that's it only made of '0' and '1' 3 - get its …
1 - don't use fgets, it's a security bug. Your program may well behave in a complete different way than you expect (dig for "buffer overflow" on the web) (Edit: this is wrong, I was thinking about gets, forget that sentence.) 2 - let's say you have read the string …
opendir/closedir/readdir is in POSIX, so should work with your operating system.
The End.