Search:

Type: Posts; User: belkins

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Replies
    9
    Views
    2,546

    i got my max and min to work, but i still need...

    i got my max and min to work, but i still need help with my gtr pointer, its still not returning the right value here is what i have.
    function prototype


    double average(int x[], int npts, int...
  2. Replies
    9
    Views
    2,546

    Pointer changing values

    Below is my code. The problem I am having is that when trying to print out a value in the main function from a pointer in a function its giving me wacky values. Like for example my maximum value lets...
  3. Oh i know what i did, thanks a ton. I got it to...

    Oh i know what i did, thanks a ton. I got it to work!
  4. like if the user types "The dog runs fast." and...

    like if the user types "The dog runs fast." and want to see how many times s occurs, it should return 2 but returns 0 instead.
  5. ok so i modified it as int occurance(char...

    ok so i modified it as

    int occurance(char *str, char str2)
    and fixed it so now its not giving me that error but now its not returning the right number, if i need to repost what i have i can if...
  6. ok im an idiot i forget the &str, but i modified...

    ok im an idiot i forget the &str, but i modified it and it asks the user but then it crashes?
  7. i mean its not even letting the user type in a...

    i mean its not even letting the user type in a variable to initialize str2?
  8. ? a warning, i thought they werent a big deal. i...

    ? a warning, i thought they werent a big deal. i mean i can do scanf_s but still? does scanf need to be something else?
  9. and compiles fine but when i try to execute it i...

    and compiles fine but when i try to execute it i get a run time error saying str2 isnt being intialized??? does anyone know whats wrong
  10. Heres what i have now after what i think fixing...

    Heres what i have now after what i think fixing it the way you tell me to.



    #include <stdio.h>
    #include <string.h>

    int main (void)
    {
    /*Declare and intialize variables*/
  11. so where do i need to make changes in my program...

    so where do i need to make changes in my program i tried on my own now it wont even work or crashes
  12. may that was a little confusing, heres a newer...

    may that was a little confusing, heres a newer version with comments except i moved my while loop into a function. so here it is


    #include <stdio.h>
    #include <string.h>
    int main (void)
    {...
  13. Determining number of times a character appears in an array

    Below is my program. It works but then it gives a run time check failure- stack around the variable 'str2' was corrupted. I have no idea what the deal is. Thanks

    #include <stdio.h>
    #include...
  14. figured it out k=(i*7)+j;

    figured it out
    k=(i*7)+j;
  15. i dont think this is the right equation? it works...

    i dont think this is the right equation? it works for the first seven then messes up on the index, but the value of the index is correct, do you know of an equation that would fix this?
  16. so k should be k=(i +1) *(j+1) - 1 ????

    so k should be
    k=(i +1) *(j+1) - 1
    ????
  17. Yea i knew something was wrong because when i...

    Yea i knew something was wrong because when i printed it out it was a mess, so does k need to be an outside loop?
  18. i fixed the power1d

    i fixed the power1d
  19. right it should be fint i, j, k; int...

    right it should be


    fint i, j, k;
    int power1d[56];

    for(i = 0; i<NROWS; i++)
    {
    for(j=0; j<NCOLS; j++)
    {
  20. do i declare the 2-d array as one-d then

    do i declare the 2-d array as one-d then
  21. does another array need to be declared?

    does another array need to be declared?
  22. so does this work NROWS being 8 and NCOLS being 7...

    so does this work NROWS being 8 and NCOLS being 7


    int i, j, k;
    int power1d[56];

    for(i = 0; i<NROWS; i++)
    {
    for(j=0; j<NCOLS; j++)
    {
  23. Replies
    3
    Views
    4,631

    to make my self more clear in power[0][0] the...

    to make my self more clear in power[0][0] the value should be 253 but instead i get 0.0000000000
  24. Replies
    3
    Views
    4,631

    Having troubles reading in file to array

    #include<stdio.h>
    #include<math.h>
    #define NROWS 8
    #define NCOLS 7
    int main (void)
    {
    FILE *input;
    int i;
    int j;
    double power[NROWS][NCOLS];
  25. ok ill go with the pointer

    ok ill go with the pointer
Results 1 to 25 of 48
Page 1 of 2 1 2