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
~2K People Reached
Favorite Forums
Favorite Tags
c x 14
c++ x 3
Member Avatar for alcx88

I'm trying to sum command-line integers. My total is constantly 473. I dont know how to get the right total. [CODE]#include <stdio.h> 4 #include <stdlib.h> 5 #include <ctype.h> 6 7 #define MAX 100 8 9 void sum(char *a, int n); 10 11 main (int argc, char *argv[]) 12 { 13 …

Member Avatar for chiwawa10
0
104
Member Avatar for alcx88

[CODE] #include <stdio.h> 5 6 #define MAX 100 7 8 int main(void) 9 { 10 char msg1[MAX], *p, *q, msg2[MAX]; 11 12 printf("Enter a message: "); 13 for (p=msg1; p<msg1+MAX; p++) 14 { 15 *p=getchar(); 16 if (*p=='\n') 17 break; 18 } 19 20 for (p--; p>=msg1; p--) 21 { …

Member Avatar for chiwawa10
0
91
Member Avatar for alcx88

I am having troubles getting my program to work. It is supposed to take integers from a file and put them into an array. Then it is supposed to sort them by the bubble sort algorithm. [CODE]#include <stdio.h> #include <ctype.h> #include <stdlib.h> #define N 10000 int main(int argc, char *argv[]) …

Member Avatar for Adak
0
124
Member Avatar for alcx88

I am not sure what this means and I get it all the time. Can someone help me fix this code? [ char add_account(account_t a[]) 7 { 8 int i, N=1000000; 9 char ch; 10 char str1, str2; 11 int m=20; 12 13 for(i=0;i<N;i++) 14 { 15 if(a[i].number==0) 16 { …

Member Avatar for jephthah
0
2K
Member Avatar for alcx88

I am brand new to all this and I can't get my program to read the file from input. Here is my code. It says segmentation fault (core dumped) I'm assuming because fp is not getting the file information. Can anyone help? [code]#include <stdio.h> #include <ctype.h> #include <stdlib.h> #define getchar() …

Member Avatar for alcx88
0
245