Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
~1K People Reached
Favorite Forums
Favorite Tags
c x 3

3 Posted Topics

Member Avatar for Jammie

[QUOTE=jephthah;878611]why so complicated? all you really need is "strtol()" and the addition operator. [code=c]int binaryAdd(char *first, char *second, int *sum) { int val1, val2; char *ptr1, *ptr2; size_t length; val1 = strtol(first,&ptr1,2); val2 = strtol(second,&ptr2,2); if (ptr1 == first || ptr2 == second) { printf("\ninvalid entry.\n\n"); return 0; } length …

Member Avatar for arunsolo1984
1
991
Member Avatar for viwenka

Can anyone help me with my code?! I need to do a programm binary to decimal converter without using library, just stdio.h my code works wrong [CODE] void bin2dec(){ long int n; int s=1,j,p=1,i=0,x; int digit=1; printf("Input a binary number: "); scanf("%ld",&n); while(digit==1) { x=n%10; s=s+pow(2,i); i=i+1; n=n/10; if(n==0) digit=0; …

Member Avatar for UncleLeroy
0
200
Member Avatar for al3x748769

[QUOTE=MosaicFuneral;778328]They store it in binary yes, but we left the 8-bit addressing range many decades ago - even toys, and appliances have more than that! In the general computer market 32-bit is pretty standard, with a switch towards 64 becoming standard, soon.[/QUOTE] It seems like u're good in C=) So …

Member Avatar for viwenka
0
153

The End.