Middle of a Linked List
12:54
2 жыл бұрын
Syntax of Structs and Unions in C
13:09
Static Keyword in C Part 2/2
7:07
11 жыл бұрын
Static Keyword in C Part 1/2
5:12
11 жыл бұрын
Recursion in Computer Science Part 2/2
11:05
Binary Number Representation
10:44
13 жыл бұрын
Пікірлер
@proggenius2024
@proggenius2024 7 ай бұрын
thanks, please do more. We need more advanced c series
@proggenius2024
@proggenius2024 7 ай бұрын
please do more, very good content!
@Livy2964
@Livy2964 8 ай бұрын
it is the only one video that i found about this! thank you so much ahahah first comment :)
@theblackelephant
@theblackelephant Жыл бұрын
please f your watching this video in 2022 up this method of static making a variable accessible global is bull shit
@grimvian
@grimvian Жыл бұрын
Very rare and fantastic video explaining from documentation. I really hope he would make videos about advanced C... At 9.52 Almost the way I use a union to change RBG colors for my C training.
@abhishekgupta-du1ly
@abhishekgupta-du1ly Жыл бұрын
It very really helpful for me 😊
@grimvian
@grimvian Жыл бұрын
No unrelevant music or fancy video editing, but pure and clean explaining/teaching! HackerCS's videos are absolute gems!
@ratfuk9340
@ratfuk9340 Жыл бұрын
What if the caller doesn't know the size in advance? Is it then better to allocate memory in the called function or should the caller just guess and then the callee realloc if necessary? That seems like a bad idea.
@rpnightwolf
@rpnightwolf Жыл бұрын
Your math puts you at 23:59:59 hours a second short of 24 hours 23 times is the correct answer.
@esijal
@esijal 2 жыл бұрын
Very nice 👍
@MakeItStik
@MakeItStik 2 жыл бұрын
Hey HackerCS , good to see you are back. That was so long! Just a suggestion, the way you used to make your earlier videos where you used to explain what the problem is and what we are trying to achieve by scribbling over the page using pen tablet (maybe) was your USP. Please use the same technique, it will connect better with audience.
@ramakrishna4092
@ramakrishna4092 2 жыл бұрын
@@HackerCSVideos hey good to see back I have a doubt what is sizeof NULL in c can you tell me what is actually means
@rustycherkas8229
@rustycherkas8229 3 жыл бұрын
A great use of a union is dealing with arrays as named values and also as indexed arrays: union { struct { int monHrs, tueHrs, wedHrs, thuHrs, friHrs; } wk; int hrs[5]; } data; Code can then clearly refer to the specific "data.wk.thuHrs", for example, OR it can, for instance, sum all values: for( int i = 0; i < sizeof(data)/sizeof(int); i++) total += data.hrs[ i ]; Of course, #define'd index names (or enum tokens) would work the same, but one gets tired of seeing "v[ INDEXNAME ] = 12;" vs "u.v.realname = 12"...
@DrOggy67
@DrOggy67 3 жыл бұрын
Excellent video... Thanks a lot for explanations!
@umarjanbhat3819
@umarjanbhat3819 3 жыл бұрын
It will print the result in reverse order ...change the order of printf and recursive call
@manasverma6871
@manasverma6871 3 жыл бұрын
Thanks buddy 😀😀😀😀😀😀
@matejkvassay7993
@matejkvassay7993 3 жыл бұрын
great explanation, thanks :)
@seydoudia7828
@seydoudia7828 3 жыл бұрын
Brilliant! Thank you!
@siyanibillinumberone4054
@siyanibillinumberone4054 3 жыл бұрын
How about two dimensional array For example Name and age total 10 rows and 2 elements per row is name and age
@coderhub4806
@coderhub4806 3 жыл бұрын
I'm watching this video and this is still one of the best videos
@michealking6425
@michealking6425 3 жыл бұрын
I like your lyrical flow. You should reduce the number of times you write on the screen for it would greatly increase readability. Otherwise, c'est magnifique
@fightbreastcancerwot7073
@fightbreastcancerwot7073 3 жыл бұрын
Nice video. Just would make sure to note that combinations != subsets. This problem should have asked for all the sunsets of a string, instead of asking for combinations.
@Fakipo
@Fakipo 3 жыл бұрын
Wow, you made my day. Great video.
@raamnaath
@raamnaath 3 жыл бұрын
KZbin Recommends me after 8 Years🔥😀
@ayeshach7968
@ayeshach7968 3 жыл бұрын
The simplified form of last step T=T/12+N N=T- T/12 N=24-24/12 N=24-2=22
@vishnukartha47
@vishnukartha47 3 жыл бұрын
Hi in the 4th solution, that char pointer is not declared static, so that will be stored in the stack right, if so returning that make no sense, since after the use of that function this memory will be cleared and the return will be garbage. Am I correct? Please make a reply
@MakeItStik
@MakeItStik 3 жыл бұрын
Which software are you using to draw ?
@bhavyakukkar
@bhavyakukkar 3 жыл бұрын
why was the 'extern' keyword not required while declaring the print_num( ) function in the caller file?
@michaelotu9723
@michaelotu9723 3 жыл бұрын
I watched and I was interested. do you have a C programming course?
@johnny1483
@johnny1483 3 жыл бұрын
In one hour the minute hand goes 60 spaces. The hour hand goes 5 spaces. They go at constant rates. For any given time period, the minute hand moves 12 times as many minute spaces as the hour hand. In 12 mins the hour hand goes 1 space, and the minute hand goes 12 spaces. So the gain every 12 mins is 11 spaces. A space is gained every 12/11 minutes. 60 spaces gained in 12/11 hours.. So they meet once every 12/11 hrs. They meet 11 times every 12 hours, and 22 times every 24 hours. Nice solution. Just wanted to present an arithmetic one.
@saifaldeenal7451
@saifaldeenal7451 4 жыл бұрын
The best explaining, Thanks
@saifaldeenal7451
@saifaldeenal7451 4 жыл бұрын
The best ever found online. Thank you!
@rallokkcaz
@rallokkcaz 4 жыл бұрын
@4:25 you could also define your return type as const which can hint the compiler to figure out stack/heap/bss storage. From my experience only pass const buffers unless the messages are mutable.
@crptc5707
@crptc5707 4 жыл бұрын
I literally gave up learning C after being muddled by the declaration nonsense... until I watched your video! Much appreciated!
@excessreactant9045
@excessreactant9045 4 жыл бұрын
Very clear vid. 10/10
@xeniakaragianni8100
@xeniakaragianni8100 4 жыл бұрын
thanks ♥
@mikaarnald7361
@mikaarnald7361 4 жыл бұрын
Awesome. Thanks!
@iDROIDchannel
@iDROIDchannel 4 жыл бұрын
I know that a lot of time gone... But why don't you marked the print_num() prototype as 'extern' in caller.c?
@bhavyakukkar
@bhavyakukkar 3 жыл бұрын
i have the same doubt
@rustycherkas8229
@rustycherkas8229 3 жыл бұрын
Short answer: All vars declared (and thereby defined) outside funcs() are "globally visible" by default. 'Extern' was needed with 'int x;' (in this poor 'lesson') to DECLARE to the compiler that the LINKER will (should) find 'x' DEFINED (space allocated) somewhere in a related OBJ... Function prototypes are not function DECLARATIONS; they are simply 'promises' for the compiler to check parameters and return types. One could prototype a function "void foobar( int, float*, (char*)(int, int), int**);" and then never get around to writing the actual code for it... Just don't try to call it! Putting 'extern int x;' or the function prototype into caller.c is HORRIBLE practice. The compiler will not be able to confirm the func's parameters and return type (its "function signature") are correct. Likewise, 'x' may be declared an 'char *' in main.c, and 'float *' in caller.c... Good luck!! The compiler is helpless. This is why #include "foobar.h"; (header files) must be used to declare common (global) variables and functions. It is also why some version of "makefile" should be used for the compiler to know what OBJs and EXEs are stale after one or more source files has been altered. CAUTION: Do not declare static vars or static funcs in a header file (unless you know what you're doing). Each OBJ would otherwise receive its own private instance of declared variables... A better (minimal) example: FOO.h #include <stdio.h> extern int x; // prototype declaring there exists a variable named 'x' and that its type is 'int' void print_num(void); // prototype declaring there (may) exist a function (taking no params and returning nothing) void caller(void); // another function prototype DATASPACE.c #include "foo.h" // For compiler to 'see' and check that 'x' is a well-known integer data type... int x = 0; // definition of variable. (space allocated) CALLER.c #include "foo.h" // For compiler to 'see' there exists an 'x' and a 'print_num()' to link void caller(void) { print_num(); x = x + 1; } MAIN.c #include "foo.h" // For compiler to 'see' there exists an 'x' and what 'caller()' looks like... void print_num(void) { printf("%d ", x ); } int main(void) { caller(); // Will print "0" caller(); // Will print "1" }
@33galactus
@33galactus 4 жыл бұрын
If n is negative, just make following changes: n = -n and x = 1/x.
@shubhac4970
@shubhac4970 4 жыл бұрын
If there is a global static var x in file1.c and file2.c. How do we map the var in the .bss segment to that particular file?
@vimukthimadhusanka4806
@vimukthimadhusanka4806 4 жыл бұрын
fantastic explanation! keep it up
@isambenelmekroud3424
@isambenelmekroud3424 4 жыл бұрын
carry= (a[i]+b[i]-r[i])/10
@David-gu8hv
@David-gu8hv 4 жыл бұрын
You have to watch out for the size of Structs. If you have a struct with one char and one int on a 32-bit system the struct will be 8 bytes since the smallest amount of memory on 32-bits is 4 bytes. The char will claim 4 bytes even though it only uses 1.
@stephaniepetrone260
@stephaniepetrone260 4 жыл бұрын
get a decent microphone
@Rahulkumar-dg5pu
@Rahulkumar-dg5pu 4 жыл бұрын
Great video cleared my doubt Thanks!!
@MakeItStik
@MakeItStik 4 жыл бұрын
Great explanation. Thank you so much. Please continue making such videos.
@jackmanjls
@jackmanjls 4 жыл бұрын
Excellent presentation, both videos were very informative.
@RecycleBin0
@RecycleBin0 4 жыл бұрын
global arrays are not thread safe
@mecrajib
@mecrajib 4 жыл бұрын
Very good. I have learned a lot form you.
@mecrajib
@mecrajib 4 жыл бұрын
Many thanks.
@mecrajib
@mecrajib 4 жыл бұрын
Many thanks. Will be very helpful.