C_88 Functions in C -part 5 | Function with No Argument No Return Type

Поділитися
Вставка
  • Опубліковано 6 вер 2021
  • C complete playlist: • Programming in C
    Connect & Contact Me:
    Vlogging Channel Link: bit.ly/354n7C7
    Facebook: / jennys-lectures-csit-n...
    Quora: www.quora.com/profile/Jayanti...
    Instagram: / jayantikhatrilamba
    Twitter: / khatrijenny
    See Complete Playlists:
    Placement Series: • Placements Series
    Data Structures and Algorithms: https: • Data Structures and Al...
    Design and Analysis of Algorithms(DAA): • Design and Analysis of...
    Dynamic Programming: • Dynamic Programming
    Operating Systems: // • Operating Systems
    DBMS: • DBMS (Database Managem...
    #whatisFunctioninC
    #NoArgumentNoReturnType
    #jennyslectures

КОМЕНТАРІ • 130

  • @amritpattnaik1540
    @amritpattnaik1540 Рік тому +39

    Answer to the Assignment:-
    #include
    void sum(void);
    void subtract(void);
    void multiply(void);
    void divide(void);
    void main()
    {
    sum();
    subtract();
    multiply();
    divide();
    }
    void sum()
    {
    int a, b, sum = 0;
    printf("Enter a and b: ");
    scanf("%d %d", &a, &b);
    sum = a + b;
    printf("Sum = %d
    ", sum);
    }
    void subtract()
    {
    int a, b, diff = 0;
    printf("Enter a and b: ");
    scanf("%d %d", &a, &b);
    diff = a - b;
    printf("Difference = %d
    ", diff);
    }
    void multiply()
    {
    int a, b, prod = 0;
    printf("Enter a and b: ");
    scanf("%d %d", &a, &b);
    prod = a * b;
    printf("Product = %d
    ", prod);
    }
    void divide()
    {
    int a, b;
    float div = 0.0;
    printf("Enter a and b: ");
    scanf("%d %d", &a, &b);
    if(b == 0)
    printf("Divide by 0 not possible");
    else
    {
    div = (float)a / (float)b;
    printf("Division = %f
    ", div);
    }
    }

  • @milenazafirova7754
    @milenazafirova7754 2 роки тому +42

    Homework assignment:
    //Write 4 functions: addition, subtraction, multiply, divide;
    //All 4 functions you will call in main() function;
    //These function should fall in the 1st category: No argument, No return type! :)
    #include
    void add(void);
    void sub(void);
    void mult(void);
    void div(void);
    int main(void)
    {
    add();
    sub();
    mult();
    div();
    }
    void add()
    {
    int x = 10, y = 5, add = 0;
    add = x + y;
    printf("Addition = %d
    ", add);
    }
    void sub()
    {
    int x = 10, y = 5, sub = 0;
    sub = x - y;
    printf("Subtraction = %d
    ", sub);
    }
    void mult()
    {
    int x = 10, y = 5, mult = 0;
    mult = x * y;
    printf("Multiplication = %d
    ", mult);
    }
    void div()
    {
    int x = 10, y = 5, div = 0;
    div = x / y;
    printf("Division = %d
    ", div);
    }
    Output:
    Addition = 15
    Subtraction = 5
    Multiplication = 50
    Division = 2

  • @dilipkumarnayak605
    @dilipkumarnayak605 2 роки тому +32

    I don't mam how I would thank u. You are like a universal mother teacher who is taking care of her students as a mother.

  • @TheBaljitSingh
    @TheBaljitSingh 2 роки тому +58

    Here is First Assingment from my side:-
    // No argument without return type function
    #include
    void sum(void);
    void sub(void);
    void mult(void);
    void div(void);
    void main()//calling function
    {
    sum();
    sub();
    mult();
    div();
    }
    void sum()//called functio
    {
    int a=5, b=2, sum;
    sum = a+b;
    printf("sum = %d
    ", sum);
    }
    void sub()
    {
    int a=5, b=2, sub;
    sub = a-b;
    printf("sub is %d
    ", sub);
    }
    void div()
    {
    int a=5, b=2, div;
    div = a/b;
    printf("div is %d
    ", div);
    }
    void mult()
    {
    int a =5, b=2, mult;
    mult = a*b;
    printf("multiplication is %d
    ", mult);
    }

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

      Sum=7
      Sub is 3
      div is 2
      Multiplication is 10

    • @c.m.h148
      @c.m.h148 Рік тому

      thanks

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

      #include
      void sum(void);
      void main()
      {
      sum();
      }
      void sum()
      {
      int a=5,b=7;
      printf("sum is %d
      ",(a+b));
      printf("subtraction is %d
      ",(a-b));
      printf("mult is %d
      ",(a*b));
      printf("divi is %d
      ",(a%b));
      }
      you can write with one called function bro

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

      @@Ramya0216 ss

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

      @@sharojshaik9519 no it's wrong...we have to declare the function first and next we have to define that function....

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

    Ma
    I love your teachings, now I'm understanding these function issues
    Thanks very very much
    Your explanation is simple to understand compared to other video tutorial UA-cam
    Once again, thanks 👍

  • @gamefunda8208
    @gamefunda8208 2 роки тому +10

    you teach with more insights of concepts and that's why really appreciate the way you explain

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

    Cant be best than this mam. Thank you for the videos.

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

    Last assignment , here as we have given void parameter in function definition only so the error was not given and the argument has been discarded , but as in function definition is returning int value the compiler is asking us to initialise int main() rather than void main ()
    #include
    void fun();
    int main()
    {
    fun(5,6);
    }
    void fun(void)
    {
    int x=4,y=8,sum =0;
    sum = x+y;
    printf("sum = %d",sum);
    }

  • @meghasinha1706
    @meghasinha1706 2 роки тому +5

    Mam thanks for your efforts

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

    printf("Madam Jenny, you are too good, your explanation is superb. I wish you should teach me forever");

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

    Hi Mrs Jenny i am from Cameroon 🇨🇲 Africa. all ur videos are 🔥🔥 I am learning alot

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

    assignment will be it wont throw error instead it shows warning implicit of declaration the output will be executed.

  • @sachingupta-nm3vx
    @sachingupta-nm3vx 2 роки тому +2

    thank you so much mam

  • @ashutoshpandey6510
    @ashutoshpandey6510 2 роки тому +5

    Mam can you please tell about
    Call by refrence

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

    Thank you mam

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

    Which app is best to perform c programs??

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

    Easily understand mam.. i love you mam

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

    Nice explanation 👍🏻

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

    very best lecture of functions!!!!!!!!!!🙂🙂🙂

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

    THANK YOU!!

  • @rohantaigade5841
    @rohantaigade5841 2 роки тому +6

    I came here just for revision and it helped me a lot ...

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

    thanks from Bangladesh

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

    Mam is universal mother as well as goddess

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

    No error output is correct

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

    types of functions and classification of functions are same ?

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

    the last question came error
    #include
    void vig();
    void vig(void){
    int a=10,b=20;
    printf("
    %d%d",a,b);}
    void main(){
    vig(11,25);}
    // some undeclare the void can correct of the program can output display...
    And actual parameter not passing the variable can display without any error or warning.

  • @SwetaKumari-ps2rf
    @SwetaKumari-ps2rf 2 роки тому +3

    When we use void in definition function and in calling function it is implicitly assuming that data type is int and gives the o/p with warning ..but in case of float in the definition function why is it not giving any o/p?

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

      We are not using void in calling function and we are using float in declaration function and function definition

  • @dhruvmachhi2990
    @dhruvmachhi2990 2 роки тому +7

    Ma'am i want to work with you as a thumbnail editor plz reply me if you are interested in it i will send some samples.
    Thank you.

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

    Can you explain prototype of function

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

    Mam app jo bhi Bolte ho Bahut ache lagte ho

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

    Mam argument means parameter ?

  • @AmanSharma-zq5yu
    @AmanSharma-zq5yu Рік тому

    Hello mam
    I'm facing the problem in this program
    I've understood everything thing but wherever
    I run this it shows me error
    gcc /tmp/uizp4vwY8K.c -lm
    /tmp/uizp4vwY8K.c:8:1: error: expected identifier or '(' before '{' token
    8 | {
    | ^

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

      @Aman Sharma
      I guess u might have forgotten the semicolon while declaring the function...

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

    //Argument with return type
    #include
    int sum(int,int); //declaration//
    int sub(int,int);
    int mul(int,int);
    int div(int,int);
    int main()
    {
    sum(6,3);//calling//
    sub(6,3);
    mul(6,3);
    div(6,3);
    }
    int sum(int a,int b) //defnition//
    {
    int sum=0;
    sum=a+b;
    printf("sum=%d
    ",sum);
    return sum;
    }
    int sub(int a,int b)
    {
    int sub=0;
    sub =a-b;
    printf("sub =%d
    ",sub);
    return sub;
    }
    int mul(int a,int b)
    {
    int mul=0;
    mul = a*b;
    printf("product =%d
    ",mul);
    return mul;
    }
    int div(int a,int b)
    {
    int div;
    div=a/b;
    printf("div =%d
    ",div);
    return div;
    }

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

    Mam you are really beautiful I can’t concentrate on this lecture just because of your charm

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

      Bull shit guy she is your teacher respect her

    • @er.aashish124
      @er.aashish124 Рік тому +4

      Bhai pagal hey kya tu 🤦
      Mereko to Maja Aata hai Vai inka lecture sunne me ❣️
      Lots of love mam from Nepal 🇳🇵🇳🇵🇳🇵🇳🇵

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

      😂😂😂😂a

    • @Key-wx6rc
      @Key-wx6rc Рік тому +1

      Me who is watching the videos because of Mam's charm 😂😂😂

    • @g.spavan5034
      @g.spavan5034 Рік тому

      😂🤭🤭😂

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

    Which compiler you use for compilation I mean which site

  • @user-gb4ov2lp2e
    @user-gb4ov2lp2e 5 місяців тому +1

    Even I don't no c but now I am relaize in c because of u MAM ❤️‍🔥🫶🫶

  • @naveenroshan1492
    @naveenroshan1492 2 роки тому +7

    Hi mam
    You will take lectures related to b.tec or cse students mam???
    I am going to take cse mam
    Plz help me mam I am beginner

    • @anjitkumaryadav768
      @anjitkumaryadav768 2 роки тому +5

      Bro this course is made for beginner to advance level .You should start from 1st video.

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

    Mam i forgot the year in which you got the miss world award can you please tell me?

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

    Forces 99%
    Leading 1%
    Just Legends things 😂😂

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

    Error was an extra parameter is added

  • @JustListen41473
    @JustListen41473 2 роки тому +5

    Ma'am bcha liya aapne muze🙇‍♀️

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

      I also have same situation,

  • @ElectricalsSolutions
    @ElectricalsSolutions 11 місяців тому

    14:14 error are as follow of this program when compiled in DEV C++ compiler
    D:\C With Pradip\practice\Untitled2.cpp In function 'int main()':
    7 8 D:\C With Pradip\practice\Untitled2.cpp [Error] too many arguments to function 'void fun()'
    3 6 D:\C With Pradip\practice\Untitled2.cpp [Note] declared here
    D:\C With Pradip\practice\Untitled2.cpp In function 'void fun()':
    12 1 D:\C With Pradip\practice\Untitled2.cpp [Error] expected primary-expression before '/' token
    12 2 D:\C With Pradip\practice\Untitled2.cpp [Error] expected primary-expression before 'int'
    14 6 D:\C With Pradip\practice\Untitled2.cpp [Error] 'a' was not declared in this scope
    14 8 D:\C With Pradip\practice\Untitled2.cpp [Error] 'b' was not declared in this scope

  • @SwetaKumari-ps2rf
    @SwetaKumari-ps2rf 2 роки тому +3

    14:25 answer would be still 12

  • @Varun-yo1mb
    @Varun-yo1mb 2 роки тому +25

    Send classes pdf in description

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

    First view

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

    Love you mama

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

    can we get 5marks for this answer. for 5marks question

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

    Mam es program ka algorithm kaise banaaye

  • @paudelax9112
    @paudelax9112 10 місяців тому

    Your eyes got my heart falling for you .what a nice eyes ,l don't even describe in a word about your eyes

  • @hindusanatanstatus3543
    @hindusanatanstatus3543 2 роки тому +5

    I Think I'm The Second Commenter👍🏻

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

    No need to increase the playback speed mam already speaks in 1.5x😂

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

    I like coding

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

    complaition error

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

    4 min

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

    I love you mam

  • @harsh_._093
    @harsh_._093 11 місяців тому

    Mam can you explain in Hindi and Marathi plz

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

    In functions can we use flaot as retuntype
    #include
    Main()
    {
    Float a= 15.5;
    Char ch='d';
    Printit(a,ch);
    }
    Printit(a,ch)
    {
    Printf("
    %f %c",a,ch);
    }
    I am getting a ans 0.0000 in float can I know y and how to solve this prlm

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

    Apko
    Nicemam

  • @qtime69lol17
    @qtime69lol17 10 місяців тому

    Here you have it done with some simple conditions for * and /. Here you have it:
    #include
    void sum(void);
    void sub(void);
    void mult(void);
    void divi(void);
    int main() {
    sum();
    sub();
    mult();
    divi();
    return 0;
    }
    void sum() {
    int a = 5, b = 7, sum = 0;
    sum = a + b;
    printf("Sum of 5 and 7 is: %d
    ", sum);
    }
    void sub() {
    int a = 5, b = 7, sub;
    sub = a - b;
    printf("Sub of 5 and 7 is: %d
    ", sub);
    }
    void mult() {
    int a = 0, b = 1, mult = 1;
    if (a

  • @gouthamiheera4601
    @gouthamiheera4601 2 роки тому +7

    14:24 no error

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

    y am i getting error saying that return type of main should be int
    #include
    void sum(void);
    void main()
    {
    sum();
    }
    void sum()
    {
    int a=3,b=5,s=0;
    s=a+b;
    printf("sum=%d",s);

    }

    • @741ibrahim2
      @741ibrahim2 2 роки тому

      bro give your programme name with characters only not with numbers

    • @741ibrahim2
      @741ibrahim2 2 роки тому

      i e fun.c not fun11.c that means compiles will want return type as int

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

      @@741ibrahim2 ohh ok thank you so much 😀😀

    • @741ibrahim2
      @741ibrahim2 2 роки тому

      @@shruti2981 no problem

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

      change the code to
      int main()
      {
      sum();
      return 0;
      }

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

    answer is 12

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

    cute

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

    madam please to explan the telugu madam

  • @18fatima15
    @18fatima15 3 місяці тому +1

    14:23 ASSIGNMENT
    #include
    void sum();
    int main()
    {
    sum(5,4);
    return 0;
    }
    void sum(void)
    {
    int a=5,b=7,sum=0;
    sum=a+b;
    printf("Sum=%d",sum);
    }
    OUTPUT: too many augments to function void sum()

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

    homework mam 7:50
    #include
    void add(void);
    void sub(void);
    void mux(void);
    void div(void);
    int a , b;
    void main()
    {
    printf("Enter integer values of a and b : ");
    scanf("%d,%d",&a,&b);
    add();
    sub();
    mux();
    div();
    }
    void add()
    {
    int sum = 0;
    sum = a + b;
    printf("a + b is : %d
    ",sum);
    }
    void sub()
    {
    int sub = 0;
    sub= a - b;
    printf("a - b is : %d
    ",sub);
    }
    void mux()
    {
    int mux = 0;
    mux= a * b;
    printf("a * b is : %d
    ",mux);
    }
    void div()
    {
    int div = 0;
    div = a / b;
    printf("a / b is : %d
    ",div);
    }

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

    For the question asked at 8:00
    #include
    void add(void);
    void sub(void);
    void mult(void);
    void div(void);
    void main(void)
    {
    add();
    sub();
    mult();
    div();
    }
    void add(void)
    {
    int a, b, sum;
    printf("Enter two numbers: ");
    scanf("%d %d", &a, &b);
    sum = a + b;
    printf("Sum: %d
    ", sum);
    }
    void sub(void)
    {
    int a, b, sub;
    printf("Enter two numbers: ");
    scanf("%d %d", &a, &b);
    sub = a - b;
    printf("Sub: %d
    ", sub);
    }
    void mult(void)
    {
    int a, b, mult;
    printf("Enter two numbers: ");
    scanf("%d %d", &a, &b);
    mult = a * b;
    printf("Sum: %d
    ", mult);
    }
    void div(void)
    {
    int a, b, div;
    printf("Enter two numbers: ");
    scanf("%d %d", &a, &b);
    div = a / b;
    printf("Div: %d
    ", div);
    }

  • @user-tg6by2tj7o
    @user-tg6by2tj7o 9 місяців тому

    #include
    float sum();
    void main()
    {
    sum();
    }
    float sum()
    {
    float a,b,sum=0;
    printf("enter two number");
    scanf("%f%f",&a,&b);
    sum=a+b;
    printf("sum=%f
    ",sum);
    sum=a-b;
    printf("sum=%f
    ",sum);
    sum=a*b;
    printf("sum=%f
    ",sum);
    sum=a/b;
    printf("sum=%f
    ",sum);
    }

  • @abdulrahimjalloh363
    @abdulrahimjalloh363 11 місяців тому

    Assignment Submission:
    #include
    void sum(void);
    void sub(void);
    void div(void);
    void mult(void);
    void main()
    {
    sum();
    sub();
    div();
    mult();
    }
    void sum()
    {
    int a=5,b=7,sum=0;
    sum=a+b;
    printf("sum=%d
    ",sum);
    }
    void sub()
    {
    int a=7,b=2,sub=0;
    sub=a-b;
    printf("sub=%d
    ",sub);
    }
    void div()
    {
    int a=10,b=2,div=0;
    div=a/b;
    printf("div=%d
    ",div);
    }
    void mult()
    {
    int a=7,b=2,mult=0;
    mult=a*b;
    printf("mult=%d",mult);
    }

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

    #include
    void sum ();
    void sub ();
    void mul ();
    void div ();
    int a,b;
    void main(){
    char opr;
    printf("enter the operator");
    scanf("%c",&opr);
    printf("enter the value of operands");
    scanf("%d %d",&a,&b);//since a and b are global so we can use them anywhere in any function
    if(opr=='+')
    sum();
    else if (opr=='-')
    sub();
    else if (opr=='*')
    mul();
    else if (opr=='/')
    div();
    else
    printf("enter valid operator");
    }
    void sum() {
    int sum=0;
    sum=a+b;
    printf("sum=%d
    ",sum);
    }
    void sub(){
    int sub=0;
    sub=a-b;
    printf("sub=%d
    ",sub);
    }
    void mul(){
    int mul=0;
    mul=a*b;
    printf("multiply=%d
    ",mul);
    }
    void div(){
    float div=0;
    div=a/b;
    printf("div=%f
    ",div);
    }

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

    #include
    void sum(void);
    void sub(void); //function decleration
    void pro(void);
    void div(void);
    void main()
    {
    sum();
    sub(); //function call
    pro();
    div();
    }
    void sum() //function defination
    {
    int a=5,b=7,sum=0;
    sum=a+b;
    printf("sum=%d
    ",sum);
    }
    void sub()
    {
    int a=5,b=7,sub=0;
    sub=a-b;
    printf("sum=%d
    ",sub);
    }
    void pro()
    {
    int a=5,b=7,pro=0;
    pro=a*b;
    printf("sum=%d
    ",pro);
    }
    void div()
    {
    int a=5,b=7,div=0;
    div=a/b;
    printf("sum=%d
    ",div);
    }

  • @NAVEENKUMAR-nd7jg
    @NAVEENKUMAR-nd7jg Рік тому

    mam really are married or not ? plz tell us there's surprise for you one of the millionaire ($) person that i know him .

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

    #include
    void sum(void);
    void sub(void);
    void multiply(void);
    void divide(void);
    int main()
    {
    sum();
    sub();
    multiply();
    divide();
    }
    void sum()
    {
    int a, b, sum;
    printf("Enter two numbers(sum) : ");
    scanf("%d %d", &a, &b);
    sum = a + b;
    printf("sum = %d
    ", sum);
    }
    void sub()
    {
    int a, b, sub;
    printf("Enter two numbers(sub) : ");
    scanf("%d %d", &a, &b);
    sub = a - b;
    printf("sub = %d
    ", sub);
    }
    void multiply()
    {
    int a, b, multiply;
    printf("Enter two numbers(multiply) : ");
    scanf("%d %d", &a, &b);
    multiply = a * b;
    printf("multiply = %d
    ", multiply);
    }
    void divide()
    {
    int a, b, divide;
    printf("Enter two numbers(divide) : ");
    scanf("%d %d", &a, &b);
    divide = a / b;
    printf("divide = %d
    ", divide);
    }

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

    #include
    void fun();
    int main()
    {
    fun();
    return 0;
    }
    void fun(void)
    {
    int x=2,y=2,sum=0;
    sum=x+y;
    printf("sum=%d",sum);
    }
    it give correct o/p i.e sum=4

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

    #include
    void fun();
    void main()
    {
    fun();
    }
    void fun()
    {
    int a=25,b=8,sum=0;
    printf("addition=%d
    ",a+b);
    printf("subtraction=%d
    ",a-b);
    printf("multiplication=%d
    ",a*b);
    printf("division=%d
    ",a/b);
    }

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

    #include
    void sum();
    void sub();
    void mul();
    void div();
    void main(){
    sum();
    sub();
    mul();
    div();
    }
    void sum(){
    int a,b,sum=0;
    printf("enter the value of a:");
    scanf("%d",&a);
    printf("enter the value of b:");
    scanf("%d",&b);
    sum=a+b;
    printf("sum is %d
    ",sum);
    }
    void sub(){
    int x,y,sub=0;
    printf("enter the value of x:");
    scanf("%d",&x);
    printf("enter the value of y:");
    scanf("%d",&y);
    sub=x-y;
    printf("subtraction is %d
    ",sub);
    }
    void mul(){
    int p,q,mul=0;
    printf("enter the value of p:");
    scanf("%d",&p);
    printf("enter the value of q:");
    scanf("%d",&q);
    mul=p*q;
    printf("multiplication is %d
    ",mul);
    }
    void div(){
    int k,j,div=0;
    printf("enter the value of k:");
    scanf("%d",&k);
    printf("enter the value of j:");
    scanf("%d",&j);
    div=k/j;
    printf("division is %d
    ",div);
    }
    ASSIGNMENT NO1

  • @shaikhfaisal8464
    @shaikhfaisal8464 11 місяців тому

    #include
    void sum();
    void sub();
    void mul();
    void div();
    void main()
    {
    sum();
    sub();
    mul();
    div();
    }
    void sum()
    {
    int a=5,b=8,sum=0;
    sum= a+b;
    printf("sum=%d
    ",sum);
    }
    void sub()
    {
    int a=5,b=8,sub=0;
    sub= a-b;
    printf("sub=%d
    ",sub);
    }
    void mul()
    {
    int a=5,b=8,mul=0;
    mul= a*b;
    printf("mul=%d
    ",mul);
    }
    void div()
    {
    int a=5,b=8,div=0;
    div= a/b;
    printf("div=%d
    ",div);
    }

  • @nikithaa.s683
    @nikithaa.s683 Рік тому +1

    #include
    void sum();
    void sub();
    void mul();
    void divi();
    void main()
    {
    sum();
    sub();
    mul();
    divi();
    }
    void sum()
    {
    int a, b, sum=0;
    printf("enter two numbers ");
    scanf("%d%d",&a,&b);
    sum=a+b;
    printf("%d", sum);
    }
    void sub()
    {
    int a, b, sub=0;
    printf("enter two numbers ");
    scanf("%d%d",&a,&b);
    sub=a-b;
    printf("%d", sub);
    }
    void mul()
    {
    int a, b, mul=0;
    printf("enter two numbers ");
    scanf("%d%d",&a,&b);
    mul=a*b;
    printf("%d", mul);
    }
    void divi()
    {
    int a, b, divi=0;
    printf("enter two numbers ");
    scanf("%d%d",&a,&b);
    divi=a/b;
    printf("%d", divi);
    }

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

    #include
    void fun(void);
    void main(void)
    {
    fun( );
    }
    void fun(void)
    {
    int a,b,sum=0,sub=0,multi=0,div=0;
    printf("Enter a number :");
    scanf("%d%d",&a,&b);
    sum=a+b;
    sub=a-b;
    multi=a*b;
    div=a/b;
    printf("Sum = %d
    Sub = %d
    Multiply = %d
    div = %d
    ",sum,sub,multi,div);
    }

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

    #include
    // float sum(void); //Function declaration.
    void sum(void);
    void sub(void);
    void mul(void);
    void div(void);
    void main()
    {
    sum(); // Fuction Calling.
    sub();
    mul();
    div();
    }
    void sum() // Function Defination
    {
    int a, b, sum = 0;
    printf("Enter your Numbers. for addition:");
    scanf("%d%d", &a, &b);
    sum = a + b;
    printf("sum=%d
    ", sum);
    }
    void sub()
    {
    int a, b, sub = 0;
    printf("Enter your Numbers. for subtraction:");
    scanf("%d%d", &a, &b);
    sub = a - b;
    printf("sum=%d
    ", sub);
    }
    void mul()
    {
    int a, b, mul = 0;
    printf("Enter your Numbers. multiplication:");
    scanf("%d%d", &a, &b);
    mul = a * b;
    printf("mul=%d
    ", mul);
    }
    void div()
    {
    int a, b, div = 0;
    printf("Enter your Numbers. for division:");
    scanf("%d%d", &a, &b);
    div = a / b;
    printf("div=%d
    ", div);
    }

  • @paudelax9112
    @paudelax9112 10 місяців тому

    Your eyes got my heart falling for you .what a nice eyes ,l don't even describe in a word about your eyes

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

    #include
    void sum(void);
    void subract(void);
    void multiply(void);
    void divide(void);
    void main()
    {
    sum();
    subract();
    multiply();
    divide();
    }
    void sum()
    {
    int x = 10, y = 2, sum = 0;
    sum = x + y;
    printf("sum = %d", sum);
    printf("
    ");
    }
    void subract()
    {
    int x = 10, y = 2, subract = 0;
    subract = x - y;
    printf("subract = %d", subract);
    printf("
    ");
    }
    void multiply()
    {
    int x = 10, y = 2, multiply = 0;
    multiply = x * y;
    printf("multiply = %d", multiply);
    printf("
    ");
    }
    void divide()
    {
    int x = 10, y = 2, divide = 0;
    divide = x / y;
    printf("divide = %d", divide);
    printf("
    ");
    }

  • @Logan-ig7sm
    @Logan-ig7sm 11 місяців тому

    #include
    int sum()
    {int a, b, sum;
    printf("enter a and b:
    ");
    scanf("%d%d",&a,&b);
    sum=a+b;
    printf("sum=%d",sum);
    }
    int multiply()
    {
    int a, b, multiply;
    printf("
    enter a and b:
    ");
    scanf("%d%d",&a,&b);
    multiply=a*b;
    printf("a×b=%d
    ",multiply);
    }
    subtract()
    {
    int a, b, subtract;
    printf("
    enter a and b:
    ");
    scanf("%d%d",&a,&b);
    subtract=a-b;
    printf("a-b=%d
    ",subtract);
    }
    divide()
    {
    int a, b, divide;
    printf("
    enter a and b:
    ");
    scanf("%d%d",&a,&b);
    divide=a/b;
    printf("a/b=%d
    ",divide);
    }
    main()
    {
    sum();
    multiply();
    divide();
    subtract();

    }
    Thanks hopefully it is right 🙏❤

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

    #include
    void sum(void);
    void mul(void);
    void div(void);
    void sub(void);
    int main(){
    sum();
    mul();
    div();
    sub();
    return 0;
    }
    void sum(){
    int a, b;
    printf("Enter the two no. for sum :
    " );
    scanf("%d %d",&a,&b);
    int sum = a+b;
    printf("%d
    ",sum);
    }
    void mul(){
    int a, b;
    printf("Enter the two no. for mul :
    " );
    scanf("%d %d",&a,&b);
    int mul = a*b;
    printf("%d
    ",mul);
    }
    void div(){
    int a, b;
    printf("Enter the two no. for division :
    " );
    scanf("%d %d",&a,&b);
    int div = a/b;
    printf("%d
    ",div);
    }
    void sub(){
    int a, b;
    printf("Enter the two no. for subtraction :
    " );
    scanf("%d %d",&a,&b);
    int sub = a-b;
    printf("%d
    ",sub);
    }