ft_print_comb piscine school 42

  Рет қаралды 18,320

Oceano

Oceano

Күн бұрын

🇮🇹🍕🍝Canale Italiano - / @onaeco_ita
. Array and Pointers
~ • 5.0.1 The C programmin...
Nested while loops article
~ www.geeksforge...
typedef struct 🔗s_links🔗
{
👨🏻‍🏫 Udemy course for total beginners, pre_knowledge before C (Overflow, 2’s complement, BASH, VIM…) - www.udemy.com/...
📑 Notion community page (FREE coding sources) - suspectedocean...
🧾 Medium (code articles) - / jalal92
📲 Telegram group - t.me/suspected...
💻 GitHub - github.com/sus...
🛸 Discord - / discord
🐦 Twitter - / suspectedoceano
☕️ ChannelSupport - www.buymeacoff... (if you read this, you are already supporting, TY!)
} 🔗t_links🔗

Пікірлер: 33
@MrSkyydude
@MrSkyydude Жыл бұрын
"Arrays and vectors are interchangeable. They have the same meaning." You have no idea how badly I needed to hear that.
@onaecO
@onaecO Жыл бұрын
Dear friend, i said it because “online tutorials often say so”. I also was confused, but to be clear a more concise explanation: Arrays in C are not typically referred to as "vectors". The term "vector" is more commonly used in C++, where it is a specific type of container class that can be resized dynamically. Some libraries for C, such as the GNU Scientific Library (GSL), do provide a vector data type, but it is not a part of the standard C language. It is possible that some people might call C arrays "vectors" as a way to describe the array's nature of holding multiple variables of the same type in a contiguous memory location, similar to how a mathematical vector holds multiple scalars, but this terminology is not standard in C. TL;DR When in C in a tutorial i hear vector, is 99% an array
@rwin01
@rwin01 Жыл бұрын
These videos are insanely helpful, thanks a lot
@onaecO
@onaecO Жыл бұрын
Ty bro, good luck with the piscine
@rachm06
@rachm06 Жыл бұрын
Mi sa che il livello di difficoltà tra questo e gli esercizi precedenti è un tantino non lineare 😆🥲 . Comunque sti video sono la salvezza!
@onaecO
@onaecO Жыл бұрын
haha troppo vero. Guarda che questo canale esiste perché lacrimavo sangue alla mia piscina 🤣 Grazie in bocca al lupo!
@kme3894
@kme3894 10 ай бұрын
in realtà di solito nella piscine si risolve senza array in modo più semplice, ma diciamo che qui si fa un'utile introduzione agli array, che vanno comunque capiti
@onaecO
@onaecO 10 ай бұрын
@@kme3894Condividi il code, lo pinno! Questo sono io, agli inizi, che mi allenavo. Uno deve guardare questi video come ispirazione, non aspirazione
@kme3894
@kme3894 10 ай бұрын
@@onaecO sono video ottimi, hai tutta la mia gratitudine per le tue spiegazioni davvero approfondite e logiche che dai! grazie davvero!!
@deaneatsgreens
@deaneatsgreens Жыл бұрын
Thank you for the thorough explanation! I learned a lot from this, currently doing the Piscine now. I have a question though, what is the importance of the './n'? If I remove that whole function, and instead just print v within the 3rd nested layer, everything still works fine.
@onaecO
@onaecO Жыл бұрын
Ty bro! You right it is just to confuse u all! 🤣 indeed it is not necessary, just to print a mew line if it is the last combination
@kme3894
@kme3894 10 ай бұрын
@@onaecO I have eliminated that line (or rather commented it out) and it still works perfectly fine. Actually, looking at the desired output in the subject description they give you at the piscine, without that line of code the output is now identical. So I think it's best to _not_ include the whole line with write(1, ". ", 2); at all. Thank you for a great tutorial and discussion platform Oceano
@onaecO
@onaecO 10 ай бұрын
@@kme3894You tot right 👏🏻 Ty for the kind words, if u wanna the real discussion join discord->discord.gg/de8Vx8BZKJ We are all students from around the globe ;)
@Quixindo-xz1sj
@Quixindo-xz1sj 3 күн бұрын
I feel more comfortable with for loop :) void ft_print_comb(void) { char a; char b; char c; for(a = '0'; a
@IbraimAugusto
@IbraimAugusto 8 ай бұрын
Thanks
@hamidslato6620
@hamidslato6620 Жыл бұрын
Thank you for teaching; I've learned a lot from you. However, I believe there's a mistake in this exercise. The last number, '789.' should be without point '789'
@onaecO
@onaecO Жыл бұрын
Thx bro! thx for the comment For the mistake I didn't mean to give actual correct solutions (they are not moulinetted), i just discussed the algorithm behind ;)
@hamidslato6620
@hamidslato6620 Жыл бұрын
​@@onaecO Ah, algorithms! I'm still trying to understand them. I've never done coding before, and I also come from a sports background, so I need to reprogram my brain to think like this :) Thanks again and good luck!
@onaecO
@onaecO Жыл бұрын
@@hamidslato6620 I know your pain 😂. Good work with your studies!
@mustafaahmadi5761
@mustafaahmadi5761 5 ай бұрын
but there is not description about array.
@KhalidTubing
@KhalidTubing Ай бұрын
Interesting
@idhemhyouka129
@idhemhyouka129 Жыл бұрын
great video thanks !
@onaecO
@onaecO Жыл бұрын
شكرا مهدي!
@LukexhKk-hr7uy
@LukexhKk-hr7uy Жыл бұрын
Do you have to use array? This is what Chat GBT did it without. first it did for loop but then I asked it to use while loop instead : #include void ft_print_comb(void) { int i = 0, j = 1, k = 2; while (i
@onaecO
@onaecO Жыл бұрын
Dear friend this is ok, there are many ways to achieve the same goal ;)
@kme3894
@kme3894 10 ай бұрын
is this accepted at the piscine though? I thought we couldn't use printf but only write?
@imranelalami629
@imranelalami629 3 ай бұрын
any feedback on this way of solving it ? #include void ft_print_comb(void){ char a = '0'; char b; char c; while ( a
@johnwa7585
@johnwa7585 Жыл бұрын
I think the code you wrote does not fulfill the requirements of the task
@onaecO
@onaecO Жыл бұрын
Can you provide an explanation? i will pin it for others ;) Ty
@johnwa7585
@johnwa7585 Жыл бұрын
@@onaecOI'm not expert in C language nor in 42 campus tasks, therefor my claim could be wrong, but in the task requirement's, 1: the number 021 isn't shown in the expected output, so I guess it's a special case? 2: it says that the number 999 will not be in the output because 9 is shown more than once, does this apply to 111, 220, 555,... ? 3: it says that number 987 isn't there because 789 is, does this apply for combinations like 321 123 ? if these claims are valid I can post my solution to the task to get your feedback, and thank you for the channel you are doing great
@onaecO
@onaecO Жыл бұрын
The main thing is that intra-number digits has to be sequential, like 021 cannot be a correct sequence. Anyway put your github solution here ;)
@johnwa7585
@johnwa7585 Жыл бұрын
@@onaecOYou are right, my fault, now I fully understand the way it should be implemented, I actually don't have my solution on GitHub, I just wrote it after watching your video using for-loops but the thing is that I choose to start the initial inner loops from 0x30, anyway here is the code without modification, #include void cc() { int i, j, k; for(i = 0x30; i
@onaecO
@onaecO Жыл бұрын
🫡👌 maybe you wanna put it here in the piscine room discord.gg/kfR8F3suWa, others may benefit
ft_print_comb2 piscine school 42
16:47
Oceano
Рет қаралды 12 М.
SCHOOLBOY. Мама флексит 🫣👩🏻
00:41
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 7 МЛН
Players vs Corner Flags 🤯
00:28
LE FOOT EN VIDÉO
Рет қаралды 31 МЛН
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 110 МЛН
Just enough assembly to blow your mind
29:31
Kay Lack
Рет қаралды 42 М.
putnbr in C
32:13
Oceano
Рет қаралды 12 М.
fr_print_combn piscine school 42
16:16
Oceano
Рет қаралды 9 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 376 М.
Just enough C to have fun
39:29
Kay Lack
Рет қаралды 40 М.
The 42 Piscine - Everything You Need to Know
7:51
42 Berlin
Рет қаралды 16 М.
Every Programming Language Ever Explained in 15 Minutes
15:29
Flash Bytes
Рет қаралды 326 М.
Dynamic Programming isn't too hard. You just don't know what it is.
22:31
DecodingIntuition
Рет қаралды 144 М.
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 418 М.
How to Succeed the Piscine at 42 School
13:35
Coding Girl
Рет қаралды 19 М.
SCHOOLBOY. Мама флексит 🫣👩🏻
00:41
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 7 МЛН