#15 C Functions | C Programming for Beginners

  Рет қаралды 209,501

Programiz

Programiz

Күн бұрын

Пікірлер: 321
@programizstudios
@programizstudios 2 жыл бұрын
🔥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
@one.iced0
@one.iced0 Жыл бұрын
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 Жыл бұрын
Glad we could help!
@one.iced0
@one.iced0 Жыл бұрын
@@programizstudios thanks to you, I think I ace ng exam today 😉
@leaa6726
@leaa6726 9 ай бұрын
I agree very well explained!!
@charanjitkaur5212
@charanjitkaur5212 2 жыл бұрын
#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; }
@yogithabale
@yogithabale 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🤗
@njambagachoki9010
@njambagachoki9010 2 жыл бұрын
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 !!!
@stealthy_doctor
@stealthy_doctor 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 3 ай бұрын
I get this buy why did we initialize number1 and number2 in both the function and main
@stealthy_doctor
@stealthy_doctor 3 ай бұрын
@@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.
@louiejacobson552
@louiejacobson552 5 ай бұрын
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 Жыл бұрын
One of the best lectures for this topic on the internet
@jtjc7705
@jtjc7705 Жыл бұрын
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.
@mustafaemadeldeen
@mustafaemadeldeen Жыл бұрын
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
@manjukutty8802
@manjukutty8802 2 жыл бұрын
😍 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 Жыл бұрын
very elegant person you are, accompanied with good skill of teaching. looking forward to see more of your work. Thank you
@srpcdgaming
@srpcdgaming Жыл бұрын
These videos are very helpful! 17 minutes for a tutorial is very professional
@arturobat
@arturobat Жыл бұрын
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 жыл бұрын
Best way to teaching I love all the videos of this channel ❤️
@masasivasankari7295
@masasivasankari7295 Жыл бұрын
The answer for that question is "c" i.e int result=test(8.3,2);
@iam__aj37
@iam__aj37 Жыл бұрын
// 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; }
@hritiksharma6172
@hritiksharma6172 2 жыл бұрын
Padma mam you are so cool i am in first year CS student your teaching is superb
@BenvelMusic
@BenvelMusic 2 жыл бұрын
Finally I understood what passing a value in function means my gosh it took me so many videos 😂 on KZbin
@statusworld7984
@statusworld7984 2 жыл бұрын
So helpful tutorials and your website as well. Your way of teaching is really good.
@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
@Ayush_Vshnv
@Ayush_Vshnv 17 күн бұрын
finally a detailed video on this topic, thank you ma'am
@cjdr4075
@cjdr4075 2 жыл бұрын
wow! you make C so interesting for me😥. Thanks!💗 i recommend this for anyone!
@chitturoyal7750
@chitturoyal7750 2 жыл бұрын
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 5 ай бұрын
wrong bro , programming task multiply by taking two numbers
@abidahmedangkon8852
@abidahmedangkon8852 3 ай бұрын
it should be int sum = number * number2;
@V1ctorinos
@V1ctorinos Ай бұрын
Thank you for clear explanation. For begginers it is very easy to understand, even if they do not know english so good.
@user-nt4nm4fb3u
@user-nt4nm4fb3u 8 ай бұрын
Thorough explanation and so clear to grasp quickly. Thank you for these valuable contents through this valuable channel. I am grateful.
@BrunelleAgoum
@BrunelleAgoum Жыл бұрын
you just render every thing in programming easier
@ajwadshah786
@ajwadshah786 2 жыл бұрын
#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 8 ай бұрын
result is 20
@yogithabale
@yogithabale 2 ай бұрын
#include int main(){ int product(int number1 , int number2){ int product = number1*number2; return sum; } int result = product(8,7); printf("%d",result); return 0; }
@AkshithSrinivas
@AkshithSrinivas 7 ай бұрын
is the quiz answer option c?
@augustinewale.nsstudios
@augustinewale.nsstudios Жыл бұрын
Please do more videos. I really like this simple way of explanations and demonstrations.
@swoasti2007
@swoasti2007 4 ай бұрын
Can I always use void as return type in functions??
@vintrixtergunot8064
@vintrixtergunot8064 3 ай бұрын
#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; }
@mohammadabdullahaalforhad1375
@mohammadabdullahaalforhad1375 11 ай бұрын
Your understanding is excellent🙂🙂
@NigarAhmedova
@NigarAhmedova 5 ай бұрын
#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
@AlexATEGEKA
@AlexATEGEKA 10 ай бұрын
Thanks madam for your services
@muhammadjawadahmed8938
@muhammadjawadahmed8938 Жыл бұрын
Amazing teaching skills……. Helps alot to understand functions……✨✨✨
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
#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
@lemichael2004
@lemichael2004 2 жыл бұрын
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. :)
@thecyber465
@thecyber465 2 жыл бұрын
A is the correct answer.
@SteveKaranja-vv2qx
@SteveKaranja-vv2qx 5 ай бұрын
I like this, Thank You😊🙌
@endeavored
@endeavored Жыл бұрын
#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; }
@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!
@Juyanda_media
@Juyanda_media 4 ай бұрын
Thanks for your best lessons
@marusukech.5049
@marusukech.5049 2 жыл бұрын
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; }
@mr.karthikadams
@mr.karthikadams 2 жыл бұрын
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.
@ARD905
@ARD905 Жыл бұрын
Thank you....this video explained functions very simply...and her accent is cute XD
@Ech-chatouiMohammed
@Ech-chatouiMohammed 13 күн бұрын
soo helpful tuto
@infosecinsights9
@infosecinsights9 Жыл бұрын
#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); }
@RuhangariyoBonitah
@RuhangariyoBonitah 5 ай бұрын
Making understanding easy, thanks
@programizstudios
@programizstudios 2 жыл бұрын
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);
@adarshyadav1423
@adarshyadav1423 2 жыл бұрын
A
@renuga.k7473
@renuga.k7473 2 жыл бұрын
Option:A
@harshadatapre2133
@harshadatapre2133 2 жыл бұрын
C. int result = test(8.3, 2);
@atulanand1954
@atulanand1954 2 жыл бұрын
Option A( 8.3, 2);
@harshadatapre2133
@harshadatapre2133 2 жыл бұрын
@@adarshyadav1423 Why the answer will be A?? According to me , answer should be C
@Selcuk._._
@Selcuk._._ 5 ай бұрын
//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
@usfalan9709
@usfalan9709 6 ай бұрын
#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; }
@ArpitKumarEE
@ArpitKumarEE Ай бұрын
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; }
@selahattinsongur9620
@selahattinsongur9620 Жыл бұрын
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 Жыл бұрын
It is better if you name the function as multiplyNumbers.
@collinshagembe7852
@collinshagembe7852 Жыл бұрын
@@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 9 ай бұрын
so here if i put the name hello instead of addnumbers it doesn't matter?
@khayalabdullayev
@khayalabdullayev Жыл бұрын
#include void Thanks(){ printf("Thanks a million dear instructor "); } int main () { Thanks(); printf("Go Ahead, please"); return 0; }
@thelegendarysummersky3189
@thelegendarysummersky3189 8 ай бұрын
#include int multiplyNumbers(int number1, int number2){ int product = number1 * number2; return product; } int main() { int number1, number2; printf("Enter first number: "); scanf("%d", &number1); printf("Enter second number: "); scanf("%d", &number2); int result = multiplyNumbers(number1,number2); printf("Product of %d and %d is %d", number1, number2, result);
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
Thank you so much
@AhmedKhaled-lf4rk
@AhmedKhaled-lf4rk Жыл бұрын
you are an amazing teacher thank you very much
@Ckjohn77kg
@Ckjohn77kg 10 ай бұрын
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);
@zimigxumisa590
@zimigxumisa590 Жыл бұрын
#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❤
@CerenOnat-n3r
@CerenOnat-n3r 7 ай бұрын
what a beautiful and smart woman.This lesson was so helpful thank you.
@daireosullivan1193
@daireosullivan1193 5 ай бұрын
#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; }
@TheHeraldOfSpring
@TheHeraldOfSpring Ай бұрын
#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; }
@tondamanatiabhinay
@tondamanatiabhinay Жыл бұрын
🤩 "Voice"
@pravinsingh3453
@pravinsingh3453 2 жыл бұрын
Mam you are very skillfull in coding 🥰🥰help us and upload more videos plzz
@sandeepvarma8453
@sandeepvarma8453 5 ай бұрын
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 5 ай бұрын
why option C? i thought the option A is right....
@mutalejohn5295
@mutalejohn5295 2 жыл бұрын
Very helpful tutorials, Thanks.
@yourtechspace
@yourtechspace 2 жыл бұрын
Wounder full teaching mam
@renalynf.jurilla6705
@renalynf.jurilla6705 Жыл бұрын
// calculatin the square #include int multiply(int num1, int num2); int main() { int num1, num2; printf("Enter a first number: "); scanf("%d", &num1); printf("Enter a second number: "); scanf("%d", &num2); multiply(num1, num2); return 0; } int multiply(int num1, int num2){ int product; product = num2 * num1; printf("The product of %d * %d is %d", num1, num2, product); }
@fastservicestv
@fastservicestv 2 жыл бұрын
this best course
@jordanholmes1366
@jordanholmes1366 3 ай бұрын
// the answer is C #include int multiplyNumbers(int number1, int number2){ int product = number1 * number2; return product; } int main(){ int result = multiplyNumbers(6, 4); printf("result = %d ", result); return 0; }
@abidahmedangkon8852
@abidahmedangkon8852 3 ай бұрын
So easy to understand...
@muthupandeeswari1561
@muthupandeeswari1561 2 жыл бұрын
Thank you so much mam B. TECH-IT First year mam very helpful mam
@ardeltiocojefflauron8882
@ardeltiocojefflauron8882 Жыл бұрын
THANK YOU SO SO MUUUUUCH
@rainfeel_
@rainfeel_ Жыл бұрын
#include int multiplication(int a, int b) { int multi = a * b; return multi; } int main() { int result = multiplication(6,7); printf("%d", result); return 0; }
@kikipatton
@kikipatton Жыл бұрын
Hey, where is the answer of this programming quiz, it is not written on github
@Hypocritecivilization
@Hypocritecivilization Жыл бұрын
nice..please tell me someone whats the answer of the quiz.Thanks
@devarapallivamsi2981
@devarapallivamsi2981 2 жыл бұрын
thank you programiz team..!!
@lamaspacos
@lamaspacos 6 ай бұрын
Options A and C, according to the next video C #16 respectively at 16:00 and 14:25. Thanks C compiler.😅
@amayaamarasinghe5838
@amayaamarasinghe5838 Жыл бұрын
Thank you so much for this video!!! Very helpful!
@programizstudios
@programizstudios Жыл бұрын
You are so welcome!
@devarapallivamsi2981
@devarapallivamsi2981 2 жыл бұрын
thank you programiz team
@ehmedlivasif3565
@ehmedlivasif3565 2 жыл бұрын
Thank you, this was so helpful
@anantsharma450
@anantsharma450 2 жыл бұрын
Very helpful. Thanks
@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); }
@sahalyoosuf
@sahalyoosuf Жыл бұрын
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....
@johnathan6130
@johnathan6130 Жыл бұрын
same
@islambassiouni2907
@islambassiouni2907 2 жыл бұрын
thanks for the great support I hope ou can keep it up
@BeLikeSairaj
@BeLikeSairaj Ай бұрын
Here's my programming task : #include int multiplyNumbers (num1, num2) { int product; product = num1 * num2; return product; } int main () { int num1; printf (" 𝐅𝐢𝐫𝐬𝐭 𝐧𝐮𝐦𝐛𝐞𝐫: "); scanf("%d", &num1); int num2; printf(" 𝐒𝐞𝐜𝐨𝐧𝐝 𝐧𝐮𝐦𝐛𝐞𝐫: "); scanf("%d", &num2); int result = multiplyNumbers (num1, num2); printf(" ➪ 𝐒𝐨𝐥𝐮𝐭𝐢𝐨𝐧: %d × %d = %d", num1, num2, result); return 0; }
@Invincible_brute
@Invincible_brute 2 жыл бұрын
very well defined and constructive video
@ggdgfd9392
@ggdgfd9392 Жыл бұрын
Thanks it helped me install it
@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; }
@sirishasaragadam7603
@sirishasaragadam7603 2 жыл бұрын
thank u
@erl2nd
@erl2nd Жыл бұрын
A,because 8.3 is double, and 2 is integer
@nihatdonmzov4166
@nihatdonmzov4166 Жыл бұрын
The answer of the quiz is A
@naomywitherwhy129
@naomywitherwhy129 Жыл бұрын
#include int num(int a, int b) { int square = a * b; printf("the multiplacation of these two numbers %d and %d is %d", a, b, square); return square ; } int main() { num(44, 55); return 0; }
@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); }
@mr.G4MES1
@mr.G4MES1 Жыл бұрын
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; }
@arissaanna
@arissaanna 11 ай бұрын
#include int timesNumbers(int num1, int num2); //function prototype int main(){ int product = timesNumbers(2, 4); printf("The product of two numbers is %d", product); return 0; } int timesNumbers(int num1, int num2){ int product = num1 * num2; return product; }
@countrysideshowyaigrock4689
@countrysideshowyaigrock4689 Жыл бұрын
Thank you very much!!
#16 C Variable Scope | C Programming For Beginners
4:49
Programiz
Рет қаралды 64 М.
Function Basics | C Programming Tutorial
15:36
Portfolio Courses
Рет қаралды 65 М.
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 43 МЛН
Apple peeling hack @scottsreality
00:37
_vector_
Рет қаралды 129 МЛН
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 79 МЛН
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 450 М.
COMPUTER SCIENCE explained in 17 Minutes
16:49
Wacky Science
Рет қаралды 1,1 МЛН
Functions in Python are easy 📞
10:38
Bro Code
Рет қаралды 484 М.
#14 : break and continue in C | C Programming for Beginners
10:31
5 Good Python Habits
17:35
Indently
Рет қаралды 535 М.
Learn To Code Like a GENIUS and Not Waste Time
9:41
The Coding Sloth
Рет қаралды 1,6 МЛН
you will never ask about pointers again after watching this video
8:03
#12: while Loop in C Programming |  C Programming for Beginners
12:45
小丑在游泳池做什么#short #angel #clown
00:13
Super Beauty team
Рет қаралды 43 МЛН