Search:

Type: Posts; User: thmm

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Thread: arrays

    by thmm
    Replies
    7
    Views
    105

    6356672 was the address of array1. If you want...

    6356672 was the address of array1. If you want the actual number you have to use the subscript operator, like array1[0], array1[1]...
    I would recommend that you get a (e)book. Just guessing how...
  2. Thread: printf int

    by thmm
    Replies
    2
    Views
    88

    You need a format specifier in your printf. ...

    You need a format specifier in your printf.

    printf("1+2= %d", int3);
  3. Thread: Copy function

    by thmm
    Replies
    2
    Views
    167

    You need to copy the values from arr1 to arr2...

    You need to copy the values from arr1 to arr2 only if they are greater than threshold. There is no need to find the min.

    Maybe sth. like this:


    for (int i = 0; i < length; ++i) {
    if...
  4. You are right. Thanks for pointing it out.

    You are right. Thanks for pointing it out.
  5. Wouldn't it be possible to set the locale to a...

    Wouldn't it be possible to set the locale to a country that uses the comma as decimal separator and read the input as a flaot ?
  6. Replies
    8
    Views
    411

    When I ran the code in VS 2019 I got an exception...

    When I ran the code in VS 2019 I got an exception at line 85

    strcpy(A[index].name, temp.name);
    when index was -307.
  7. Thread: I've been stuck.

    by thmm
    Replies
    6
    Views
    536

    Have a look at this tutorial. It uses an int for...

    Have a look at this tutorial. It uses an int for the data but you could modify to use strings.
    Given a linked list which is sorted, how will you insert in sorted way - GeeksforGeeks
  8. Replies
    5
    Views
    435

    Why not follow the KISS priciple? #define...

    Why not follow the KISS priciple?



    #define NAME_LEN 100
    char first_name[NAME_LEN];
    scanf("%99s", first_name);
  9. Replies
    9
    Views
    577

    Consider sth. like this: bool import(bool...

    Consider sth. like this:


    bool import(bool provided)
    {
    char file_name[256] = { 0 };
    FILE* src = NULL;


    if (provided)
  10. Replies
    8
    Views
    456

    Not sure if you have learned about functions yet,...

    Not sure if you have learned about functions yet, but they would make your task easier:


    #include <stdio.h>
    #include <stdbool.h>


    void print_prime_factors(int num)
    {
    printf("The prime...
  11. Replies
    213
    Views
    10,171

    Still no luck with MinGW:...

    Still no luck with MinGW:
    Alu_demo\alu\_.h|4|fatal error: unic/limits.h: No such file or directory|
  12. Replies
    213
    Views
    10,171

    It has nothing to do with MS. Neither MinGW nor...

    It has nothing to do with MS. Neither MinGW nor cygwin have these
  13. Replies
    213
    Views
    10,171

    Is it really necessary to use non-standard...

    Is it really necessary to use non-standard headers like uchar.h and non-standard types like ssize_t ?
  14. Replies
    213
    Views
    10,171

    5. People might had an interest but couldn't...

    5. People might had an interest but couldn't build it Windows(possible)
  15. If you want to do some automated testing - and at...

    If you want to do some automated testing - and at some point you need to learn it - you follow this pattern:
    1. define your input
    2. define the expected output
    3. get the actual output
    4. check...
  16. Replies
    6
    Views
    509

    Wheb hamster_nz spoke about heaps he porbbly...

    Wheb hamster_nz spoke about heaps he porbbly meant the data structure, not the place where malloc allocates the memory.
    Heap Data Structure - GeeksforGeeks

    I am not sure if a text file is the...
  17. Thread: Dice

    by thmm
    Replies
    12
    Views
    692

    Maybe like this: #include #include...

    Maybe like this:

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


    int roll()
    {
    int dice;
  18. Replies
    10
    Views
    628

    printf("%.2f", double i, rel(double i)); When...

    printf("%.2f", double i, rel(double i));
    When passing an argument to a function you don't pass the type, only the name. Also when you pass 2 parameters to printf you need 2 format specifiers.
    ...
  19. Replies
    4
    Views
    1,308

    Let me try to explain in simple words: 1....

    Let me try to explain in simple words:


    1. open a stream for reading
    2. open a stream for output
    while reading a line from input
    if line doesn't start with <settings> then
    ...
  20. I would suggest that you start learning the...

    I would suggest that you start learning the syntax of the C language first.
    There are plenty of free tutorials online. Alternatively you could get a book.
    A few were recommended to you in a...
  21. Replies
    213
    Views
    10,171

    What browser do you use? This site doesn't work...

    What browser do you use?
    This site doesn't work properly on Firefox.
  22. Thread: Simple program

    by thmm
    Replies
    8
    Views
    557

    You need to use a for loop to print your stars....

    You need to use a for loop to print your stars.
    for loop in C - Tutorialspoint
  23. Replies
    3
    Views
    418

    internal, item and cash are not valid C keywords....

    internal, item and cash are not valid C keywords.
    In scanf you shouldn't have a space between % and d
    You need to implement the functionality of the menu items.
  24. Replies
    213
    Views
    10,171

    Seems not many people interested here. Why don't...

    Seems not many people interested here. Why don't you try your luck in another forum:
    UNIX/Linux Programming - C++ Forum
    or
    C and C++ Forum | Dream.In.Code

    BTW. Your code calls many functions,...
  25. Replies
    5
    Views
    429

    In an array all values must have the same type....

    In an array all values must have the same type.
    You could create an array of uint32_t and store uint32_t in it.
Results 1 to 25 of 43
Page 1 of 2 1 2