coding in c until my program crashes

coding in c until my program crashes

Low Level

2 года назад

359,193 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@joaopedrobarbosa3378
@joaopedrobarbosa3378 - 11.07.2023 00:27

&

Ответить
@IamPyu-v
@IamPyu-v - 25.08.2023 00:51

&

Ответить
@DevSolar
@DevSolar - 13.09.2023 15:56

You scanf() without checking its return value, you're headed for UB land anyway. ;-)

Ответить
@戴劭名-z8p
@戴劭名-z8p - 22.09.2023 15:58

Imagine forgetting to use reference instead of value in scanf. Good ol' C.

Ответить
@gargamel3478
@gargamel3478 - 14.10.2023 14:57

Scanf expects a pointer

Ответить
@ItsCOMMANDer_
@ItsCOMMANDer_ - 24.10.2023 01:21

The moment i saw that he declared x as an value and not an pionter i knew his hdd gimma be dead 🗿

Ответить
@konstantinsotov6251
@konstantinsotov6251 - 12.11.2023 00:57

As one man once said,
"I fear nothing. But when I hear 'C' and 'strings' in one sentence, it scares me."

Ответить
@rasati
@rasati - 15.11.2023 00:26

you need to use the adress for x in scanf, not just x itself
scanf("%d", &x);

Ответить
@James2210
@James2210 - 15.11.2023 11:44

uses scanf very obviously wrong

_PERFECT_

Ответить
@deepaktechk
@deepaktechk - 16.11.2023 05:57

you need to pass a address of the x to the scanf

Ответить
@SyntaxErrorLine32
@SyntaxErrorLine32 - 05.12.2023 23:34

Always happens to me forgetting the & in scanf

Ответить
@evanmico
@evanmico - 12.12.2023 03:02

Shit was doomed from the start when he didn't malloc or at least declare a buffer

Ответить
@janisir4529
@janisir4529 - 16.12.2023 15:54

Imagine not compiling with -Werror

Ответить
@GuyWhoChad
@GuyWhoChad - 18.12.2023 19:51

That pointer cost him his life..rip

Ответить
@gunnarmundt956
@gunnarmundt956 - 20.12.2023 18:00

real C devs know there IS NO USER INPUT BECAUSE THERE IS NEVER A USER HEHEHEHEHEHHEEHEH

Ответить
@henrygibson5852
@henrygibson5852 - 24.12.2023 00:41

Teachers be like “Now do it without help or by yourself”

Ответить
@Marshadow1
@Marshadow1 - 25.12.2023 19:06

as an python programmer, you are programming in C hinese

Ответить
@cheesepop7175
@cheesepop7175 - 29.12.2023 06:58

🤓

Ответить
@ShayyanAli
@ShayyanAli - 29.12.2023 10:39

I saw it instantly bro... NOOOOOOOOOOOOOOOOOOOOOO

Ответить
@yahyabltc2068
@yahyabltc2068 - 31.12.2023 22:31

scanf("%d", &x)

Ответить
@victorescobar7437
@victorescobar7437 - 04.01.2024 19:06

Please put whatever link you want after the content is fully finished. It's annoying to have something happen in the video and the giant hyperlink block everything even if it's not that important. My bad if i sound annoyed.

Ответить
@pllone
@pllone - 05.01.2024 13:55

kind gcc has gave you a warning msg 😂😂

Ответить
@simonharris4873
@simonharris4873 - 05.01.2024 21:52

MPFR FTW.

Ответить
@oschonrock
@oschonrock - 10.01.2024 21:40

Just turn on "-Wall -Wextra -Werror" to stop shit like this

Ответить
@binaprasad6477
@binaprasad6477 - 12.01.2024 13:17

Meanwhile in python:
x=int(input())
print(x)


Like that's it 2 lines and done

Ответить
@fariellohh
@fariellohh - 30.01.2024 23:32

THAT SCANF!!!!!!!!

Ответить
@gavrilovicpasteta
@gavrilovicpasteta - 16.02.2024 03:40

&

Ответить
@Gabrielrezcp
@Gabrielrezcp - 28.02.2024 16:26

&

Ответить
@MaximumBloop
@MaximumBloop - 12.03.2024 08:56

This is why you compile with "gcc -Wall -Werror -Wextra -pedantic"

Ответить
@JeffarryLounder
@JeffarryLounder - 16.03.2024 06:24

I am learning c++ and have zero clue what an "argc" and an "argv" are, as well as "scanf();" and "printf();".

Ответить
@nidugaming-yh8qt
@nidugaming-yh8qt - 23.03.2024 08:58

This is so meme

Ответить
@nightmonkeyps69420
@nightmonkeyps69420 - 25.03.2024 20:25

"If you code segfaults we will erase your hard drive"
I N T E R E S T I N G

Ответить
@LowLevelStudio
@LowLevelStudio - 28.03.2024 16:35

I think I saw this one in pwnable ngl

Ответить
@normbograham
@normbograham - 29.03.2024 04:40

scanf("%d", &x); what you did was give scanf an uninitialized variable.

Ответить
@overbored1337
@overbored1337 - 26.04.2024 10:25

I guess that it would work (on most platforms) if you initialized x to the address of itself before scanf 😄
x = (int) &x;

Ответить
@slyjain
@slyjain - 01.05.2024 14:04

bro &x;

Ответить
@i-use-4rch-btw
@i-use-4rch-btw - 08.05.2024 06:08

Reminder to ppl reading this comment:
A segfault is when a process tries to write into the memory of another process
Scanf just dumps stdin into a memory address
scanf(“%d”,x); does NOT write stdin int into x, but it writes stdin int to whatever address x of memory
scanf(“%d”,&x); writes stdin int into wherever in memory int x is because &x is where x is in memory

Ответить
@laffeyh639
@laffeyh639 - 28.05.2024 22:56

hey guys
currently trying this on windows 11.

Any idea how I can deactivate the fault tolerant heap for only one code execution?
Maybe there is some c lib to deactivate and reactivate it?

Ответить
@DjaberBousba-u8c
@DjaberBousba-u8c - 04.06.2024 01:22

u forget the & before x in scanf function

Ответить
@whiskas-1
@whiskas-1 - 23.06.2024 18:57

holy fuck, I feel sick seeing that x being passed as value to scanf

Ответить
@starpawsy
@starpawsy - 23.07.2024 01:02

In the Bible (K & R), it specifically warns that scanf needs to be passed a pointer, AND also makes the point that this is a common fault.

Ответить
@vivekanandapradhan9067
@vivekanandapradhan9067 - 04.09.2024 00:36

You wrote the code wrong
scanf takes the address of x, not x, so use &x and not x.

Ответить
@sen8078
@sen8078 - 11.09.2024 17:56

why he puts these argv argc bs?

Ответить
@TheRythimMan
@TheRythimMan - 02.10.2024 00:37

Just started learning Go last week after only ever using interpreted languages before (I heard Go was easy compared to other compiled languages). While I have no real experience in C (other than trying and failing years ago) I'm pleasantly surprised that I actually knew where the error was (passed a value instead of a pointer in the scan function). Maybe there is hope for me yet and I could eventually learn C. And Go could be the gateway to learning it.

Ответить
@gamingjeery7
@gamingjeery7 - 06.10.2024 19:01

&😂😂

Ответить
@jumpjump-oz2pr
@jumpjump-oz2pr - 21.10.2024 10:23

I would called this skill issue

Ответить
@mojaindustries4185
@mojaindustries4185 - 23.10.2024 19:06

&

Ответить