Search:

Type: Posts; User: bos1234

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    4,803

    thanks. Seems like it doesn't work on mac high...

    thanks. Seems like it doesn't work on mac high sierra. Works on ubuntu
  2. Replies
    3
    Views
    3,649

    how to pass values into getchar in gdb

    I'm working through poker.c from King's C programming book and I need help analyzing it via gdb

    He has the following:


    while (cards_read < NUM_CARDS) {
    bad_card = false;

    ...
  3. Replies
    3
    Views
    4,803

    trying to understand a program via GDB

    I'm working through C programming: Modern Approach by K.N. King

    justify is a program that can correctly format (spacing) any sort of text. So if you write something like "hello space space space...
  4. Thread: C programming

    by bos1234
    Replies
    5
    Views
    1,160

    where abouts is this?

    where abouts is this?
  5. Thread: Divide fail

    by bos1234
    Replies
    10
    Views
    1,053

    Paste your full code so we can highlight the...

    Paste your full code so we can highlight the mistake for you. As mentioned above, it may be due to the fflush or the way you have declared your variables.


    #include <stdio.h>

    int main()
    {...
  6. alternate solution - which one is better?

    another solution. Not sure which one is better? Line 10 is where the change has been made

    #include <stdio.h>

    int *find_largest(int a[], int n)
    {
    int i, *x;

    x = &a[0];
    for (i = 1; i <...
  7. solved.

    thank you.
    New code below

    #include <stdio.h>

    int *find_largest(int a[], int n)
    {
    int i, *x;

    x = &a[0];
  8. hmmm if I press F5 to debug and set no break...

    hmmm

    if I press F5 to debug and set no break points, there is no output for me. I get this warning:

    I am assuming that is for the cases when a[i] < x or a[i] == x (line 10 and 16). But that...
  9. help on pointers. - return pointer to largest element in array

    Morning all.

    question from chapter 11, qn 8 modern C programming by king


    my solution

    #include <stdio.h>

    int *find_largest(int a[], int n)
  10. thank you

    thank you
  11. noted. I see that if I declare the rows and...

    noted.
    I see that if I declare the rows and cols in the function definition for array a (i.e. have only 1 argument), then I only need to pass the name in the function main..

    for example.


    ...
  12. Not understanding the concept of multidimensional arrays and functions

    Hi,
    I am having alot of trouble with the concept of multidimensional arrays and functions.

    for one dimensional arrays, when calling the function, we use the function name and number of elements....
  13. Replies
    8
    Views
    4,184

    Please critique my source code - Craps Game

    Question comes from Modern C programming by King ch 9 qn 7
    http://i41.tinypic.com/rtn9f5.jpg
    http://i44.tinypic.com/w22hqg.png

    This is one of the larger programs I have written to date. I am...
  14. Replies
    0
    Views
    977

    [SOLVED]Calling functions via a for loop

    When I trace this program line by line, I get different outputs(which is what I want). However, when I compile and run, output values are all the same. Why is this the case?

    I initialised the seed...
  15. Replies
    5
    Views
    871

    this will solve your problem, however, not sure...

    this will solve your problem, however, not sure if its the best solution for future programs.

    try this:

    #include<stdio.h>


    int main()
    {
  16. Replies
    5
    Views
    871

    someone please verify my answer ok assume I...

    someone please verify my answer

    ok assume I enter like this



    enter gender: M
    enter yos: 23
    enter qua: x
  17. Replies
    27
    Views
    3,118

    Noted. Thanks very much!

    Noted.
    Thanks very much!
  18. Replies
    27
    Views
    3,118

    Hi I go home for lunch for 1 hour. So I'm trying...

    Hi
    I go home for lunch for 1 hour. So I'm trying that 'nerve flossing' exercise. Can you also post some other exercises that were suggested to you.

    thanks once again!
  19. Documenting your work after a problem is solved from a book

    Hi,
    I just recently solved a problem from a book which was difficult for me. Now, I would like to document the solution (.pdf/.docx file), so that I can refer to it in the future.

    Is there some...
  20. Asset Management/Capturing help. Open problem

    Hi,
    I am trying to solve this problem @ work and am wondering if anyone has any experience in this area?

    Scenario:
    There are sites located within an area (eg. New York) called BTS sites or Base...
  21. Replies
    4
    Views
    1,746

    Hi, I found this via google. I Just skimmed...

    Hi,
    I found this via google. I Just skimmed through it but it looks like a good tutorial
    A Ray Tracer - Part 1 | PurpleAlienPlanet
  22. Replies
    26
    Views
    4,464

    general question: Is there any forum such as...

    general question:
    Is there any forum such as this one dedicated to assembly language?
  23. Replies
    9
    Views
    1,831

    as asked by whiteflags & laserlight - is the...

    as asked by whiteflags & laserlight - is the input to be entered, sorted?
  24. Replies
    1
    Views
    1,536

    Not sure if I understand your question. That code...

    Not sure if I understand your question. That code seems to work fine.


    #include <stdio.h>

    int main()
    {
    float lower_rad, upper_rad, slant_h;

    printf("\nEnter the lower radius: ");
  25. Replies
    2
    Views
    3,096

    In the second case, you do not need amount(int...

    In the second case, you do not need amount(int a,int b); (see link below)
    You have already informed the compiler of what is to come. So, when you call the function inside main, the program knows...
Results 1 to 25 of 147
Page 1 of 6 1 2 3 4