Search:

Type: Posts; User: Alphawaves

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    YEah i do, i just realized that what i was...

    YEah i do, i just realized that what i was inputting effects the way it works. For example if i put in b wa wb (reverse b wa wb) which would be a pallindrome withouts spaces it gives not palindrome...
  2. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    Still not working, ive been looking at it and i...

    Still not working, ive been looking at it and i think it might be something to do with the fact that the strings are 81 characters long and the method im using to reverse them. so if i inputted lol...
  3. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    Yeah i was just being desperate. My program...

    Yeah i was just being desperate. My program prints out both the strings before if tests them to see if they are pallindromes. So yes everything is in order, theres just something wrong with my loop...
  4. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    yeah that makes sense, now im having trouble with...

    yeah that makes sense, now im having trouble with the coding....


    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    char str1[81];
    char str2[81];
  5. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    I didnt know you could specify a specific...

    I didnt know you could specify a specific character in a string like an array, though i guess i should have... cheers to paying attention in class.

    I actually used a loop very similar to this for...
  6. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    Allright well i have another question now...

    Allright well i have another question now relating to strings, ill post it here because i dont feel like cluttering up the forums with small questions.

    If i have a string, char str1[81]; that i...
  7. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    I think i tried the second statement there, but...

    I think i tried the second statement there, but when i compiled the compiler just crashed. Ill take a look.

    edit: yes i could do the above statement but then i wouldnt be using pointers x and y...
  8. Thread: pointers

    by Alphawaves
    Replies
    20
    Views
    1,723

    pointers

    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    int a, b, c;
    int* x;
    int* y;
    int* z;
    int* p;
  9. Replies
    8
    Views
    1,341

    Haha you are a smart one! I didnt really think...

    Haha you are a smart one! I didnt really think about setting up two conditions in a for loop.
    Thanks for explaining the sting/pointer question.
  10. Replies
    8
    Views
    1,341

    I have another problem ive been working on...

    I have another problem ive been working on involving arrays.


    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    int aryinput [10];
    int i;
  11. Replies
    8
    Views
    1,341

    Yeah i fixed the %s issue, i just forgot to...

    Yeah i fixed the &#37;s issue, i just forgot to change it here. I figured it had something to do with having the wrong type, i just couldnt find it in my book, thanks.

    Can someone explain how a...
  12. Replies
    8
    Views
    1,341

    error involving char type

    #include <stdio.h>
    #include <stdlib.h>
    typedef struct
    {
    int x;
    int y ;
    }POINT;
    int main()
    {
    POINT ent;
  13. Replies
    8
    Views
    3,734

    Gotcha, after looking at closer, divines code...

    Gotcha, after looking at closer, divines code doesnt compile. Looking back at it though i dont see a need to structure it like that, because the way noir has it structured makes alot more sense. The...
  14. Replies
    8
    Views
    3,734

    That was an awesome explaination noir, thanks. ...

    That was an awesome explaination noir, thanks.

    What about my integer classification question, can anyone answer that?
  15. Replies
    8
    Views
    3,734

    help with text input

    Allright im working on a new program. I basically need to write something that will read a text file and count the number of alphabetic characters, digits, punctuation characters, and whitespace...
  16. Replies
    27
    Views
    3,529

    Allright, well i let it be then. Thanks again.

    Allright, well i let it be then. Thanks again.
  17. Replies
    27
    Views
    3,529

    That seems to have got it to work, dunno how...

    That seems to have got it to work, dunno how though cuz counter was messed up as well.

    The average will give me something like 22.00000000 because its a float, is there any way to omit those...
  18. Replies
    27
    Views
    3,529

    I did some playing around, and if you just press...

    I did some playing around, and if you just press ctrl z by itself after youve entered everything it works as intended.

    I also put sum and counter in my printf for the results, entering 13 43 57...
  19. Replies
    27
    Views
    3,529

    Allright those last two posts helped alot. Btw...

    Allright those last two posts helped alot.

    Btw when you talked about eof earlier you didnt mention ctrl z for windows ctrl d for linux you just said ctrl d or z, and you didnt mention some...
  20. Replies
    27
    Views
    3,529

    #include #include int...

    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    int x;
    int min = 1000000000;
    int max = -1000000000;
    float sum;
    float avg;
  21. Replies
    27
    Views
    3,529

    So if i put scanf in the parameters of the while...

    So if i put scanf in the parameters of the while loop i dont need to execute it in the while loop?

    What is "break;"?

    Maybe im not understanding what you guys are trying to tell me because im...
  22. Replies
    27
    Views
    3,529

    noir u posted this code while ( 1 ) { ...

    noir u posted this code


    while ( 1 )
    {
    if ( scanf("%d", &x) != 1 )
    {
    if ( x > max)
    max = x;
    if (x < min)
  23. Replies
    27
    Views
    3,529

    Yeah i just edited my post cuz i realied what you...

    Yeah i just edited my post cuz i realied what you where saying about do while opposed to a while loop.
  24. Replies
    27
    Views
    3,529

    #include #include int...

    #include <stdio.h>
    #include <stdlib.h>

    int main()
    {
    int x;
    int min = 1000000000;
    int max = -1000000000;
    float sum;
    float avg;
  25. Replies
    27
    Views
    3,529

    Unfortunately part of the assignment is using eof...

    Unfortunately part of the assignment is using eof to stop the input process.
Results 1 to 25 of 28
Page 1 of 2 1 2