Portfolio Courses
Portfolio Courses
  • Видео 817
  • Просмотров 8 786 177
Resize A String Stored In Dynamically Allocated Memory | C Programming Example
How to resize a string stored in dynamically allocated memory using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/resize_string_dynamically_allocated.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Просмотров: 575

Видео

Remove The Last Character In A String | C Programming Example
Просмотров 53521 час назад
How to remove the last character in a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_last_string_char.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Reverse The Words In A String | Python Example
Просмотров 294День назад
How to reverse the words in a string using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/reverse_string_words.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Print A String In Reverse | C Programming Example
Просмотров 547День назад
How to print a string in reverse using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/print_string_reverse.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Count The Words In A File | Python Example
Просмотров 455День назад
How to count all the words in a file using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/count_words_in_file.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Convert Seconds To Days, Hours, Minutes and Seconds | C Programming Example
Просмотров 680День назад
How to convert a total number of seconds into the equivalent number of days, hours, minutes and seconds using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/convert_secs_to_days_hours_mins_secs.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Count The Words In A String | Python Example
Просмотров 32914 дней назад
How to count all the words in a string using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/count_words_in_string.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Remove All Punctuation Marks From A String | C Programming Example
Просмотров 80814 дней назад
How to remove all the punctuation marks from a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_punctuation_marks.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers! Introduction To Pointers: ruclips.net/video/oe2bZKjiWrg/видео.html Passing An Array To A Function: ruclips.net/video/oe2bZKjiWrg/видео.html
Remove All Punctuation Marks From A String | Python Example
Просмотров 36914 дней назад
How to remove all punctuation marks from a string in Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/remove_punctuation_marks.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Remove Last Occurrence Of A Character From A String | C Programming Example
Просмотров 93221 день назад
How to remove the last occurrence of a character from a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_last_char_occurrence.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers! Introduction To Pointers: ruclips.net/video/oe2bZKjiWrg/видео.html Passing An Array To A Function: ruclips.net/video/oe2bZKjiWrg/видео.html
Append Text To A File | Python Example
Просмотров 621Месяц назад
How to append text to the end of a file using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/append_text.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Remove First Occurrence Of A Character From A String | C Programming Example
Просмотров 988Месяц назад
How to remove the first occurrence of a character from a string using C. Source code: github.com/portfoliocourses/c-example-code/blob/main/remove_first_char_occurrence.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Count The Occurrences Of A String In A File | Python Example
Просмотров 490Месяц назад
How to count the occurrences of a string in a file using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/count_string_in_file.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Check If A Character Is In A String Algorithm | C Programming Example
Просмотров 1,1 тыс.Месяц назад
How to check if a character is in a string with an algorithm in C, i.e. without using the built-in strchr() function but instead implementing a solution ourselves. Source code: github.com/portfoliocourses/c-example-code/blob/main/check_char_in_string.c. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Convert Seconds To Days, Hours, Minutes & Seconds | Python Example
Просмотров 460Месяц назад
How to convert a total amount of seconds to the equivalent number of days, hours, minutes and seconds using Python. Source code: github.com/portfoliocourses/python-example-code/blob/main/convert_secs_to_days_hours_mins_secs.py. Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Check If Strings Are Equal Using Recursion | C Programming Example
Просмотров 1,3 тыс.Месяц назад
Check If Strings Are Equal Using Recursion | C Programming Example
Shuffle A String | Python Example
Просмотров 390Месяц назад
Shuffle A String | Python Example
Print A String Using Recursion | C Programming Example
Просмотров 1,4 тыс.Месяц назад
Print A String Using Recursion | C Programming Example
Monty Hall Problem Simulation | Python Example
Просмотров 8472 месяца назад
Monty Hall Problem Simulation | Python Example
Convert Inches To Feet And Inches | Python Example
Просмотров 3462 месяца назад
Convert Inches To Feet And Inches | Python Example
Shuffle A String | C Programming Example
Просмотров 1,4 тыс.2 месяца назад
Shuffle A String | C Programming Example
Shuffle The Lines Of A File | Python Example
Просмотров 3562 месяца назад
Shuffle The Lines Of A File | Python Example
Convert Feet To Inches And Feet | C Programming Example
Просмотров 6872 месяца назад
Convert Feet To Inches And Feet | C Programming Example
Sum The Digits In A String | Python Example
Просмотров 9243 месяца назад
Sum The Digits In A String | Python Example
Sum The Digits In A String | C Programming Example
Просмотров 2,5 тыс.3 месяца назад
Sum The Digits In A String | C Programming Example
Count The Occurrences Of A Value In A List Using Recursion | Python Example
Просмотров 6703 месяца назад
Count The Occurrences Of A Value In A List Using Recursion | Python Example
Sum Numbers In List Using Recursion | Python Example
Просмотров 4833 месяца назад
Sum Numbers In List Using Recursion | Python Example
Reverse A String Using Pointers | C Programming Example
Просмотров 4,3 тыс.3 месяца назад
Reverse A String Using Pointers | C Programming Example
time(NULL) Explained | C Programming Tutorial
Просмотров 4,1 тыс.3 месяца назад
time(NULL) Explained | C Programming Tutorial
Count The Occurrences Of Each Item In A List | Python Example
Просмотров 4933 месяца назад
Count The Occurrences Of Each Item In A List | Python Example

