Search:

Type: Posts; User: Aia

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: Goodbye, Dave.

    by Aia
    Replies
    40
    Views
    12,408

    Thank you for your friendship and mentoring. I...

    Thank you for your friendship and mentoring. I will see you, in another life. Just mention that you do not care much about liberals view, so I can recognize you. ;)

    I am sorry of your passing.
  2. Thread: C file input

    by Aia
    Replies
    2
    Views
    1,431

    Example...

    Example
  3. Thread: int floor(double)?

    by Aia
    Replies
    12
    Views
    5,676

    int round(double a) { return (int) ( a + .5...

    int round(double a)
    {
    return (int) ( a + .5 );
    }
  4. Replies
    1
    Views
    1,325

    An option would be to declare a reasonable size...

    An option would be to declare a reasonable size array and use a function that would read from the keyboard up to that limit - 1.

    i.e.

    char input[255] = { '\0' };

    fgets( input, sizeof( input...
  5. Replies
    8
    Views
    1,730

    from FAQ...

    from FAQ
  6. Thread: Lining up my Array

    by Aia
    Replies
    6
    Views
    1,052

    print allows you to format with defined fields....

    print allows you to format with defined fields.
    So %10d would display the decimal number in a minimum field of 10. As well you can use the * to define a variable minimum field of. Like %*d,...
  7. Thread: Lining up my Array

    by Aia
    Replies
    6
    Views
    1,052

    int name_len = strlen( Name ); printf("%s...

    int name_len = strlen( Name );

    printf("%s %s\n%d %*d ", Name, LastName, name_len, name_len, strlen(LastName) );
  8. Replies
    50
    Views
    5,198

    Don't I smell a lot of ego.

    Don't I smell a lot of ego.
  9. Replies
    4
    Views
    1,332

    Would you understand this?: printf( "%s",...

    Would you understand this?:

    printf( "%s", "Hello World" );

    That's the same thing you have there. Pay attention to the comas.
  10. Replies
    6
    Views
    1,450

    I don't see any indication that you know about...

    I don't see any indication that you know about pointers yet. Therefore, I am going to try to
    correct on the fly your code. Watch my comments and corrections.



    /* C files should end with .c...
  11. Thread: please help me...

    by Aia
    Replies
    11
    Views
    1,540

    A commercial? Where? Using the bitwise >> to...

    A commercial? Where?
    Using the bitwise >> to fast-forward
  12. Replies
    18
    Views
    29,661

    int main() { char string[] = "string"; int...

    int main()
    {

    char string[] = "string";

    int x = (int) &string;


    return 0;
  13. Replies
    30
    Views
    4,025

    void requestFileName(FILE *fp) /* remove one *...

    void requestFileName(FILE *fp) /* remove one * */
    {
    char inputFilename[30]; // Character Array to hold the users specified input file name
    printf("Enter the name of the file to be...
  14. Replies
    7
    Views
    2,037

    void swap (int *x, int *y) { int *temp = 0;...

    void swap (int *x, int *y) {
    int *temp = 0;
    *temp = *x;
    *x = *y;
    *y = *temp;
    }
    That'll crash it every time for sure ;)
  15. Replies
    4
    Views
    2,612

    >If anyone can point me in a better direction...

    >If anyone can point me in a better direction
    pointing direction
  16. Replies
    8
    Views
    1,769

    >and a high-level language program is saved on...

    >and a high-level language program is saved on disc as what file?
    Source code (.c, .cpp, etc )

    >before linking, a machine language program is save as what file?
    object file (.o, .a, .obj, etc )...
  17. Anything beyond ED...

    Anything beyond ED is a bloated editor.
  18. Replies
    17
    Views
    2,067

    int ch; while( ( ch = getchar() ) != '\n' &&...

    int ch;

    while( ( ch = getchar() ) != '\n' && ch != EOF )
    ; /* the work is done in the loop */



    Of course a macro is still possible.
  19. Replies
    11
    Views
    1,457

    if((num1 == 0)&&(num2

    if((num1 == 0)&&(num2 <=0)); /* will execute only when both expressions are true */

    if((num1 == 0) || (num2 <=0)); /* will execute when either expression is true */
  20. Thread: Help

    by Aia
    Replies
    6
    Views
    1,169

    How about just a simple getchar(); as the last...

    How about just a simple getchar(); as the last statement?
    I like that one best. It is portable and it will train you to not leave any characters in the standard input stream.
  21. Replies
    4
    Views
    1,323

    printf( "Hablo\tEspa%col", 164 );

    printf( "Hablo\tEspa%col", 164 );
  22. Replies
    4
    Views
    1,323

    \t Viva Espaņa. Pero que no viva tan lejos. ;)

    \t
    Viva Espaņa. Pero que no viva tan lejos. ;)
  23. Thread: Program Error

    by Aia
    Replies
    8
    Views
    1,239

    Amazing. Assuming we take the extra...

    Amazing.

    Assuming we take the extra parenthesis after \n"

    printf("&#37;s%d%s\n%s%d%s\n", "a[?] = ", *p, "?","a[?+1] = ", *p + 1, "?");
    The first %s is for the string "a[?] = "
    The first %d is...
  24. Thread: Program Error

    by Aia
    Replies
    8
    Views
    1,239

    I am even surprise it prints for you at all. ...

    I am even surprise it prints for you at all.



    printf("&#37;s%d%s\n%s%d%s\n") /* what's that ) there? */

    There's no string in your array of type int called a. All of those are single integers in...
  25. Thread: Program Error

    by Aia
    Replies
    8
    Views
    1,239

    That's not a program, sorry. It is more like when...

    That's not a program, sorry. It is more like when my four year old gets a hand to my keyboard.
Results 1 to 25 of 127
Page 1 of 6 1 2 3 4