Search:

Type: Posts; User: giorgosmarga

Search: Search took 0.01 seconds.

  1. Replies
    14
    Views
    711

    >There is a need to cast malloc in C since the...

    >There is a need to cast malloc in C since the exercise says so.

    >How should i make tableRgs be the pointer I get from malloc.
  2. Replies
    14
    Views
    711

    typedef struct { long unsigned int code;...

    typedef struct
    {
    long unsigned int code;
    fullName name;
    short unsigned int matches;
    } registers;


    typedef struct{
    registers **rgs;
  3. Replies
    14
    Views
    711

    After realloc i am checking if the pointer if...

    After realloc i am checking if the pointer if null, if it is it returns. Thats why i am kinda confused, my program crashes instead of returning.
  4. Replies
    14
    Views
    711

    Realloc limit

    Hey,
    My programs crashes after the 27th time i call realloc. Is there a limit in realloc or what else could it be?
  5. Replies
    3
    Views
    504

    And if i do this: registers rg; matches...

    And if i do this:


    registers rg;
    matches mtchs;
    rg.codeName = 123;
    rg.matchCode = 123;
    strcpy(rg.name->fullName, "123");
    strcpy(rg.name->lastName = "123");
  6. Replies
    3
    Views
    504

    Array of pointers to structs

    I am kinda confused with this.




    typedef struct{
    char firstName[SIZE];
    char lastName[SIZE];
    } fullName;
  7. Stop a while/for loop when the user inputs a string

    Hello,
    How can i break a for/while loop when the user enters a specific string?

    In the main function, I ask the user to enter 10 strings and the programm should stop when the user enters for...
  8. Make an array the same as an array from a function

    Hey,
    I have a function that returns an array that contains all the digits of a number


    int seperation(int number){
    int arrayOfDigits[SIZE];
    int i = SIZE - 1;
    int lastDigit;
    ...
  9. Replies
    4
    Views
    703

    fgets and size

    Lets say i want to create a programm that takes a string and prints it
    At the beggining i have to declare my string and give it a size.For example, if i give it 10, can i write this?...
  10. Thread: struct

    by giorgosmarga
    Replies
    1
    Views
    709

    struct

    Hello guys,
    I want to create a struct that lets say is the employee and contains some values for the employee
    If i want to create n employees(The user says how many are the employees of the...
  11. Replies
    1
    Views
    691

    The last character of a string

    int main()
    {
    int lastDigit;
    char num1[3] = "123";
    lastDigit = strlen(num1) - 1;
    printf("%c", num1[lastDigit]);
    return 0;
    }

    Guys, any idea why this code doesnt work?
Results 1 to 11 of 11