Комментарии

  • @vicsteiner
    @vicsteiner 19 часов назад

    In my case the password was not there anymore. Is it possible that my system or compiler is re-writing this memory space?

  • @nezbrun872
    @nezbrun872 День назад

    Recursion: the most overrated wet dream of computer science academics. In practice, it's almost always better in terms of performance, resources, readability and maintainability to use iterative methods.

    • @PortfolioCourses
      @PortfolioCourses 23 часа назад

      Hahaha 'wet dream of computer science academics'. :-P I hear you, but recursion actually does have *some* practical use cases with certain data structures, it's a best tool for the job situation where it's rarely the best tool for the job. We teach recursion in 'academia' mostly as a way of teaching how to think computationally and solve problems. To me the real 'wet dreams of computer science academics' are things like Agda: en.wikipedia.org/wiki/Agda_(programming_language).

  • @PortfolioCourses
    @PortfolioCourses День назад

    Note: realloc() could fail, this video explains how to handle it: ruclips.net/video/skqCnhhA0ZY/видео.html. 🙂

  • @vicsteiner
    @vicsteiner День назад

    I also noticed that if you malloc space into pointer a and realloc it into pointer b you cannot free(a). You still have access to the address in a but it seems that realloc frees the variable. Then looking into that value in a it might be the original one or not. On the safety concerns calloc does not seem to solve the issue, we would need a "crealloc" or something that when copies the data from one place to another zeros the original memory value too if I got it right.

  • @kenmojica
    @kenmojica День назад

    End program. End program. End program. End program. End program. End program. End program. End program.End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program. End program.End program. End program. End program. End program. End program. End program. End program.

  • @dimitrioskalfakis
    @dimitrioskalfakis День назад

    sure, but if it returns NULL would it not be better to store the return address to a different pointer and then determine if string will point to it? this happens more often than one would think in small embedded chips.

    • @bugurme1
      @bugurme1 День назад

      in that case you don't want to use realloc? just manually malloc new space and free old space?

    • @dimitrioskalfakis
      @dimitrioskalfakis День назад

      @@bugurme1 realloc with a NULL argument amounts to the same thing. i am saying that checking for NULL is important. you can not avoid fragmentation as long as you deal with heap instead of stack.

    • @PortfolioCourses
      @PortfolioCourses День назад

      Yeah this video is intended for beginners, if anyone wants to learn more about handling realloc failures check out this video covering the topic: ruclips.net/video/skqCnhhA0ZY/видео.html

  • @vicsteiner
    @vicsteiner 2 дня назад

    first thank for the videos I am learning a lot through them! I did tried the clock part for this example and not sure why but I am getting in many runs a faster time for the calloc allocation. Any idea what might be going on? I am using gcc in an ubuntu os.

  • @izainonline
    @izainonline 2 дня назад

    If I have old laptop which support win 8.1 or can say ideal windows environment on that laptop. My Q's is Vscode not supported any more now on win 8.1 can we use pycharm for chatbot etc kind of programming in win 8.1

  • @ashraflaam3400
    @ashraflaam3400 2 дня назад

    love from Bangladesh!

  • @warplanner8852
    @warplanner8852 2 дня назад

    46 years as a software developer (over half doing C/C++) and this is the most succinct and complete example of the UNIX/LINUX time code without the pages and pages of boilerplate. You are a true craftsman!

  • @AhmadAlMutawa_abunoor
    @AhmadAlMutawa_abunoor 3 дня назад

    In the second method (iterating through characters until we reach the null terminator), you may have forgotten to remove the #include for the string.h since we no longer are using strlen function.

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      We don’t need it in that case yes, I’m just demonstrating a different way to do it. :-)

  • @Ch4p1n17
    @Ch4p1n17 3 дня назад

    Dude, You have helped me a ton more than possible, you explain things so much better than most tutorials out there, Thank you so much!

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      That’s so great to hear, thanks for sharing this, and you’re very welcome! :-)

  • @24-dinitrophenylhydrazine29
    @24-dinitrophenylhydrazine29 3 дня назад

    for some reason i really do not like and having a hard time comprehending the for loop that contains i j k as indices at the same time. So instead I prefer while loop.

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      It’s definitely a subjective thing, beautiful code is sometimes in the eye of the beholder! :-)

    • @24-dinitrophenylhydrazine29
      @24-dinitrophenylhydrazine29 2 дня назад

      @@PortfolioCourses Thank you so much programming sensei

  • @matt.loupe.
    @matt.loupe. 4 дня назад

    Do you have any videos on unit testing in c?

    • @PortfolioCourses
      @PortfolioCourses 4 дня назад

      Unfortunately no, but I do want to cover that topic one day. :-)

  • @girishcreationsgirishnaik.5671
    @girishcreationsgirishnaik.5671 4 дня назад

    Sir non overlapping in substring example

  • @lamtatyan
    @lamtatyan 4 дня назад

    I have watched many videos teaching what pointer is and how to use, but only this one can make me truly understand how to use pointer in a few minutes. This must be a good day for me, as I have learnt thing from a genius.

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      That’s awesome this video was helpful for you and thank you so much for the kind words! :-)

  • @maulikshah9122
    @maulikshah9122 4 дня назад

    Is is good to use delete operator inside the destructor?

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      Sometimes we really should in order to “clean up” things that the object is responsible for cleaning up. Like if you delete a Person object and a Hand object is created and “owned” by that Person object from initialization until deletion then the Person object should delete it, for example.

    • @maulikshah9122
      @maulikshah9122 День назад

      @@PortfolioCoursesOkay, Got it! Btw Your content is just mind blowing!🔥Keep sharing knowledge with begginers like us!

  • @meti.e11i
    @meti.e11i 4 дня назад

    ❤nice😊

  • @Brad_Script
    @Brad_Script 4 дня назад

    you can even remove all the elses because you are returning from all the ifs

  • @ramakrishna4092
    @ramakrishna4092 5 дней назад

    // While practicing functions, I encountered an error. Can you explain why? // I tried using `void` as an argument in the function call. // Why can't `void` be used this way, and what is the proper way to call a function that takes no arguments? void myFunction(void) { // Function body } int main() { myFunction(void); // Why is this incorrect? return 0; }

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      For a function that takes no arguments you can just call it like this: myFunction()

  • @Deepmalajoshi
    @Deepmalajoshi 5 дней назад

    Nice explanation

  • @amjad5183
    @amjad5183 5 дней назад

    Nice videos mate! Appreciate it❤

    • @PortfolioCourses
      @PortfolioCourses 5 дней назад

      You’re welcome, I’m glad you like them! :-)

  • @dubstepbanane6277
    @dubstepbanane6277 5 дней назад

    wouldnt the break case have to be if (n == 0) return 1 Because 0! = 1

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      If we want to support the convention that the factorial of 0 is 1 then yes, this function was made as a simple example of recursion assuming we’re finding the factorial of positive integers. :-)

  • @omersahar7738
    @omersahar7738 5 дней назад

    you are the besttttt!!!!!!!!!! thank youu

    • @PortfolioCourses
      @PortfolioCourses 3 дня назад

      You’re welcome and thank you for the kind words! :-)

  • @manethdulshan9449
    @manethdulshan9449 6 дней назад

    Thank youuu

  • @NaziPenseur
    @NaziPenseur 6 дней назад

    This IDE software so beautiful, Can I know this software which you use to program

  • @warplanner8852
    @warplanner8852 6 дней назад

    Back on the day when I worked on Big Blue Heavy Iron (IBM mainframes), we called it "hat racking" because we'd drag the coat and hat rack into our office and explain our code to it. Prefer some entity a little more grown up than using something I would have bathed with when I was six years old. But you do produce impressive and helpful videos! Very grateful as they have helped me unwind some exceedingly bad habits from my career days.

    • @PortfolioCourses
      @PortfolioCourses 6 дней назад

      Thanks so much for sharing this, I had never heard of the term "hat racking before", that's super interesting how the concept was always there before it was given a new name. :-)

  • @mahmoudadel9610
    @mahmoudadel9610 6 дней назад

    simple and useful, thank you guys for the help

  • @obrenvukasovic7137
    @obrenvukasovic7137 6 дней назад

    what if user input numbers?Is it same?

  • @siddharthk3279
    @siddharthk3279 6 дней назад

    Hi there..We can use strrev() right

    • @PortfolioCourses
      @PortfolioCourses 6 дней назад

      It’s not a standard C function and so may not work with all compilers, but yes you can use it to reverse a string. :-)

  • @saiik0u696
    @saiik0u696 7 дней назад

    Great course. But, also include how to setup the code environment like code editor and compiler for C because there's still some beginners don't know how do it like me.

    • @PortfolioCourses
      @PortfolioCourses 7 дней назад

      There are links in the description that show how to do this that are mentioned at the start of the video. They are not included in the video themselves because environments are different from one operating system to next and change over the years. :-)

  • @angelffg
    @angelffg 7 дней назад

    Great!!!

  • @jorgetxjr
    @jorgetxjr 7 дней назад

    C is fun! And useful. Thank you!

  • @eyalshain5244
    @eyalshain5244 7 дней назад

    I really appreciate what you doing. I'm learning c now and all of those video, even short one like these when you explain these thing clear are very useful! Thank you. I would also like if you would do videos when you build some big projects in c and show the process, and maybe some networking in c, socket extra... Thanks again❤🎉

    • @PortfolioCourses
      @PortfolioCourses 7 дней назад

      You're welcome! :-) One day I'd like to cover some more advanced topics in C.

    • @eyalshain5244
      @eyalshain5244 7 дней назад

      @@PortfolioCourses great! Thanks again😊

  • @nathanaelmoh5848
    @nathanaelmoh5848 7 дней назад

    I have to say that I am eternally grateful for all the work you do. This is one of the best coding tutorials I've watched. And I believe that like many here I've watched A LOT!!! So that is really saying something. Your voice is excellent for narration and the way you set up your windows and explain everything so concisely and in more than one way is just so damn good. I am sorry I cannot pay you monetarily but sir I truly appreciate your work. I hope you realize just how much of a contribution you have done for the coding community. Also it's very surprising that for such an important and ubiquitous language like C, there is so much lacking in terms of good videos like for other languages. Once again, thank you very much and the best of luck in everything you do!

    • @PortfolioCourses
      @PortfolioCourses 7 дней назад

      Thank you so much for this very kind feedback, it's great to hear that you enjoy the style of the videos, and I really appreciate you taking the time to write this nice message. :-)

    • @nathanaelmoh5848
      @nathanaelmoh5848 6 дней назад

      @@PortfolioCourses you're very welcome! I just finished this video but I already have so many of the videos in your channel bookmarked. I will do a textbook on C now by Stephen Prata called "C Primer Plus" but I'm much more confident now that I'll be able to follow along.

  • @yoruichi5802
    @yoruichi5802 7 дней назад

    Today, I secured an internship in the imaging and video field, where I'll primarily be coding in C! Your videos have sparked my interest in learning C and have paved the way for opportunities such as teaching assistant in a procedural programming course and now this internship. Thank you!

    • @PortfolioCourses
      @PortfolioCourses 7 дней назад

      Congratulations on securing the internship, that's excellent!!! :-) And thank you so much for sharing this story with me, these are my absolute favourite stories to hear, it means a lot to me that these videos have helped you on your journey. You're very welcome! :-D

  • @roelandriemens
    @roelandriemens 7 дней назад

    GnirtS A

  • @IOSALive
    @IOSALive 7 дней назад

    Portfolio Courses, wanna collab it was really good

    • @PortfolioCourses
      @PortfolioCourses 7 дней назад

      I'm a middle-aged dude that is a bit out of touch with video games now, I'm not sure what I could do that is related to Fornite? :-)

  • @McDonaldIbekwe
    @McDonaldIbekwe 7 дней назад

    Please, is there a way of doing it with Smart Pointers?

  • @McDonaldIbekwe
    @McDonaldIbekwe 7 дней назад

    I did some modification to your program. I even tried using Smart Pointers but it didn't work. #include <iostream> #include <vector> #include <string> #include <math.h> class Shape { public: virtual double area() = 0; virtual const std::string name() const = 0; }; class Square : public Shape { public: Square(double side) : m_side(side) {} virtual double area() final { return pow(m_side, 2); } virtual const std::string name() const { return "square"; } ~Square() {} private: double m_side; }; class Triangle : public Shape { public: Triangle(double base, double height) : m_base(base), m_height(height) {} virtual double area() final { return 0.5 * m_base * m_height; } virtual const std::string name() const { return "triangle"; } ~Triangle() {} private: double m_base; double m_height; }; class Parallelogram : public Shape { public: Parallelogram(double side1, double side2) : m_side1(side1), m_side2(side2) {} virtual double area() final { return m_side1 * m_side2; } virtual const std::string name() const { return "parallelogram"; } ~Parallelogram() {} private: double m_side1; double m_side2; }; class Circle : public Shape { public: static double pi; Circle(double radius) : m_radius(radius) {} virtual double area() final { return pi * pow(m_radius, 2); } virtual const std::string name() const { return "circle"; } ~Circle() {} private: double m_radius; }; double Circle::pi = 3.1452; int main() { Shape* shapes[4] = { new Square(4), new Triangle(6, 9), new Parallelogram(11, 6), new Circle(7) }; for (int i{ 0 }; i < 4; ++i) { std::cout << "Area of " << shapes[i]->name() << ": " << shapes[i]->area() << " sq units "; } for (int i{ 0 }; i < 4; ++i) { delete[] shapes[i]; } return 0; }

  • @tASBIDTASEENAHMED
    @tASBIDTASEENAHMED 8 дней назад

    i love this informative video. pls make more. Thank u love you so much!! This have me new ideas. Please remember my name as i might come to see you soon. ttyl!!! xoxo

  • @Cool-Linux-Penguin
    @Cool-Linux-Penguin 8 дней назад

    This was very helpful, thank you so much! Also I know it's 2 year's old but this video is rock solid and the instruction's and explaination's are great!

  • @ericanderson4086
    @ericanderson4086 9 дней назад

    bro thx so much love how it turned out :)

  • @rannvijaysingh1
    @rannvijaysingh1 9 дней назад

    Sir, i start programming in C as hobby. But now i am enjoying. It will more enjoyable if you teach about Graphics in c. Thanks for your amazing teaching.

  • @Entertainment14336
    @Entertainment14336 9 дней назад

    can you show plz

  • @Entertainment14336
    @Entertainment14336 9 дней назад

    in which compiler are you execute

  • @ChaseAlberti
    @ChaseAlberti 10 дней назад

    Great explanation! In the embedded world I would argue that the "int * p3" decelerationis the most common. Although, in function declerations it would typically be "int const * p3"

  • @diystron_
    @diystron_ 10 дней назад

    matur nuwun

  • @parosdelos6914
    @parosdelos6914 10 дней назад

    Can you make a video on the Dijkstra's algorithm in Python or C?

    • @PortfolioCourses
      @PortfolioCourses 10 дней назад

      I do want to cover that topic one day, yes. :-)

  • @germankoga8640
    @germankoga8640 10 дней назад

    I didn't understand how you calculated mid, wouldn't you have to sum the two extremes and divided them by 2 to find the mid point?