#15 C Functions | C Programming for Beginners

Поділитися
Вставка
  • Опубліковано 21 лип 2024
  • #15 C Functions | C Programming for Beginners
    In this video, we will learn about functions to divide our program into small blocks of codes. We will try out examples using Function Parameters. And we will discuss return types and Function Prototype. We will also learn different types of Standard Library Functions available in C programming.
    This video is a part of our C Programming video series: • #1: Getting Started wi...
    ~
    Resources:
    C Online Compiler: www.programiz.com/c-programmi...
    Github File: github.com/programiz/c-youtub...
    C Functions Tutorial (text-based tutorial): www.programiz.com/c-programmi...
    Timestamps:
    00:00 Start
    00:18 C Functions
    01:06 Syntax of Function
    04:55 Function Parameters
    05:23 Create a function with parameter
    09:42 Return Type
    12:44 Function Prototype
    14:18 Standard Library Function
    16:12 main Function
    16:33 programming task
    17:01 Quiz
    ~
    Revise your learning using our C App
    Download here for Android: bit.ly/3upaInx
    Download here for iOS: apple.co/3EZLtNq
    Find Programiz elsewhere:
    Facebook: / programiz
    Instagram: / _programiz
    LinkedIn: / programiz
    Website: www.programiz.com
    Twitter: / programiz
    #programiz #cfunctions #cprogramming #learnc #functions #cfunction #returntype #learncprogramming #functionsinc

