Search:

Type: Posts; User: alpine

Search: Search took 0.00 seconds.

  1. Replies
    3
    Views
    1,007

    So could I malloc the space from within my stack...

    So could I malloc the space from within my stack initialization function? Would that be the best route, or should I allocate the space before the stack gets initialized?
    Here's the function:

    ...
  2. Replies
    3
    Views
    1,007

    Declaring size of stack from input file

    I need to create a stack, but the size of the stack needs to be scanned in from an input file. How do I go about declaring the structure for the stack?


    struct stack {

    int items[SIZE];
    int...
  3. Replies
    1
    Views
    1,739

    Permutation problem

    So currently I have a function that permutes a given word, for example:

    If you input CAT, it gives you

    CAT
    CTA
    ACT
    ATC
    TCA
    TAC
  4. Replies
    2
    Views
    4,300

    Printing a circle with different symbols

    Here's what i've got so far:

    int r1, r2, x, y, hyp, i;
    char grid [30][30];

    printf("Enter the outer radius of your wheel?\n");
    scanf("%d", &r1);
    printf("Enter the inner radius of your...
  5. Replies
    6
    Views
    1,545

    Help explaining output

    #include <stdio.h>

    void a(int num);
    void b(int num);

    int main() {
    a(6);
    return 0;
    }
  6. Replies
    2
    Views
    1,455

    Reversing a graph

    So I've been tasked with printing out a graph that shows gas mileage for 5 minute intervals during a trip based on a file the user directs you to. Here's what mine currently prints out:


    95 ...
Results 1 to 6 of 6