I just checked this and kinda found a logic explanation for the case when output is 6. The increment operator has the highest precedence in this case, so first it evaluates all these operations from left to right, then it proceeds to do the arithmetical operations
Help, I must be missing something. I don't understand why incrementing from left to right the Fourth increment is not evaluated to 4, and when incrementing from right to left the value of the First increment is not 1.
Because a++ first evaluates the value of a and *then* it increments it. int a = 0; printf("%d ", ++a); // here you get 1 printed on the screen // a is 1 from here on out int a = 0; printf("%d ", a++); // here you get 0 printed on the screen // a is also 1 from here on out So the value of a is first passe to printf and, only after executing the printf statement, it gets incremented. After the expression, both pieces of code have the same effect (adding 1 to a)
@@CodeVault recursive function,pointer ,pointer within pointer,structure etcccc. (.but start from basic to expert level ) Create lengthy video, in every part put at least 3~4 example related topic.🤗
I'm no "pro" but I would say you can start by creating a simple project that you keep on adding to (something like a calculator in the terminal, then you add more complex operations to it, after that you make it work for any base number, then maybe even add a GUI to it etc.). Whenever there is something that you don't know or don't understand just google on the internet and (if possible) read the official documentation
@@CodeVault thanks for your valuable words i will do this way.for me ur a pro cause i have attended a Robert Bosch interview they asked me difference between declaring and definition of a variable at the i time i was confused after seeing ur video on that topic got clear idea,the way you explain things i can catchup easily btw im an 24 year old embedded software developer from india
Wow, very cool! Honestly, I don't have much professional experience in C. I try to share whatever I learned so far. Since you're working in the embedded field you probably know (or will know in the future) more than I do about the language
Could you make a detailed video on recursion please? You explain so well...it would be of a big help to lot of us. I have an upcoming xm in 10 days so a video on the topic would really help. Thank you so much. :D
I just checked this and kinda found a logic explanation for the case when output is 6. The increment operator has the highest precedence in this case, so first it evaluates all these operations from left to right, then it proceeds to do the arithmetical operations
Thanks for your work sir
What is your keyboard name bro, that sound so great
It's a Das Keyboard Model S with brown switches. I like it too, much more than other mechanical keyboards!
Help, I must be missing something. I don't understand why incrementing from left to right the Fourth increment is not evaluated to 4, and when incrementing from right to left the value of the First increment is not 1.
Because a++ first evaluates the value of a and *then* it increments it.
int a = 0;
printf("%d
", ++a); // here you get 1 printed on the screen
// a is 1 from here on out
int a = 0;
printf("%d
", a++); // here you get 0 printed on the screen
// a is also 1 from here on out
So the value of a is first passe to printf and, only after executing the printf statement, it gets incremented. After the expression, both pieces of code have the same effect (adding 1 to a)
i have the same code run on various version of GCC compiler and they all are showing 6
Waiting for bubble sort,selection sort,quick sort 😁. But I don’t like merge sort. 😂
please make videos on IPC and linux kernel device drivers
I'll keep it mind! Thanks
can u make video for midium level students for c programming
Yea, I have quite a few videos for people that already somewhat know C programming. Do you have anything specific in mind?
@@CodeVault recursive function,pointer ,pointer within pointer,structure etcccc. (.but start from basic to expert level )
Create lengthy video, in every part put at least 3~4 example related topic.🤗
Hmm, this could be well received as a paid course. Will look into it
How to become pro in c programming please tell the way to practice every day I didn’t get the way to be good at it.
I'm no "pro" but I would say you can start by creating a simple project that you keep on adding to (something like a calculator in the terminal, then you add more complex operations to it, after that you make it work for any base number, then maybe even add a GUI to it etc.). Whenever there is something that you don't know or don't understand just google on the internet and (if possible) read the official documentation
@@CodeVault thanks for your valuable words i will do this way.for me ur a pro cause i have attended a Robert Bosch interview they asked me difference between declaring and definition of a variable at the i time i was confused after seeing ur video on that topic got clear idea,the way you explain things i can catchup easily btw im an 24 year old embedded software developer from india
Wow, very cool! Honestly, I don't have much professional experience in C. I try to share whatever I learned so far. Since you're working in the embedded field you probably know (or will know in the future) more than I do about the language
@@CodeVault yeah i will, in my opinion you’re so good at understanding things keep doing it also you’re one of the good content creater in youtube 😁
Could you make a detailed video on recursion please? You explain so well...it would be of a big help to lot of us. I have an upcoming xm in 10 days so a video on the topic would really help. Thank you so much. :D
I'll look into that next week I think
@@CodeVault thanks a lot..🤗❤
❤❤❤❤
Your accent is inunderstamdable.
You can use youtube captions to help you understand the videos better
#include
main()
{
int n;
n=f1(4);
printf("%d",n);
}
f1(int x)
{
int b;
if(x==1)
return 1;
else
b=x*f1(x-1);
return b;
}
explain recursion
I will do a video on recursion sometime this month