Search:

Type: Posts; User: gawiellus

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    2
    Views
    658

    Minimum Perimeter of a Rectangle

    Hi
    I have to write function that given area as unsigned long long find the minimum perimeter of a rectangle with integer width and length. My code below



    typedef unsigned long long ull;

    ...
  2. Structures and exception read access violation

    Hi i am writing some program where declare 3 stuctures code below


    typedef struct Card
    {
    char color;
    int face;
    }CardT;
  3. Replies
    8
    Views
    840

    I have to use scanf function. It is weird because...

    I have to use scanf function. It is weird because


    while(scanf("%s",slowo)!=EOF)

    works well in linux
  4. Replies
    8
    Views
    840

    Nothing work properly even if i will compare...

    Nothing work properly even if i will compare slowo[0] to 0x1a.
  5. Replies
    8
    Views
    840

    I am using windows. The purpose of this programm...

    I am using windows. The purpose of this programm is to reading data from input until EOF. Input can be number or characters such as +, - and other arithmetic and bitwise operators. That is the reason...
  6. Replies
    8
    Views
    840

    scanf function and EOF

    Hi
    I write some programm which reading data from stdin until EOF



    while (scanf("%s",slowo)!=EOF)
    {
    do something
    }
  7. Replies
    2
    Views
    3,291

    Problem solved

    Thank you for answer
  8. Replies
    2
    Views
    3,291

    Triangular number

    Triangular number is the amount of point that can fill equilateral triangle. For example number 6 is triangular number because all sides of triangle has the same amount of point. The problem for this...
  9. I think I know where is mistakie

    I don't have to use static variable. I have to use thread. Code for sample test I put below.


    #include <criterion/criterion.h>
    #include <stdio.h>
    #include <stdatomic.h>
    #include <unistd.h>

    ...
  10. I don't understand your answer. Varialbe i is...

    I don't understand your answer. Varialbe i is static. It shoul'd keep the value, between function "pusty()" calls.
    This is problem from codewars site: Fix a bug in provided method which should...
  11. Pointer to function and execute function n times

    Hi
    I have to fix the bug in code where function should be execute n times. Provided method is out of the times. Below code to fix


    void execute (void (*action)(), int nTimes) {
    for (int i =...
  12. Replies
    2
    Views
    2,725

    I have changed the code but I still got message...

    I have changed the code but I still got message
    Test Crashed
    Caught unexpected signal: SIGSEGV (11). Invalid memory access.


    #include <stddef.h>
    #include <stdlib.h>
    int compare(const void *a,...
  13. Replies
    2
    Views
    2,725

    sorted two array and result array

    Hi
    I write function that take 5 parameters: pointer to array a, pointer to array b, size of array a, size of array b and pointer to size of result array
    My task is to sort first array remove...
  14. Replies
    7
    Views
    2,403

    Sorry I probably said wrong my task is not print...

    Sorry I probably said wrong my task is not print but return as a string. If memory is limited than probably n must be lower than 65536. As I said this is task from codewars site then n must be...
  15. Replies
    7
    Views
    2,403

    This is task from codewars site so probably n is...

    This is task from codewars site so probably n is correct value.
    So the way is to calculate perfect bytes of allocated memory? For example


    if(n<9)
    size=n*(n+1)/2;
    if(n>9&&n<=99)...
  16. Replies
    7
    Views
    2,403

    maximum n size is 2^16 which give us 65 536 so n...

    maximum n size is 2^16 which give us 65 536 so n should be at least 5 characters long


    I thought that I don't have to calculate perfect value of characters for each n thats why I allocated bigger...
  17. Replies
    7
    Views
    2,403

    Returning pattern

    Hi
    I am writing programm to print pattern like below
    1
    22
    333
    4444
    55555
    666666
    up to n given as a parametr.
    my code below
  18. Replies
    5
    Views
    2,771

    long int solve the problem thank you

    long int solve the problem thank you
  19. Replies
    5
    Views
    2,771

    Is double number even or no

    Hi
    I have to write programm to check if double number is even or no
    Number can be negative positive, double or int.
    Double number is uneven 0 is even.


    bool is_even(double n)
    {
    int...
  20. Replies
    7
    Views
    2,791

    Probably actual string should be "ac" because my...

    Probably actual string should be "ac" because my solution give me string with backspaces and codewars compiler give me not proper solution
  21. Replies
    7
    Views
    2,791

    Remove # and remove previous char for expample...

    Remove # and remove previous char for expample "abc#d##c" should give me "ac"
  22. Replies
    7
    Views
    2,791

    Replace # into backspace

    Hi im writing program from codewars site.
    The aim of this program is to replace # into \b. After compiling in Visual Studio I am getting proper result but codewars site give me wrong result.

    ...
  23. How to detect keylogger or remote desktop programm

    Hi
    I have a question how to detect a keylogger or remote desktop spy program. I ask because i suppose that I have one on my computer. Standard antivirus application detect nothing. Just spy shelter...
  24. Replies
    4
    Views
    3,281

    Convert int to string in binary base

    Hi
    Is there a library function in C which convert int decimal to binary string. I know about itoa function but it is not part of standard.
  25. Replies
    24
    Views
    12,978

    Thank you for yours answers. I know the...

    Thank you for yours answers. I know the solutions. In this case I have to use unions and bit fields. I gave me the proper solution.
Results 1 to 25 of 32
Page 1 of 2 1 2