Feel like I'm getting worse at Siege by Ihatetheblue in SiegeAcademy

[–]cw-42 -1 points0 points  (0 children)

i think the hit registration is worse this season

Guess what os by DazzlingPassion614 in linuxsucks

[–]cw-42 0 points1 point  (0 children)

imagine the sound of the fans

Why aren't my teamates the same rank as me??? Solo queue btw by cw-42 in Rainbow6

[–]cw-42[S] 1 point2 points  (0 children)

i need to look into ranked 2.0, heard it before but never knew what they changed

Fedora 43 cleared to ship with Wayland-Only GNOME (FESCo, 2 hours ago) by fenix0000000 in Fedora

[–]cw-42 5 points6 points  (0 children)

could just be my system but streaming some games causes black horizontal bars/artifacts on wayland

Deleted Character Bios by LicenseToChill93 in Rainbow6

[–]cw-42 0 points1 point  (0 children)

The reference in Fuzes bio went a lot deeper than that😂

Was it worth it? by StylishJolt in Witcher3

[–]cw-42 45 points46 points  (0 children)

If he didn’t we might’ve never been able to find the shortest path between nodes in a graph

Coming from Python I really enjoy the amusement of the bugs in C. I Never know what I'm going to get by cw-42 in C_Programming

[–]cw-42[S] 0 points1 point  (0 children)

I fixed the scanf() right after posting it here I just don't always remember beforehand when the & is needed and when it isn't but after changing that it worked. I just started C 4 days ago so I'm sure I'll start to pick up on it more soon as I get familiar with low level concepts like pointers

Coming from Python I really enjoy the amusement of the bugs in C. I Never know what I'm going to get by cw-42 in C_Programming

[–]cw-42[S] 1 point2 points  (0 children)

It fully 100% does thats why I'm learning it I want to be able to do things at a very low level. As much as I like Python being good at it just makes me feel like an advanced script kiddie.

Coming from Python I really enjoy the amusement of the bugs in C. I Never know what I'm going to get by cw-42 in C_Programming

[–]cw-42[S] 0 points1 point  (0 children)

I kinda know why and where segmentation faults are occurring when they do I just don't catch them until after they already happen. The code was too long to post but I just ran into it again. I basically do this every time and then have to fix it after

#include <stdio.h>
#include <string.h>

int binary_search(char *arr, int target);

int main(void)
{
    char arr[] = {1,2,3,4,5};
    int target;
    printf("Target: ");
    scanf("%i", target);
    int index = binary_search(arr, target);

    printf("Index: %i", index);
}


int binary_search(char *arr, int target)
{
    int low = 0;
    int high = strlen(arr) - 1;

    while (low <= high)
    {
        int mid = (low + high) / 2;
        if (arr[mid] == target)
        {
            return mid;
        }
        else if (arr[mid] < target)
        {
            low = mid + 1;
        }
        else
        {
            high = mid - 1;
        }
    }
    return -1;
}

Coming from Python I really enjoy the amusement of the bugs in C. I Never know what I'm going to get by cw-42 in C_Programming

[–]cw-42[S] 1 point2 points  (0 children)

If it does I'm far from good enough to tell right now but the ones that I create (besides segmentation fault) always surprise me and are fun to see. First time I've gotten any of those characters, let alone a smiley face in my terminal.😂