Thank you for your helpful explanation, your videos always help me
@RDFR-cy4ov Жыл бұрын
Good to see you again
@marksvids1156 Жыл бұрын
I needed this 3 days ago, it was in my final exam lol
@CodeVault Жыл бұрын
Damn... sorry for being late
@marksvids1156 Жыл бұрын
@@CodeVault dont worry, all your other videos have helped me a lot for this exam.
@igoriton8371 Жыл бұрын
Hello sir. First and foremost, I would like to say that your videos are awsome and really helpful. Secondly, I have a question. Correct me if I'm wrong but, when you try to print what's inside of a pointer, you are dereferencing it, right? So why doesn't the program crash when you try to print env_variable at 1:40 ? I believe it shouldn't even print anything besides "segmentation fault (core dumped)".
@CodeVault Жыл бұрын
There's no dereferencing inside the main function when I am calling printf. char* env_variable; printf("%s ", env_variable); // derefencing would be if passed *env_variable So, printf gets a pointer and, inside the printf function it probably has a check for NULL so it doesn't dereference the pointer and instead prints out the characters "(null)"
@igoriton8371 Жыл бұрын
Thank you for answering my question. Im used to seeing my code crash due to passing empty strings to functions so I got confused. When I try to solve the crashes in the debugger, the SIGSEV signal never appears at the function call, but the fact that you can print an empty string still caught me off guard because I've never seen it. Once again, thank you for the explanation
@ongayijohnian878710 ай бұрын
Thanks big time 💯
@chamudradamien601 Жыл бұрын
Please do C++ too, class and other stuff only unique to C++
@karimabelkada6417 Жыл бұрын
comment afficher le statut de retour d’appel de la commande shell
@Patriko306 ай бұрын
how can i implement my own my_getevn function which will will work exactly like this ?
@CodeVault5 ай бұрын
You could assign envp to some global variable and simply have the function use that. Since envp is a local variable in main, it will never deallocate before the program ends
@vilijanac Жыл бұрын
Do you know that Perl language is a higher level C, it should be by default on every system? i.e.: foreach (keys(%ENV)){print $_,"=", "\'".$ENV{$_}."\'", " "}
@CodeVault Жыл бұрын
I haven't worked with Perl before but I noticed a lot of the Linux libraries use it
@vilijanac Жыл бұрын
@@CodeVault Yes it is beautiful, works so close with C and libraries. You don't worry about types and memory management, has even own garbage collection, fast but is only an on the go interpreter. On modern computers don't need to worry about that this much as being slower or less efficient. It is better to concentrate on your algorithm, and also find if possible modules already providing what you need, so do not reinvent the wheel.