#15 C Functions | C Programming for Beginners

Поділитися
Вставка
  • Опубліковано 26 лис 2024

КОМЕНТАРІ • 335

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

    Finding C programming hard? We’ve got you!
    🚀Get 60% off on Programiz PRO Lifetime Plan this Black Friday-pay once for skills that last forever. Don’t miss out, it’s a limited-time offer!
    👉Grab your discount now: bit.ly/blkfriday-24-yt

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

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

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

    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 !!!

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

    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  Рік тому +13

      Glad we could help!

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

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

    • @leaa6726
      @leaa6726 11 місяців тому +2

      I agree very well explained!!

  • @yogithabale
    @yogithabale 5 місяців тому +12

    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🤗

  • @louiejacobson552
    @louiejacobson552 7 місяців тому +2

    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!

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

    One of the best lectures for this topic on the internet

  • @mustafaemadeldeen
    @mustafaemadeldeen Рік тому +8

    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

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

    #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;
    }

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

    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.

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

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

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

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

  • @arturobat
    @arturobat 2 роки тому +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!

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

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

  • @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 7 місяців тому

      wrong bro , programming task multiply by taking two numbers

    • @abidahmedangkon8852
      @abidahmedangkon8852 5 місяців тому +2

      it should be int sum = number * number2;

  • @stealthy_doctor
    @stealthy_doctor 6 місяців тому +5

    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 5 місяців тому

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

    • @stealthy_doctor
      @stealthy_doctor 5 місяців тому +1

      @@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.

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

    😍
    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❤️

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

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

  • @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 11 місяців тому

      result is 20

  • @fastservicestv
    @fastservicestv 2 роки тому +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

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

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

    • @PrakashG.S-f5q
      @PrakashG.S-f5q 14 днів тому

      Hey same😂 but still not understood

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

    Thank you for clear explanation. For begginers it is very easy to understand, even if they do not know english so good.

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

    you just render every thing in programming easier

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

    Q. What is the correct way to call the following function?
    int test(double num1, int num2) {
    ...
    }
    A. test(8.3, 2);
    B. test (2, 8.3);
    C. int result = test(8.3, 2);
    D. int result = test(2, 8.3);

  • @vaigosharma369
    @vaigosharma369 5 днів тому

    bro they are helping us more than the teachers of our colleges

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

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

  • @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;
    }

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

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

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

    #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

  • @mr.karthikadams
    @mr.karthikadams 2 роки тому +20

    PROGRAMMING TASK:
    1.
    #include
    int multiplication(int num1, int num2) {
    int product = num1 * num2;

    return product;

    }
    int main() {
    int result = multiplication(2,3);
    printf("Result = %d", result);
    return 0;
    }
    OUTPUT :
    Result = 6.
    2.
    #include
    int multiplication(int num1, int num2) {
    int product = num1 * num2;
    printf("Product of %d & %d in %d", num1, num2, product);
    return product;

    }
    int main() {
    multiplication(2,3);
    return 0;
    }
    OUTPUT:
    Product of 2 & 3 is 6.

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

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

  • @emylololol
    @emylololol 18 днів тому

    لا معليكم مني جيت اذاكر لغه سي هنا لأن شرح دكتورتي تحفه الصدق🙂

  • @DAVID-dm6rc
    @DAVID-dm6rc 20 днів тому

    Dhanyabaad didi bich bich ma ra vannu vaxa ramro xa 😂😂

  • @iam__aj37
    @iam__aj37 Рік тому +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;
    }

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

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

    return 0;
    }

  • @Ayush_Vshnv
    @Ayush_Vshnv 2 місяці тому

    finally a detailed video on this topic, thank you ma'am

  • @AbhiramDeshpande-fe1vi
    @AbhiramDeshpande-fe1vi Рік тому

    // Online C compiler to run C program online
    #include
    int multiplication(int a,int b){
    int product = a*b;
    return product;
    }
    int main() {
    int result = multiplication(9,3);
    printf("result is %d",result);
    }

  • @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❤

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

    Your understanding is excellent🙂🙂

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

    For this video's task, here is a code sample and maybe it will be helpful to someone :)
    // can you create a function, takes two numbers, performs the multiplication of two numbers, returns the result ?
    #include
    int addNumbers(int number1, int number2)
    {
    int sum = number1 * number2;
    return sum;
    }
    int main (void)
    {
    int result = addNumbers(9, 5);
    printf("Result = %d
    ", result);
    return 0;
    }

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

      correct

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

      It is better if you name the function as multiplyNumbers.

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

      @@comptime Exactly, something like this but I named it product instead of multiply:
      //Create a function that takes two numbers, performs the multiplication of the numbers and return the result//
      #include
      int productnumbers(int number1, int number2){
      int product = number1 * number2;
      return product;
      }
      int main(){
      int result = productnumbers(65,43);
      printf("Result = %d", result);
      return 0;
      }

    • @AM-yd8en
      @AM-yd8en 11 місяців тому

      so here if i put the name hello instead of addnumbers it doesn't matter?

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

    I already thought I would never understand it. Thanks!

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

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

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

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

  • @augustinewale.nsstudios
    @augustinewale.nsstudios 2 роки тому +1

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

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

    A is the correct answer.

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

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

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

    #include
    void calculateNumbers(double num1, double num2)
    {
    double sum = num1 + num2;
    printf("sum of %lf and %lf is %lf", num1, num2, sum);
    }
    int main()
    {
    calculateNumbers(8.7,9.1);
    }

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

    I like this, Thank You😊🙌

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

    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);

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

    🤩 "Voice"

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

    # include
    #include
    void multiplyNumbers(int number1,int number2){
    int multiply = number1* number2;
    printf("multiply of %d and %d is %d ", number1,number2, multiply);
    }
    int main(){
    multiplyNumbers(2,2);
    return 0;
    }

  • @haxurn-h4l
    @haxurn-h4l Рік тому

    #include
    int multiplication(int num1, int num2){
    int result = num1 * num2;
    printf("The multiplication of %d and %d is %d", num1, num2 ,result);
    }
    int main(){
    multiplication(7, 4);
    }

  • @sandeepvarma8453
    @sandeepvarma8453 7 місяців тому

    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;
    }

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

    #include
    void multiply(int num1,int num2){
    int result = num1 * num2;
    printf("result of %d and %d is %d", num1, num2, result);
    }
    int main(){
    multiply(4,7);
    return 0;
    }

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

    Thanks madam for your services

  • @NigarAhmedova
    @NigarAhmedova 7 місяців тому +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

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

    include
    int multi(int num1, int num2);
    int main()
    {
    multi(7, 6);
    return 0;
    }
    int multi(int num1, int num2)
    {
    int result = num1 * num2;
    printf("Multiplication of %d and %d is %d", num1, num2, result);
    return multi;
    }

  • @RuhangariyoBonitah
    @RuhangariyoBonitah 7 місяців тому

    Making understanding easy, thanks

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

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

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

    Thanks for your best lessons

  • @Ech-chatouiMohammed
    @Ech-chatouiMohammed 2 місяці тому

    soo helpful tuto

  • @mr.G4MES1
    @mr.G4MES1 Рік тому +1

    Programming Task
    #include
    //Prototype of the Function
    int multiply_two_ints(int number1, int number2);
    int main() {
    // Write C code here
    int num1, num2;
    // Asking for the first Number
    printf("First Number: ");
    scanf("%d", &num1);
    // Asking for the Second number
    printf("Second Number: ");
    scanf("%d", &num2);
    // calling the function 'multiply_two_ints'
    int result = multiply_two_ints(num1,num2); {
    printf("Result = %d", result);
    }
    return 0;
    }
    //defining the Function
    int multiply_two_ints(int number1, int number2) {
    int mult = number1 * number2;
    return mult;
    }

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

    Thank you so much

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

    Function for the multiplication of two numbers -
    #include
    void multiNum(int num151, int num152){
    int prod15 = num151 * num152;
    printf("The Product of %d and %d is %d

    ", num151, num152, prod15);
    }
    int main() {
    int num151;
    printf("Enter a number: ");
    scanf("%d", &num151);
    int num152;
    printf("Enter a number: ");
    scanf("%d", &num152);
    multiNum(num151,num152);
    return 0;
    }

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

    Wounder full teaching mam

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

    // Online C compiler to run C program online
    #include
    #include
    double multiplynos(double number1, double number2);
    int main()
    {
    //float result= sqrt(80);
    //printf("Square root is : %.2f",result );
    double mum = multiplynos(8.45455,2.454656);
    printf("Multiplication is %lf",mum);
    return 0;
    }
    double multiplynos(double number1, double number2)
    {
    double mum = number1 * number2;
    return mum;
    }

  • @PemaJamtsho-r4n
    @PemaJamtsho-r4n Рік тому +2

    return where, return how, return why, return when?

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

    #include
    int multi(int a,int b){
    int ento= a*b;
    return ento;
    }
    int main(){
    int a,b;
    printf("enter two numbers :");
    scanf("%d %d",&a,&b);
    int result = multi(a,b);
    printf("result=%d",result);
    return 0;
    }

  • @CerenOnat-n3r
    @CerenOnat-n3r 9 місяців тому

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

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

    #include
    int add(int number1, int number2);
    int main() {
    int result = add(13, 14);
    printf("result = %d", result);
    return 0;
    }
    int add(int number1,int number2){
    int answer = number1 * number2;
    return answer;
    printf("complicated");
    }

  • @nagashreenb4763
    @nagashreenb4763 16 днів тому

    int multiply(int n1,int n2)
    {
    int result=n1*n2;
    printf("%d",result);
    return result;
    }
    int main()
    {
    int a,b;
    multiply(4, 5);
    return 0;
    }

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

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

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

    #include
    int main (){
    int month;
    printf("enter two integer");
    scanf("%d",&month);
    switch(month){
    case 1:
    printf("january");
    break;
    case 2:
    printf("february");
    break;
    case 3:
    printf("march");
    break;
    case 4:
    printf("april");
    break;
    case 5:
    printf("may");
    break;
    case 6:
    printf("jun");
    break;
    case 7:
    printf("july");
    break;
    case 8:
    printf("august");
    break;
    case 9:
    printf("september");
    break;
    case 10:
    printf("octomber");
    break;
    case 11:
    printf("november");
    break;
    case 12:
    printf("december");
    break;
    }
    return 0;
    thank you mam,
    for teaching c switch program.
    .}

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

    #include
    void Thanks(){
    printf("Thanks a million dear instructor
    ");
    }
    int main () {
    Thanks();
    printf("Go Ahead, please");
    return 0;
    }

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

    thank you programiz team

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

    The answer of the quiz is A

  • @abidahmedangkon8852
    @abidahmedangkon8852 5 місяців тому

    So easy to understand...

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

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

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

    #include
    int multiplyNumbers(int number1, int number2){
    float multiplication= number1 * number2;
    return multiplication;
    }
    int main(){
    float result = multiplyNumbers (5, 2);
    printf("Product = %f", result);
    return 0;
    }

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

    this best course

  • @daireosullivan1193
    @daireosullivan1193 7 місяців тому

    #include
    #include
    #include
    void calculator(int num1, int num2) {
    int result = num1 * num2;
    printf("Product of %d * %d = %d", num1, num2, result);
    }
    int main() {
    calculator(5,2);
    return 0;
    }

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

    THANK YOU SO SO MUUUUUCH

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

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

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

    You are the best ❤️

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

    #include
    void multiplyNumbers(double num1 , double num2){
    double sum = num1 * num2;
    printf("the sum is %.1lf", sum);
    }
    int main() {
    multiplyNumbers(9,2);

    return 0;
    }

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

    thank you programiz team..!!

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

    Happy programming.!

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

    Thanks it helped me install it

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

    Thanks ma'am

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

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

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

    Very helpful tutorials, Thanks.

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

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

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

    good work king, love you

  • @countrysideshowyaigrock4689

    Thank you very much!!

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

    thank u

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

    very well defined and constructive video

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

    #include
    double calculateProduct(){
    double a, b;
    printf("Choose two numbers to multiply by each other: ");
    scanf("%lf %lf", &a, &b);
    double product = a * b;
    return product;
    }
    int main() {
    double result = calculateProduct();
    printf("%lf
    ", result);
    return 0;
    }

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

    Thank you, this was so helpful

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

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

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

    Very helpful. Thanks

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

    1 #include
    2 int multiplyNumbers(int num1, int num2)
    3 {
    4 int product = num1 * num2;
    5
    6 return (product);
    7 }
    8 int main()
    9 {
    10 int result = multiplyNumbers(8, 7);
    11 printf("Result = %d", result);
    12 return (0);
    13 }

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

      int multiply(int num1,int num2){
      return num1 * num2;
      }
      int main(){
      int result = multiply(6,3);
      printf("%d",result);
      }
      you can directly return the multiplications coz there r no any other tasks