КОМЕНТАРІ • 306

  • @programizstudios
    @programizstudios  2 роки тому +11

    🔥Finding it Damn Hard to Understand C Programming?
    Learn to code-the right way-with interactive lessons, quizzes & challenges. Build a strong programming base; it's IMPORTANT!
    Try Programiz PRO for Free: bit.ly/master-c-programming

    • @Rmz-250
      @Rmz-250 Рік тому

      Please I need your help !!!!
      #include
      #include
      int function(int a, int b)
      {
      int i=a;
      if (i

  • @yogithabale
    @yogithabale 25 днів тому +2

    I completed my 12th one month ago and learning C language for the first time and these series were really very very helpful. thanks a lot🤗

  • @charanjitkaur5212
    @charanjitkaur5212 2 роки тому +21

    #include
    int multiplyNumbers(int number1, int number2){
    int product = number1*number2;
    return product;
    }
    int main(){
    int result= multiplyNumbers(7,8);
    printf("result=%d", result);
    return 0;
    }

  • @one.iced0
    @one.iced0 Рік тому +71

    now, that's what you call teaching. my prof can't even make me understand this sub T^T. but you did it in just a few minutes. thank you very much.

    • @programizstudios
      @programizstudios  Рік тому +9

      Glad we could help!

    • @one.iced0
      @one.iced0 Рік тому +5

      @@programizstudios thanks to you, I think I ace ng exam today 😉

    • @leaa6726
      @leaa6726 7 місяців тому +1

      I agree very well explained!!

  • @njambagachoki9010
    @njambagachoki9010 2 роки тому +25

    As a person who just started learning Software Engineering I have found these videos most helpful indeed. Definitely subscribing and recommending this channel to any other people I may come across who are in the process of learning software engineering. Great job !!!

  • @louiejacobson552
    @louiejacobson552 3 місяці тому

    Very good very dope. Spent 3 week eeking by in class not knowing the semantics of calling a function. Solved weeks long headache in less than 20 minutes. Appreciate it a million times over!

  • @jtjc7705
    @jtjc7705 Рік тому +5

    this was very easy to understand with walk throughs of clear examples. I know more now than I did 13min ago, thank you for your time.

  • @naboulsikhalid7763
    @naboulsikhalid7763 Рік тому +3

    very elegant person you are, accompanied with good skill of teaching. looking forward to see more of your work. Thank you

  • @srpcdgaming
    @srpcdgaming Рік тому +3

    These videos are very helpful! 17 minutes for a tutorial is very professional

  • @kay9493
    @kay9493 Рік тому +5

    One of the best lectures for this topic on the internet

  • @stealthy_doctor2384
    @stealthy_doctor2384 Місяць тому +3

    These tutorials have been the best for simple explanations and work great to code along too and practice, THANK YOU!
    for the problem i think its answer is C
    #include
    #include
    int multNumbers(int number1, int number2);
    int main() {
    int number1;
    int number2;

    printf("Enter Number 1:
    ");
    scanf("%d",&number1);
    printf("Enter Number 2:
    ");
    scanf("%d",&number2);
    int sum = multNumbers(number1,number2);//dont call this too early remember its proceedural
    printf("The result of %d * %d = %d",number1, number2, sum);
    return 0;
    }
    int multNumbers(int number1, int number2){
    int product = number1 * number2;
    return product;
    }

    • @bwon8233
      @bwon8233 Місяць тому

      I get this buy why did we initialize number1 and number2 in both the function and main

    • @stealthy_doctor2384
      @stealthy_doctor2384 Місяць тому

      @@bwon8233 to my understanding you're creating space to hold the values you're going to be taking from the user. And in the function we're not initializing, we are doing a method call to the function miltNumbers. That reference is being passed as the arguments number1 and number2.

  • @arturobat
    @arturobat Рік тому +6

    This is the best video explaining functions in C that I could find from both searches in English and Spanish, great job guys, thank you!

  • @manjukutty8802
    @manjukutty8802 2 роки тому +13

    😍
    Watched all the 15 videos. Really appreciatable work... Mam u r teaching very well.. waiting with expectation for upcoming tutorials.. pls make videos for remaining Syntax .. thank u❤️

  • @eklavyarajkeshri7611
    @eklavyarajkeshri7611 2 роки тому +8

    Best way to teaching I love all the videos of this channel ❤️

  • @hritiksharma6172
    @hritiksharma6172 2 роки тому +3

    Padma mam you are so cool
    i am in first year CS student your teaching is superb

  • @user-nt4nm4fb3u
    @user-nt4nm4fb3u 6 місяців тому

    Thorough explanation and so clear to grasp quickly. Thank you for these valuable contents through this valuable channel. I am grateful.

  • @statusworld7984
    @statusworld7984 2 роки тому +3

    So helpful tutorials and your website as well.
    Your way of teaching is really good.

  • @BenvelMusic
    @BenvelMusic Рік тому +3

    Finally I understood what passing a value in function means my gosh it took me so many videos 😂 on UA-cam

  • @cjdr4075
    @cjdr4075 2 роки тому +3

    wow! you make C so interesting for me😥. Thanks!💗 i recommend this for anyone!

  • @mustafaemadeldeen
    @mustafaemadeldeen 11 місяців тому +4

    for the last question A and C is correct but difference the first just call and second calling and store value inside integer which will cast the result from double to integer

  • @muhammadjawadahmed8938
    @muhammadjawadahmed8938 Рік тому +1

    Amazing teaching skills……. Helps alot to understand functions……✨✨✨

  • @augustinewale.nsstudios
    @augustinewale.nsstudios Рік тому +1

    Please do more videos. I really like this simple way of explanations and demonstrations.

  • @fastservicestv
    @fastservicestv Рік тому +2

    I’ve watched hours of videos and tNice tutorials one is the first that explains it in a way a complete beginner could understand! Great videoccccccccc

  • @iam__aj37
    @iam__aj37 11 місяців тому +9

    // can you create a function, takes two floating numbers, performs the multiplication of two numbers, returns the result using function prototype?
    #include
    float multiplyNumbers(float num1,float num2);
    int main(){
    float result= multiplyNumbers(5.2,2.5);
    printf("Result is %.2f",result);
    return 0;
    }
    float multiplyNumbers(float num1,float num2){
    float product = num1 * num2;
    return product;
    }

  • @Lolz_amv
    @Lolz_amv 2 роки тому +2

    Best way to teaching I love all the videos of this channel ❤

  • @mohammadabdullahaalforhad1375
    @mohammadabdullahaalforhad1375 9 місяців тому +1

    Your understanding is excellent🙂🙂

  • @nouhatamba9976
    @nouhatamba9976 Рік тому

    it's so well explained thank for this gift may God Bless you

  • @ZordonX
    @ZordonX Рік тому

    I already thought I would never understand it. Thanks!

  • @mutalejohn5295
    @mutalejohn5295 2 роки тому

    Very helpful tutorials, Thanks.

  • @chitturoyal7750
    @chitturoyal7750 2 роки тому +9

    16:33 programming task
    #include
    int Addnumber(){
    int number, number2;
    printf("Enter a first values: ");
    scanf("%d",&number);
    printf("Enter a second values: ");
    scanf("%d",&number2);
    int sum = number + number2;
    return sum;
    }
    int main()
    {
    int result =Addnumber();
    printf("Result = %d", result);
    return 0;
    }

    • @ABHIJITH-v7m
      @ABHIJITH-v7m 3 місяці тому

      wrong bro , programming task multiply by taking two numbers

    • @abidahmedangkon8852
      @abidahmedangkon8852 Місяць тому +1

      it should be int sum = number * number2;

  • @BrunelleAgoum
    @BrunelleAgoum Рік тому +2

    you just render every thing in programming easier

  • @ARD905
    @ARD905 Рік тому

    Thank you....this video explained functions very simply...and her accent is cute XD

  • @AhmedKhaled-lf4rk
    @AhmedKhaled-lf4rk 10 місяців тому

    you are an amazing teacher thank you very much

  • @Invincible_brute
    @Invincible_brute 2 роки тому

    very well defined and constructive video

  • @muthupandeeswari1561
    @muthupandeeswari1561 2 роки тому

    Thank you so much mam B. TECH-IT
    First year mam very helpful mam

  • @pravinsingh3453
    @pravinsingh3453 Рік тому

    Mam you are very skillfull in coding 🥰🥰help us and upload more videos plzz

  • @user-uz2vo5kc6i
    @user-uz2vo5kc6i 7 місяців тому +1

    Thanks madam for your services

  • @Suguru0927
    @Suguru0927 Рік тому +2

    so good vid, better than my lecturer

  • @ehmedlivasif3565
    @ehmedlivasif3565 Рік тому

    Thank you, this was so helpful

  • @user-lm8bt1zn5q
    @user-lm8bt1zn5q 3 місяці тому

    Making understanding easy, thanks

  • @anantsharma450
    @anantsharma450 2 роки тому

    Very helpful. Thanks

  • @devarapallivamsi2981
    @devarapallivamsi2981 Рік тому

    thank you programiz team..!!

  • @yourtechspace
    @yourtechspace 2 роки тому

    Wounder full teaching mam

  • @SteveKaranja-vv2qx
    @SteveKaranja-vv2qx 3 місяці тому +1

    I like this, Thank You😊🙌

  • @masasivasankari7295
    @masasivasankari7295 Рік тому +3

    The answer for that question is "c" i.e int result=test(8.3,2);

  • @swoasti2007
    @swoasti2007 Місяць тому

    Can I always use void as return type in functions??

  • @devarapallivamsi2981
    @devarapallivamsi2981 Рік тому

    thank you programiz team

  • @user-uv4px2ll6v
    @user-uv4px2ll6v 4 місяці тому +2

    is the quiz answer option c?

  • @kikipatton
    @kikipatton Рік тому

    Hey, where is the answer of this programming quiz, it is not written on github

  • @Juyanda_media
    @Juyanda_media Місяць тому

    Thanks for your best lessons

  • @allauddinmomin8814
    @allauddinmomin8814 2 роки тому

    it's amazing mam👍

  • @islambassiouni2907
    @islambassiouni2907 2 роки тому

    thanks for the great support
    I hope ou can keep it up

  • @countrysideshowyaigrock4689

    Thank you very much!!

  • @emmanuelarthur3081
    @emmanuelarthur3081 Рік тому

    Great video 🎉

  • @ggdgfd9392
    @ggdgfd9392 Рік тому

    Thanks it helped me install it

  • @nihatdonmzov4166
    @nihatdonmzov4166 Рік тому +1

    Thank you so much

  • @abidahmedangkon8852
    @abidahmedangkon8852 Місяць тому

    So easy to understand...

  • @user-cz7sx9sw4w
    @user-cz7sx9sw4w 8 місяців тому

    You are the best ❤️

  • @mohammadabdullahaalforhad1375
    @mohammadabdullahaalforhad1375 9 місяців тому +1

    Thanks a lot

  • @lemichael2004
    @lemichael2004 Рік тому +1

    does function prototype is compulsory? Some code that I run I don't have function prototype and it still work even the user-defined function made below not above the main function? So does it really need?

    • @sriram2394
      @sriram2394 Рік тому

      Nope. Function prototype is not mandatory. If you are defining the function first and calling the function, its not necessary. If you are calling and then defining the function, Then the Function Prototype is required. :)

  • @selamzerihun8739
    @selamzerihun8739 Рік тому

    good work king, love you

  • @ParkerPlaysPC
    @ParkerPlaysPC Рік тому

    Thank you 😊

  • @ardeltiocojefflauron8882
    @ardeltiocojefflauron8882 Рік тому +1

    THANK YOU SO SO MUUUUUCH

  • @story-time_001
    @story-time_001 2 роки тому

    thank you mam.

  • @devarapallivamsi2981
    @devarapallivamsi2981 Рік тому

    Happy programming.!

  • @sirishasaragadam7603
    @sirishasaragadam7603 2 роки тому +1

    thank u

  • @daramolaeniola4901
    @daramolaeniola4901 Рік тому

    Nice video💙

  • @avdeshsingh001
    @avdeshsingh001 Рік тому

    Thanks ma'am

  • @Hypocritecivilization
    @Hypocritecivilization Рік тому

    nice..please tell me someone whats the answer of the quiz.Thanks

  • @riju6393
    @riju6393 Рік тому

    Nice 👍

  • @user-sn7ol8bw9n
    @user-sn7ol8bw9n Рік тому

    I did not get when I use prototype and when I use the other thing

  • @user-np2ng9eb7c
    @user-np2ng9eb7c 5 місяців тому

    Thanks

  • @marusukech.5049
    @marusukech.5049 2 роки тому +3

    Answer for Proggramming Task Today:
    #include
    int multification(int num1, int num2);
    int main(){
    int n1, n2;
    printf("Enter number 1:");
    scanf("%d",&n1);
    printf("Enter number 2:");
    scanf("%d",&n2);
    int res = multification(n1, n2);
    printf("Result = %d",res);
    return 0;
    }
    int multification(int num1, int num2){
    int multi = num1 * num2;
    return multi;
    }

  • @nihatdonmzov4166
    @nihatdonmzov4166 11 місяців тому +1

    #include
    void addNumbers(double number1, double number2){
    double sum = number1 + number2;
    printf("%lf + %lf = %.2lf", number1, number2, sum);
    }
    int main(){
    addNumbers(5.2, 3.55);
    }
    for 9:38

  • @alzahraz
    @alzahraz 2 роки тому

    thanks

  • @fastservicestv
    @fastservicestv Рік тому +1

    this best course

  • @Ckjohn77kg
    @Ckjohn77kg 8 місяців тому

    by the void method and the return method: (without the printf and scanf parts)
    /*//Chap 15.3 Function Prog.Task//
    void multiNum(int num151, int num152){
    int prod15 = num151 * num152;
    printf("The Product of %d and %d is %d

    ", num151, num152, prod15);
    }
    int main() {
    multiNum(2,6);*/
    //Return//
    int multiNum2(int num1512, int num1522){
    int prod152 = num1512 * num1522;
    return prod152;
    }
    int main() {
    int result153 = multiNum2(6,7);
    printf("Result 2 = %d", result153);

  • @bitzjason1887
    @bitzjason1887 Рік тому

    I've been using you're website for a month lol

  • @ngicleaning6423
    @ngicleaning6423 2 роки тому

    the best!!

  • @amayaamarasinghe5838
    @amayaamarasinghe5838 Рік тому +3

    Thank you so much for this video!!! Very helpful!

  • @thecyber465
    @thecyber465 2 роки тому +2

    A is the correct answer.

  • @Technology_Tv_Nepal
    @Technology_Tv_Nepal Рік тому

    good content

  • @Selcuk._._
    @Selcuk._._ 3 місяці тому

    //Can you create a function that
    // • takes two numbers
    // • performs the multiplication of two numbers
    // • returns the result
    double multi(double num1, double num2) {
    return num1 * num2;
    }
    // Aswer is C

  • @ajwadshah786
    @ajwadshah786 2 роки тому +11

    #include
    int productnumbers(int number1, int number2);
    int main(){
    int result = productnumbers(4,5);
    printf("result is %d", result);
    return 0;
    }
    int productnumbers(int number1, int number2){
    int product = number1 * number2;
    return product;
    printf("after return");
    }
    programing quiz Awnser.

    • @Farchl
      @Farchl 6 місяців тому

      result is 20

  • @user-kf2gw9oy8v
    @user-kf2gw9oy8v 5 місяців тому

    what a beautiful and smart woman.This lesson was so helpful thank you.

  • @nihatdonmzov4166
    @nihatdonmzov4166 Рік тому +3

    The answer of the quiz is A

  • @Chazork
    @Chazork Місяць тому

    nice

  • @tondamanatiabhinay
    @tondamanatiabhinay Рік тому +1

    🤩 "Voice"

  • @sahalyoosuf
    @sahalyoosuf Рік тому +2

    Guys, can anyone explain me the exact need of return statement please? I'm still searching for a good explanation. hope you'll help me out....

  • @lamaspacos
    @lamaspacos 4 місяці тому

    Options A and C, according to the next video C #16 respectively at 16:00 and 14:25.
    Thanks C compiler.😅

  • @anurajjayan4332
    @anurajjayan4332 2 роки тому

    Can we use C function to use a switch

    • @suleyman7478
      @suleyman7478 2 роки тому

      If you can use an if-else chain in that function there is no reason for you not to use switch.

  • @nvm9174
    @nvm9174 Рік тому

    ty

  • @vintrixtergunot8064
    @vintrixtergunot8064 Місяць тому

    #include
    int multiply( int number1, int number2){
    int product= number1 * number2;
    return product;
    }
    int main() {
    int result= multiply (5,6);
    printf ("The product is %d", result);
    return 0;
    }

  • @NigarAhmedova
    @NigarAhmedova 2 місяці тому +1

    #include
    int calc(a,b){
    int mult=a*b;
    return mult;}
    int main(a,b){
    printf("write a and b:");
    scanf("%d %d",&a,&b);
    int mult=calc(a,b);
    printf("the multiplication is %d",mult);
    return 0;
    } i wrote it im so proud of me

  • @abbeyziraba2967
    @abbeyziraba2967 4 місяці тому +1

    C. int result = test(8.3, 2);

  • @zimigxumisa590
    @zimigxumisa590 Рік тому +1

    #include
    #include
    int operation(int num1,int num2)
    {
    int multiply =num1*num2;
    return multiply;
    }
    int main(){
    int result=operation(5,6);
    printf("result = %d",result);
    return 0;
    }

    • @AFCOE
      @AFCOE Рік тому

      Good❤

  • @pratik1860
    @pratik1860 2 роки тому

    Big fan Padma😭😭❤️

  • @user-xh6kw6dl9g
    @user-xh6kw6dl9g 6 місяців тому

    B.(8.3,2) Is the answer to quiz

  • @avdeshsingh001
    @avdeshsingh001 Рік тому

    Ma'am A ya C m confusion hai

  • @sandeepvarma8453
    @sandeepvarma8453 3 місяці тому

    option c is right to call a function
    programing task:
    #include
    #include
    int product(int number1,int number2);
    int main()
    {
    int result=product(5,5);
    return 0;
    }
    int product(int number1,int number2)
    {
    int product=number1*number2;
    printf("produt=%d",product);
    return product;
    }

    • @bekmirzo9259
      @bekmirzo9259 2 місяці тому +1

      why option C? i thought the option A is right....