C functions 📞

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

#C #functions #tutorial

void birthday()
{
printf("\nHappy birthday to you!");
printf("\nHappy birthday to you!");
printf("\nHappy birthday dear...YOU!");
printf("\nHappy birthday to you!\n");
}

int main()
{
birthday();
birthday();
birthday();

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

#include <stdio.h>

void birthday()
{
printf("\nHappy birthday to you!");
printf("\nHappy birthday to you!");
printf("\nHappy birthday dear...YOU!");
printf("\nHappy birthday to you!\n");
}

int main()
{
birthday();
birthday();
birthday();

return 0;
}

BroCodez
Автор

just came out to my family of java programmers as a C developer. They kicked me out of the house. C pride!

alplayzmc
Автор

Clear and concise. Love it. Especially the part about the telephones. Brilliant! Thanks!

Joe-sxiu
Автор

very concise and easy to understand thankyou!

hirofukuchi
Автор

Thank you for this! Quick and to the point! No backstory on your life or 6 min intro 😂

ianbelward
Автор

So much useful and clear, thank you so much <3

superalex
Автор

Thank you so much for this quick but informative video! You explained to me easier what a function does then my teachers 1 hour long clip.

NotADeathLeaver
Автор

I will like every video of yours that I watch because I want you to get paid for this quality content

_Anna_Nass_
Автор

Helped me like a ton . no I mean like a TON!

purplepeach
Автор

thanks a loooot for all these useful videos

multicitygirl
Автор

Here's some code I made with this:

#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <math.h>
#include <ctype.h>

void move(){
printf("Move out of their way.");
}

int main(){
printf("If my parents walk past you:\n");
move();
printf("\nIf my brothers and sisters walk past you:\n");
move();
printf("\nAnd if my grandparents walk past you:\n");
move();
}

PSIwolf
Автор

is function declaration not compulsory in this case?

norikatsu
Автор

#include <stdio.h>
//Simple calculator with function
int loop(){
int i;
for(i=0;i<=40;i++){
printf("-");
}
}
int main() {

float result, num1, num2;
char c;
loop();
printf("\n CALCULATOR\n");
loop();
printf("(+)FOR ADDITION\n\t(-)FOR SUBTRACTION\n\t(*)FOR MULPLICATION\n\t(/)FOR DIVISION\n\tENTER YOUR OPPERATOR : ");
scanf("%s", &c);
switch(c){
case '+':
printf("ENTER FIRST NUMBER : ");
scanf("%f", &num1);
printf("ENTER SECOND NUMBER : ");
scanf("%f", &num2);
result=num1+num2;
printf(" ANSWER IS : %f", result);
break;
case '-':
printf("ENTER FIRST NUMBER : ");
scanf("%f", &num1);
printf("ENTER SECOND NUMBER : ");
scanf("%f", &num2);
result=num1-num2;
printf(" ANSWER IS : %f", result);
break;
case '*':
printf("ENTER FIRST NUMBER : ");
scanf("%f", &num1);
printf("ENTER SECOND NUMBER : ");
scanf("%f", &num2);
result=num1*num2;
printf(" ANSWER IS : %f", result);
break;
case '/':
printf("ENTER FIRST NUMBER : ");
scanf("%f", &num1);
printf("ENTER SECOND NUMBER : ");
scanf("%f", &num2);
result=num1/num2;
printf(" ANSWER IS : %f", result);
break;
default:
printf("WRONG OPERATOR !");
break;
}
printf("\n");
loop();
}

egwpdom