C arguments 📧

preview_player
Показать описание
C arguments parameters tutorial example explained

#C #arguments #parameters

void birthday(char x[], int y)
{
printf("\nHappy birthday dear %s!", x);
printf("\nYou are %d years old!", y);
}

int main()
{
char name[] = "Bro";
int age = 21;

birthday(name, age);

return 0;
}
Рекомендации по теме
Комментарии
Автор

#include <stdio.h>

void birthday(char x[], int y)
{
printf("\nHappy birthday dear %s!", x);
printf("\nYou are %d years old!", y);
}

int main()
{
char name[] = "Bro";
int age = 21;

birthday(name, age);

return 0;
}

BroCodez
Автор

BRO your videos are amazing! Yours is the first channel I've found that actually explains programming well. Every other channel seems to explain things as if the viewer already understands them, if that makes sense. when watching your video, I didn't have to google 30 different words to make sense of it all, you explained it as clearly as possible without me having to know every programming term under the sun. thank

codypreston
Автор

This is the best explanation I've ever seen of arguments and functions(I'm new to C).
Well explained, especially with the analogy you gave
thanks a lot

esimeemoemmanuel
Автор

I watched tens of other videos of famous bloggers and took Harvard cs50 course and could not figure out what argument in function was. This videos made my day and finally I'm one step closer in C. Thanks Bro!:)

Sasha-xgxy
Автор

Thank you for doing this. It's down to earth and easy to understand. I'm taking a c# master class and sometimes get lost in the jargon

clinton
Автор

I'm torn between feeling dumb or disappointed on my instructor😅, didn't know it was that easy to understand. Keep up the great job good Sir 👍

krlo
Автор

Thanks for your videos.. With this one of the whole series, is the first time that I feel dumb... I hope that the next one bring me some lights!

Aguacaton-Volador
Автор

if someone is wondering, using fgets after using a scanf somewhere in your code, creates an issue and you won't be able to get a string input. so you can add a '\n' after the identifier like for e.g.:
scanf("%d\n", age);
this also creates other issues so i'd recommend using fgets before scanf always.
this is one of the issues of writing code in older languages like C.

Omsingh-pcdb
Автор

Wow. This is the simplest explanation I have ever come across

kwadwoomariboateng
Автор

so how would you pass a value into main?

macimacraft
Автор

May I suggest that you open a members subscription for your channel? I think you deserve to get some love/support from the community, your work is amazing and everything is free... being a member would only help you but it wouldn't be a barrier for the content.

bower
Автор

hey, in my course we always do this by calling the functions in the main function, why does it work to pass arguments like these, without a main?

brunomartel
Автор

So easy explained on youtube yet at university the Einsteins fail to explain baisc stuff...

MSDjMichaelSlash
Автор

Sir Im getting an error
It gives the following msg in VSCode:

The ampersand (&) character is not allowed. The & operator is reserved for future
use; wrap an ampersand in double quotation marks ("&") to pass it as part of a
string.
At line:1 char:98
+ ... Files\" ; if ($?) { gcc Arguments&Parameters.c -o Arguments&Paramete ...
+ ~

The ampersand (&) character is not allowed. The & operator is reserved for future
use; wrap an ampersand in double quotation marks ("&") to pass it as part of a
string.
At line:1 char:135
+ ... rameters.c -o Arguments&Parameters } ; if ($?) { .\Arguments&Paramete ...
+ ~
The ampersand (&) character is not allowed. The & operator is reserved for future
use; wrap an ampersand in double quotation marks ("&") to pass it as part of a
string.
+ CategoryInfo : ParserError: (:) [],
ion
+ FullyQualifiedErrorId : AmpersandNotAllowed
Pls Help

akhilbaburaj