Thank you Andrew, glad to hear you enjoyed it! :-D
@yogeshchauhan9401 Жыл бұрын
Question:You have to take one int ,one float and one string as input then u have to add float and int values and then concatenate it with given string.How to approach this question?
@TSkateT6662 жыл бұрын
Thanks, been using ur channel a lot lately!
@PortfolioCourses2 жыл бұрын
Awesome, I'm very glad to hear that! :-D
@iamacar10172 жыл бұрын
Thanks a lot, super useful for something i am working on at the moment :)
@PortfolioCourses2 жыл бұрын
You're welcome, I'm glad to hear it was helpful for you! :-D
@bsykesbeats2 жыл бұрын
Great breakdown... at 3:45 why did it print garbage values after 10.5 if the for loop was i < length? Shouldn't it stop after 10.5?
@PortfolioCourses2 жыл бұрын
That's a great question! 😀 So those weren't garbage values, those were actual 0s that were in the string. If you use: printf("Hello %d %f", 2, 10.5); You'll get something like this too: Hello 2 10.500000 It's just the way the %f placeholder works that it may print more decimal digits of precision than we really need. You can use %.2f instead of %f to limit it to 2 decimal digits of precision. 🙂
@bsykesbeats2 жыл бұрын
@@PortfolioCourses ohhh gotcha, makes sense! Thanks for the reply!
@PortfolioCourses2 жыл бұрын
You’re welcome! :-)
@gustavopalma6172 Жыл бұрын
Hey! Thanks for the video, really well explained. I was wondering, what compiler you use in this video?
@PortfolioCourses Жыл бұрын
You’re welcome Gustavo! :-) In this video I am using the gcc compiler on a Mac, with the terminal. I am using Visual Studio Code as the text editor.
@gustavopalma6172 Жыл бұрын
@@PortfolioCourses appreciated! Please have a wonderful day!
@PortfolioCourses Жыл бұрын
@@gustavopalma6172 You too! 🙂
@michaelbenard6758 Жыл бұрын
I have seen alot of your videos and are helpful, I have a little problem how would I get computer serial Number. system("wmic get bios serialnumber>sn.txt"); And store it in an array of character and then print it on screen.? I really need help with that.
@devdude76072 жыл бұрын
Hi, does a regular printf() store it's value in the memory? If not then where does it eventually go?
@PortfolioCourses2 жыл бұрын
It might be in memory while printf() is executing, but printf will print the data to the console/terminal/shell we call it as output. :-) Like in this video, we see the output from printf in the console.
@seyedehfatemehmousavi67842 жыл бұрын
thank you veryy muchh:)
@ilutus Жыл бұрын
God bless you, finally i got it
@PortfolioCourses Жыл бұрын
I'm glad you figured it out! :-)
@hugo-garcia Жыл бұрын
So sprintf can do the same as strcpy ?
@PortfolioCourses Жыл бұрын
Great question Hugo… it works in a pretty different way, but yes essentially we can use sprintf to do a strcpy (and a strcat, and maybe other operations too). :-)
@hugo-garcia Жыл бұрын
@@PortfolioCourses Is it safer or better than strcpy ?
@PortfolioCourses Жыл бұрын
strncpy() would definitely be safer than sprintf, because it uses an extra argument to make sure we don't write past the size of the destination char array, see: kzbin.info/www/bejne/iIKbgGRpqtmLh9k. Whereas with sprintf(), it's up to the programmer to ensure the resulting string is not larger than the char array used to store the string. It's harder to compare strcpy() and sprintf(), but I strongly suspect strcpy() would have better performance because ALL it does is copy a string, whereas sprintf() needs to look at the format string and determine how to "build the string" which should take more work. This would make an interesting performance comparison test. :-)
@mon0theist_tv2 жыл бұрын
Super helpful, thank you
@PortfolioCourses2 жыл бұрын
You’re welcome Abdul-Hakeem! :-D
@pedrodeazeredonogueira9661 Жыл бұрын
i love you you saved my life
@PortfolioCourses Жыл бұрын
I'm glad the video was helpful for you! :-)
@anthonymazzie42372 жыл бұрын
great video
@PortfolioCourses2 жыл бұрын
Thank you Anthony! :-D
@Eddie-df8fv2 жыл бұрын
Great voice for some reason it sounds a bit sped up though lol
@PortfolioCourses2 жыл бұрын
Thanks Eddie, I don’t know why it would sound that way but good to know! :-)