XOFF
As an engineer my knowledge comes from lectures i took and lots of experiments on kernel based applications
Houdaifa
thank you
Danya🔥
Maybe Tanenbaum
Or MIT, Stanford, etc university courses
Azadi
so the OS have a copy of all the pointers ?
You've allocated some dynamic memory in your program and then forget to free it. The OS manages both your program and memory, so it (hopefully) frees that memory block.
Mar!o
Question about memory managment When you quit a program how the OS can know what memory spaces to free ? In the case when you declare variables on the runtime and lose thier adress
the OS (kernel memory manager) does some bookkeeping about the memory it gave to process x remember that functions like malloc do not always directly allocate from the OS depending on the allocator there is a free-list inbetween to avoid fragmentation and only big chunks are requested using mmap, brk oder VirtualAlloc etc.. when process x ends, it simply also frees all associated resources luckily it does that if not some program might fill up your ram and even when you close it the ram will remain so you have to reboot your pc :(
Maynk
Hi
Maynk
Is there any channel to learn c++
KBS
Is there any channel to learn c++
😳😳😳😳😳😳
Dima
use your brain
Tazin
You may follow w3schools. That's a website though
Tazin
Or programming with harry YouTube channel
B;
Is there any channel to learn c++
Best way it to code, don't fall into tutorial hell. I started last year
Maynk
Or programming with harry YouTube channel
I think it's code with Harry 🙈
B;
Best way it to code, don't fall into tutorial hell. I started last year
And I am on the verge of getting gold badge from HACKER RANK
Maynk
Best way it to code, don't fall into tutorial hell. I started last year
What if i don't know anything about coding then how can I code -_- ?
B;
What if i don't know anything about coding then how can I code -_- ?
For absolute beginners I recommend joining offline classes.
Maynk
Oh but I think I am in the middle I know about coding and know how to code
Maynk
I am not absolute beginner though
Maynk
I am learning c++
B;
I am learning c++
Can you make classes structures functions etc?
Maynk
Bro I am on 6th video 😂
Ehsan
Is there any channel to learn c++
The Cherno is very good, but I think best way to learn c++ is with books
Maynk
i only know a little coding
B;
Bro I am on 6th video 😂
I hold certification in data structures and algorithms. I still consider my self a beginner.
Chat Boss
Maynk Mahaur sent a code, it has been re-uploaded as a file
Ehsan
https://www.edx.org/course/introduction-computer-science-harvardx-cs50x
B;
Why?
Have you completed arrays?
Maynk
Have you completed arrays?
No I am on basic input & output
Ehsan
Why?
Because you are a beginner. Most people start coding not knowing what they are actually doing; programming and coding are not the same. You must have a sound understanding of the field in general before you dive deep; also C++ is not a recommended language for beginners as it has too many features and you can easily get overwhelmed.
B;
No I am on basic input & output
You're on level 0. Join a proper class for coding. Offline recommend
Maynk
Ok
B;
Which certification?
A certification from a computer science institute, where I took classes for DS algo.
B;
Oh, I thought it's online certification
I belive in offline classes . I like in person learning more . I will switch to online classes for more advance concepts
B;
What is ds algo
Data structures and algorithms 🤦‍♂️
Maynk
Lmao
B;
Where are you from
This a a group for learning coding. Let's not get personal
Ehsan
Where are you from
Go to OT group
Maynk
Because in my country online courses are more suggested than offline
\Device\NUL
bruh
Ehsan
I am promoting your group lol
\Device\NUL
#ot
Dima
/blue_text_must_click
\Device\NUL
There
Danya🔥
/blue_text_must_click
Ehsan
Maynk
Lmao what is this
\Device\NUL
/blue_text_must_click
Revive @bluetextbot
Dima
remove warning
ask politely
Ehsan
ask politely
please daddy 🥺🥺🥵
Maynk
ask politely
Mine too 😅
Danya🔥
Self-destruction
B;
Self-destruction
He should have studied destructor function in CPP ⚰️🙏
%Nikita
Because it has more science-related capabilities built-in
But we can rewrite Fortran science library in C :)
Ehsan
But we can rewrite Fortran science library in C :)
You can write anything with any complete turing language
%Nikita
You can write anything with any complete turing language
Sure. Back in the old days, when we were switching from Fortran to C, my colleagues were not comfortable with LibC, because it’s math.h module had just primitive math functions like sin, cos, abs, etc. My idea was to rewrite most used part of Fortran library in C, or make it somehow compatible with C. But, unfortunately we hadn’t got the source, because Fortran was running on USSR M-222 computing machine, which had very rare architecture, and was kinda experimental. So we disassembled some functions and made our own header to make it possible to do Fortran stuff in C It was a long time ago, and I don’t remember where this header is now :)
Danya🔥
But we can rewrite Fortran science library in C :)
I just do not think that C is suitable for any sort of stuff except OS and microcontollers I'd write it in C++, personally. If there are specific performance requirements - I'd write it in the limited C++ - without exceptions, RTTI and other stuff. C is not suitable for this kind of stuff, because it's basically a portable assembly language with syntactic sugar
Danya🔥
what is limited c++ you speak off?
I wrote it in the message
Danya🔥
It’s very well designed “portable assembly language with syntactic sugar” btw :)
No, I do not think so char* foo = "Hello"; Is this the example of the good design?
%Nikita
No, I do not think so char* foo = "Hello"; Is this the example of the good design?
Sure, there is nothing wrong with it. Foo points to string located somewhere in memory
Danya🔥
Sure, there is nothing wrong with it. Foo points to string located somewhere in memory
The string literal has type const char[6] but I assign it to non-const pointer and it is valid C. Is it truly ok?
Danya🔥
But it’s the same with assembly
So what? We do not actually get to know about the computer architecture while programming in C, right?
%Nikita
The string literal has type const char[6] but I assign it to non-const pointer and it is valid C. Is it truly ok?
I think it’s your fault, and also writing to strings defined as char *thing = “thing”; Is clear UB