Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+3
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #54.9K
Ranked #4K
~571 People Reached
Favorite Forums
Favorite Tags
c x 3
Member Avatar for henks

[code] #include<stdio.h> #include<stdlib.h> #include<string.h> #include<math.h> int main(){ char input[10]; int i,j,digit,out[10],flag=0,sum; while(flag==0){ sum=0; flag=0; strcpy(input," "); scanf("%s",&input); fflush(stdin); digit=strlen(input); printf("%d\n",flag); if(strlen(input)>8){break;} /*else { for(i=0;i<8;i++){ if (input[i]!=48&&input[i]!=49){ flag++; break; } } }*/ printf("%d\n",digit); printf("%d",flag); if (flag==1){break;} for(i=0;i<8;i++){ if(input[i]!='\0'){ if(input[i]=='1'){ out[i]=1;} else if(input[i]=='0'){ out[i]=0;} } } j=1; for(i=0;i<digit;i++){ sum+=out[i]*pow(2,digit-j); j++; } printf("Decimal …

Member Avatar for henks
0
144
Member Avatar for ragaven

Hello friends............ How to check whether the given file path is valid or not in C,independent of OS......... Please reply immediately......... Thank you.........

Member Avatar for Ancient Dragon
0
303
Member Avatar for rohan.raizada1

void function(int a, int b, int c){ char buffer1[5]; char buffer2[10]; int *r; r = buffer1 + 12; (*r) += 8; } int main(){ int x = 0; function(1,2,3); x = 1; printf("x = %d\n", x); } Hi, I am new to this community and have joined recently. I am …

Member Avatar for C-er
0
124