Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-13-2014, 11:04 PM   #1
LQ Newbie
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
Trying to find what the error is and how to correct


void print_list(double *num_arr_ptr) {
int index = 0;

printf("\nYour numbers are...\n");
while (num_arr_ptr[index] != 0) {
if (index % 8 == 0)
printf("\nlist size = %d \n", index);

double calc_sum(double *num_arr_ptr) {
int index = 0;
double sum = 0;

while (num_arr_ptr[index] != 0) {
sum += num_arr_ptr[index];
//printf("sum = %f\n", sum);
return sum;

double get_number() {
float value;

printf("Enter a number (zero to end) >>> ");
return (double) value;
Old 02-13-2014, 11:44 PM   #2
Ser Olmy
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 2,480

Rep: Reputation: Disabled
It would have been nice if you had put that code inside [code] tags, as that would have made it a lot easier to read and would also preserved any formatting, like the indentation I sincerely hope is present in the original source code.

It would have been even better it you had explained or indeed said anything about the nature of the problem.

It would have been just splendid if you had said something along the lines of "I'm trying to create a program that does A, B and C, but I keep getting the error message XYZ", instead of expecting other to copy, paste and compile your code, run it, check the results, analyze the source code, and try to figure out what the problem might be.
Old 02-13-2014, 11:45 PM   #3
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,257

Rep: Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529Reputation: 2529
see the other post !!!
there is no way anyone can help without any of the needed information

and answer
1) what are you doing ?
2) what is it you NEED to do ?
3) where did you get the code ?
4) what does the textbook say about it ?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix input/output error or find correct webcam driver for icecam2? agingcomputer Linux - Hardware 0 03-25-2010 09:06 AM
Cannot find correct Qt headers! drussell6 Linux - Software 2 07-03-2008 08:38 AM
Cant find correct kernel source. e-buzz SUSE / openSUSE 2 07-03-2005 08:45 AM
how to find correct tty number? SeanatIL Linux - Hardware 1 07-07-2004 08:03 PM
How to find the correct /dev/ttyS*? SeanatIL Linux - Software 1 07-07-2004 07:33 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:53 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration