I started my IT career over 20 years ago and occasionally would write trivial c programs here and there not really knowing fully what I was doing. Back then googling a programming problem wasn't as easy as it is today but we managed to troubleshoot and find solutions anyway. I say all that to say, thank you for producing these videos. Your C programming content has managed to connect dots where other content creators on YT haven't been able to reach. The format is extremely easy to follow and navigating your rational as to the when, why, and where are truly top notch. I look forward to you touching on the subject of writing CGI scripts in C as you have inspired me to do so after spending years writing them in PHP.
You're very welcome Rick, and thank you for the positive feedback, I'm glad you enjoy the format! :-) My first real programming jobs were in 2003-2005 timeframe, and I agree 100% regarding the ease of finding solutions today. There were some early websites back then, and there was always the documentation you could go through. But it's nothing compared to today when Google can lead you to a great answer for a question on Stackoverflow / TH-cam / reddit /etc. One day I am hoping to cover some http/network type programming in C. :-)
I don't think there is a way, there is an answer here on stack overflow which suggests a bit of a workaround: stackoverflow.com/questions/14823996/reset-the-c-c-preprocessor-line-the-physical-file-line
My doubt here is what if someone changes the file origin.c so the line of interest is not 51 anymore? Would someone has to manually remember to update file.c? If that is the case there is a high risk these will suffer from the same issue that documentation suffers.
Hi sir thank you for your consistently uploading video's on programming languages Here I have doubt in below programme #include int main(void) { unsigned short x = 8 , y = 0; // Pre-Increment Example on variable 'x' printf("Before Pre-Increment x=%d ", x); printf("At Pre-Increment x=%d ", --x); /*Prefix decrement*/ printf("After Pre-Decrement x=%d ", x); printf("---------------------------- "); printf("Before Post-Increment y=%d ", y); printf("At Post-Increment y=%d ", y--); /*Postfix decrement*/ printf("After Post-Increment y=%d ", y); return 0; } At last printf in the code I am expecting 65535 and the output is also same but one thing I didn't understand at the place if I change unsigned short ----> unsigned int the output at the last printf I am expecting in positive number but the answer showing in negative value which is -1 why it's so ... Thank you
%d is for outputting signed integers, %u is for outputting unsigned integers. I would change it to %u and see if you get what you expect. %d will give you the "value of the signed-type interpretation of the bits of the variable". So if the bits represent a negative number (interpreting the bits as a signed number), then %d will give you back that negative number. :-)
I started my IT career over 20 years ago and occasionally would write trivial c programs here and there not really knowing fully what I was doing. Back then googling a programming problem wasn't as easy as it is today but we managed to troubleshoot and find solutions anyway.
I say all that to say, thank you for producing these videos. Your C programming content has managed to connect dots where other content creators on YT haven't been able to reach. The format is extremely easy to follow and navigating your rational as to the when, why, and where are truly top notch.
I look forward to you touching on the subject of writing CGI scripts in C as you have inspired me to do so after spending years writing them in PHP.
You're very welcome Rick, and thank you for the positive feedback, I'm glad you enjoy the format! :-) My first real programming jobs were in 2003-2005 timeframe, and I agree 100% regarding the ease of finding solutions today. There were some early websites back then, and there was always the documentation you could go through. But it's nothing compared to today when Google can lead you to a great answer for a question on Stackoverflow / TH-cam / reddit /etc. One day I am hoping to cover some http/network type programming in C. :-)
Is there no way to reset __FILE__ and __LINE__ back to return actual values in current source file?
I don't think there is a way, there is an answer here on stack overflow which suggests a bit of a workaround: stackoverflow.com/questions/14823996/reset-the-c-c-preprocessor-line-the-physical-file-line
@@PortfolioCourses thanks for your reply. That SO question asks precisely about the use case I had in mind when asking, by the way.
@@drequena You're welcome, and that's funny! 🙂
My doubt here is what if someone changes the file origin.c so the line of interest is not 51 anymore? Would someone has to manually remember to update file.c? If that is the case there is a high risk these will suffer from the same issue that documentation suffers.
Nice 🙂.
Hi sir thank you for your consistently uploading video's on programming languages
Here I have doubt in below programme
#include
int main(void)
{
unsigned short x = 8 , y = 0;
// Pre-Increment Example on variable 'x'
printf("Before Pre-Increment x=%d
", x);
printf("At Pre-Increment x=%d
", --x); /*Prefix decrement*/
printf("After Pre-Decrement x=%d
", x);
printf("----------------------------
");
printf("Before Post-Increment y=%d
", y);
printf("At Post-Increment y=%d
", y--); /*Postfix decrement*/
printf("After Post-Increment y=%d
", y);
return 0;
}
At last printf in the code I am expecting 65535 and the output is also same but one thing I didn't understand at the place if I change
unsigned short ----> unsigned int the output at the last printf I am expecting in positive number but the answer showing in negative value which is -1 why it's so ... Thank you
%d is for outputting signed integers, %u is for outputting unsigned integers. I would change it to %u and see if you get what you expect. %d will give you the "value of the signed-type interpretation of the bits of the variable". So if the bits represent a negative number (interpreting the bits as a signed number), then %d will give you back that negative number. :-)
Heartily congratulations for unstoppable journey from 0 to 23k sub 🤞🤞🤞🤞
And Thank you...
@@ramakrishna4092 You're welcome, and thanks! 🙂