Video není dostupné.
Omlouváme se.

Functions In C: C Tutorial In Hindi #19

Sdílet
Vložit
  • čas přidán 3. 05. 2019
  • In this C programming tutorial video, I have explained you about functions. I hope you are enjoying this C course in Hindi.
    ►This C Lecture is a part of this C Programming Course: • C Language Tutorials I...
    ►Source Code + Notes: codewithharry....
    ►Click here to subscribe - / @codewithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Learn Python In Hindi ...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithha...
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

Komentáře • 1,1K

  • @sohammukherjee9264
    @sohammukherjee9264 Před 2 lety +621

    Those who did not understand pls see this ....I have tried to do it in a fresher way. The main problem is sir used several programs in same file.Here is the refreshed version.Hope you all guys find it helpful.👇👇👇👇
    1)// Without Argument and without return type
    #include
    void myname()
    {
    printf (" Soham Mukherjee");
    }
    int main()
    {
    printf ("My name is :");
    myname();
    return 0;
    }
    2)//With Argument with return value
    #include
    int sum ( int a,int b)
    {
    return a+b;
    }
    int main ()
    {
    int a,b,c;
    a=9;
    b=87;
    c= sum(a,b);
    printf ("The sum is %d
    ",c);
    return 0;
    }
    3)//Without Argument and with return value
    #include
    int takenumber ()
    {
    int i;
    printf ("Enter a number ");
    scanf("%d",&i);
    printf (" The number is %d
    ",i);
    return i;
    }
    int main ()
    {
    int c;
    c=takenumber();
    return 0;

    }
    4)//With Argument and Without return value
    #include
    void printstar (int n)
    {
    for (int i = 0; i < n; i++)
    {
    printf("%c",'*');
    }

    }
    int main()
    {
    printstar(7);
    return 0;
    }

  • @keshavgaur4535
    @keshavgaur4535 Před 4 lety +1197

    Sir thoda kam samjh aaya . Function is tough :(

    • @ankursinger102
      @ankursinger102 Před 4 lety +63

      Mujhe bhi tough lga

    • @alfiyazahra4680
      @alfiyazahra4680 Před 4 lety +63

      @@ankursinger102 same here...is topic ko ar time daina chahiye tha...

    • @wipeesports8990
      @wipeesports8990 Před 3 lety +31

      Samajh nhi aya

    • @ytgamer2642
      @ytgamer2642 Před 3 lety +41

      bhot easy topic h mughe 1 st time me aa gya sir ne itni asani se smjhaya h ki koi doubt nhi h

    • @maheshgoyal2809
      @maheshgoyal2809 Před 3 lety +25

      dude this function is tough but if you practice more it will become easy, this is also called modularisation.

  • @lakshaykumar6181
    @lakshaykumar6181 Před 3 lety +386

    this is the only video which i was unable to understand till now from this playlist

    • @shivamarora9621
      @shivamarora9621 Před 3 lety +20

      same bro, bilkul samajh ni aya :(

    • @lakshaygaming6930
      @lakshaygaming6930 Před 3 lety +14

      Vahi to bro function se age kuch samajh nhi aya par function apni kaksha par samajh aa gya acha samjha rkha hai c++ mein

    • @shantomgamez1432
      @shantomgamez1432 Před 3 lety +21

      i thought i was the only one who didnt understand this video as compared to other videos this was slightly confusing

    • @lakshaygaming6930
      @lakshaygaming6930 Před 3 lety +2

      Hn apni kaksha acha se

    • @Pro_Gamer_Boys
      @Pro_Gamer_Boys Před 3 lety +3

      Same here

  • @SadhguruKnows
    @SadhguruKnows Před 2 lety +228

    void myname(){
    printf("my name is Sharma");
    }
    int main(){
    printf("what is your name?");
    myname();
    return 0;
    }
    Here, myname() is a function without argument and without return value!

    • @felix1211
      @felix1211 Před 2 lety +8

      damn son.

    • @player-ne6hs
      @player-ne6hs Před 2 lety +7

      Sahi he

    • @wordshot1506
      @wordshot1506 Před 2 lety +8

      bruh you cannot use return keyword as it's without return value and without arguments lmao

    • @pranjalgupta0508
      @pranjalgupta0508 Před 2 lety +2

      @@wordshot1506 Take "void" instead of "int".
      And then you can neglect return at the end.

    • @realone5382
      @realone5382 Před 2 lety +1

      But usme return 0 likha h....mujhe smjh nhi aaya👾

  • @bibhoregoswami624
    @bibhoregoswami624 Před 3 lety +285

    You really deserve a huge respect for doing this job. You don't know how you are helping non CSE engineering students by providing this.
    Salute sir.

  • @mohdzeeshan7870
    @mohdzeeshan7870 Před 4 lety +182

    Sir I understood your all videos but this video created a confusion...🤔

    • @ayushdabhi5138
      @ayushdabhi5138 Před 3 lety +5

      yes sir this video created a confusion...

    • @siprabiswas4795
      @siprabiswas4795 Před 3 lety

      @রহস্যময়ী কাহিনী tomak confusion hoyene

  • @sukhdevjohly7807
    @sukhdevjohly7807 Před 4 lety +55

    #include
    void funcforharry()
    {
    printf("This is a function for 'codewithharry'
    Based on Without arguments and Without return value:-
    So #codewithharry you can see now their is no argument and no return value");
    }
    int main()
    {
    funcforharry();
    return 0; }

    • @specticles2280
      @specticles2280 Před 3 lety

      Bro ...

    • @Abhishekkumar-fr1lp
      @Abhishekkumar-fr1lp Před 3 lety

      Birooo.....

    • @hxrsh_x
      @hxrsh_x Před 3 lety

      @@_RajatDhullCSB bro nothing is returned here only line is being printed. Value will only be returned if we use *return* keyword.

    • @harshpandya2246
      @harshpandya2246 Před 3 lety

      Thanks bro its helpful

    • @Ambient_Life
      @Ambient_Life Před 3 lety

      i did the same lol. came to check other people's answer

  • @can_yaman780
    @can_yaman780 Před rokem +20

    Thank you Harry Bhai for this valuable cource.
    #include
    void message(void);
    int main()
    {
    printf("My Introduction
    ");
    message();
    printf("My name is Can");
    }

    void message(void)
    {
    printf("I am a student
    ");
    }

  • @vishalkarmakar418
    @vishalkarmakar418 Před 3 lety +205

    This lecture 19 needs to be watched several times if not understood becoz this video will crystal clear your functions topic literally i understood it perfectly

    • @AdityaThakur05
      @AdityaThakur05 Před 2 lety +16

      To without aruguments and without return ka code bata 😂

    • @muneebahmad2026
      @muneebahmad2026 Před 2 lety

      how many times you watched it again?

    • @user-gd5fb7yf8n
      @user-gd5fb7yf8n Před 2 lety

      @@muneebahmad2026 i clear this topic from another channel videos

    • @ashish4k07
      @ashish4k07 Před 2 lety

      yeah

    • @ashish4k07
      @ashish4k07 Před 2 lety +5

      @@AdityaThakur05
      if before declaration
      void average() {
      float a,b,c;
      printf("Enter the value of 3 numbers a, b, c in a sequence : ");
      scanf("%f%f%f",&a,&b,&c);
      printf("The average of 3 numbers is = %.3f",((a+b+c)/3));
      }
      if after then simply declare it then function calling only

  • @RajeshYadav-lh1zc
    @RajeshYadav-lh1zc Před 4 lety +19

    Harry bhai school se lekr college tk aagye or fir govt job b lg gye lakin programing language and concpt iske aapki video dekhkr smjh me aaye hai wrna to teacher ka muh dekhkr ratta marke pass huye the smjh m kuch nhi aaya tha kabhi.

    • @ShlokKumarMishra
      @ShlokKumarMishra Před 19 dny

      He may have the knowledge but not the ability to deliver his thing to viewers.
      You must not say like that to anyone

  • @cartoon_club4251
    @cartoon_club4251 Před 4 lety +31

    Ye video dekhne ke bad Aesi feeling aarhi jese Sari old Learning video ka mix masala ho gya😂. fully confused
    Or jab video dekh rha tha tab laga sirf muje samaj nhi aayi but jab aake cmmt dekhi toh😁🤣 Mere bhai bandu bhut sare mile 😁

  • @MukeshKumar-qy9jz
    @MukeshKumar-qy9jz Před 3 lety +118

    don"t mess up things in our mind by using multiple functions in same file
    make it easy bro

    • @thefive.am.c
      @thefive.am.c Před 3 lety +6

      Yes....going too fast 😵😵

    • @moh.munavvar1768
      @moh.munavvar1768 Před 3 lety +3

      @Shiv Pawar lol tmhe samajh nhi aya to gaali do ge c in one video dekho harry ki sab samajh ayega

    • @Sandeepkumar-se5zu
      @Sandeepkumar-se5zu Před 3 lety

      @@moh.munavvar1768 sch me ??? itta acha h ??/

  • @tanmaygupta8677
    @tanmaygupta8677 Před 3 lety +40

    Please make a detailed video on functions.
    This is the only video which i was unable to understand till now from this playlist.😢

  • @yashkumar-jf5rf
    @yashkumar-jf5rf Před 4 lety +4

    Hello sir.
    my name is Yash kumar.
    i belongs to meerut...sir apke video dekh kr mere programming bahoot improve ho gyi ha.. teacher ko bhi believe nahi hota mere programming dekh kr..sir me apko apna idle manta hu....apke hi sarre video dekta hu.. muje bahoot proud feel hota apne app per jab muje koi program deta ha ..aur me turant bna deta hu usko chaiye kaisa bhi ho..
    muje itna acha lgta ha socha app ke sath share karo...
    harry sir love you..

  • @secular786
    @secular786 Před 2 měsíci +1

    24:03 *Without argument, without return value*
    #include
    #include
    void name();
    int main(){
    int e;
    char c;
    printf("Enter your name:");
    scanf("%c",&c);
    e =(int)c;
    printf("The ASCII value of your name's First Letter %c is: %d",c,e);
    }
    void name(){
    printf("Done!");
    }

  • @digambersinha
    @digambersinha Před 4 lety +40

    yr aap kitne laajawab ho...mtlb feel kr kr ke btate ho...experience level or Teaching level best h Sir aapka💓💓😊😊🙏🙏

  • @Mkr1881
    @Mkr1881 Před 3 lety +80

    Sir!make a bigger video on fuction with more explanation. Previous videos was under stable bt, this 1 arises many confusions🙄

  • @srcreation5052
    @srcreation5052 Před rokem +26

    1)avoid rewriting program
    2)we can devide work among programmers using function

  • @dikshajain9845
    @dikshajain9845 Před 3 lety +11

    # include < stdio.h>
    Void func ( )
    {
    int i;
    printf ("enter a number");
    scanf("%d",&i);
    }
    int main ( )
    {
    func( )
    print (" The entered value is %d",i);
    return 0;
    }
    Is this correct bhaiya???

    • @editorsmusic7808
      @editorsmusic7808 Před 3 lety +1

      Printf not printf in main function other than overything ok
      Hii Diksha

    • @editorsmusic7808
      @editorsmusic7808 Před 3 lety +1

      Printf not printf in main function other than overything ok
      Hii Diksha

    • @cryptoholic8850
      @cryptoholic8850 Před 3 lety +1

      no it is wrong
      you have to use star funcation for no return value and for no arguement you have to use scanf
      thats it

    • @-HARSHAGARWAL
      @-HARSHAGARWAL Před 3 lety +2

      Hii diksha , Harsh here!!
      Every thing ok but aapne function ko call kiya par use koi variable assign nahi kiya!!

    • @sanjaysanjuu7200
      @sanjaysanjuu7200 Před 2 lety +1

      I think there should be a semi colon(;) after func() in main function as it is a function call.

  • @manashalder3999
    @manashalder3999 Před 3 lety +6

    I completed 19 videos in 2 days.
    printf("Thank you harry bhai");

    • @deepparjapat4826
      @deepparjapat4826 Před 3 lety

      Hello brother I want to tell you something can you Help me

  • @janhvinarayan1633
    @janhvinarayan1633 Před 8 měsíci +2

    sir aap kaafi acha padhaate hain, mere khyal se aapko har video ke aakhri me ek mcq type quiz bhi rakhni chahiye thi video ke contents se related aur aapko har video ke baad hw bhi dena chahiye jese practice programs jinme humlog padhaye gaye topics ko implement bhi kar saken par chaliye koi nahi, acha hain ki aapne yeh course mera college shuru hone se pehle hi banake khatam kardiya tha too me 1st semester me yeh pura course khatam karlungi fir aapka java vala course start karungi

  • @utkarshvibhav3058
    @utkarshvibhav3058 Před 2 lety +10

    Time stamp = 24:11
    Without arguments and return value:-
    int printing{
    printf("Hello Guys");
    }

  • @srcreation5052
    @srcreation5052 Před rokem +28

    A function can be called multiple time to provide reusability and modularity

  • @rahilbadi7641
    @rahilbadi7641 Před 4 lety +15

    Include
    Void guys (){
    Printf ("hello guys");
    }
    Void main (){
    Guys();
    }

    • @sc5084
      @sc5084 Před měsícem

      wrong bhai G and g different hote hain
      Bss bata raha hu

  • @princekori6231
    @princekori6231 Před 9 měsíci +1

    Without argument and Without return =
    #include
    Void printHello();
    int main()
    {
    PrintHello();
    }
    Void printHello()
    {
    Printf("Hello");
    }

  • @tutorialshack1369
    @tutorialshack1369 Před 11 měsíci +1

    without argument and without return value
    #include
    void display(){
    printf("hello world");
    }

    int main()
    {
    display();
    return 0;
    }

  • @62chandshaikh.23
    @62chandshaikh.23 Před 4 lety +65

    salute you harry sir,you really deserve respect.

  • @Amar-qk4hg
    @Amar-qk4hg Před rokem +5

    Thank you so much I am watching your videos in 2023 It is very helpful. I am enjoying learning c language from you 🥰
    Huge respect and love You Sir😍

  • @geethulkrishna1965
    @geethulkrishna1965 Před 10 měsíci +2

    #include
    void printhello(){
    printf("Hello");
    }
    int main(){
    printhello();
    return 0;
    }

  • @jayeshparihar2416
    @jayeshparihar2416 Před rokem +13

    I was so nervous before learning functions in C but after watching this video it has become an easy task to make functions...

  • @debodhkumar2905
    @debodhkumar2905 Před 4 lety +14

    WITHOUT ARGUMENT AND WITHOUT RETURN VALUE :-
    #include
    #include
    void sum();
    int main()
    {
    sum();
    return 0;
    }
    void sum()
    {
    int a, b, c;
    printf("enter two numbers
    ");
    scanf("%d%d", &a, &b);
    c = a + b;
    printf("the sum of two numbers is
    %d", c);
    }

  • @firebout7675
    @firebout7675 Před 2 lety +4

    ye wala video lagta h 10 bar dekhna parega....utna samaj nahi aya

  • @shubhamkiller3918
    @shubhamkiller3918 Před 8 měsíci +2

    Whenever i watch your lectures my respect for you increases a lot ...Thanks on the behalf of all students who are achieving new milestones by watching your videos . Thanks for being our teacher .

  • @vikramyadav7569
    @vikramyadav7569 Před 3 lety +6

    with argument and no return value, you are not defined "i', when you used for loop, while your programm currectly compile, how is possible, please reply as soon as

  • @TechnicalAnkesh
    @TechnicalAnkesh Před 4 lety +10

    #include //Header File
    void Ankesh()
    {
    printf("Hello World
    ");
    }
    int main()
    {
    Ankesh();
    return 0;
    }
    output:
    Hello World

    • @shivanshthakur4538
      @shivanshthakur4538 Před 3 lety

      right

    • @harshitpant07
      @harshitpant07 Před 3 lety +1

      bro without return means?

    • @shivanshthakur4538
      @shivanshthakur4538 Před 3 lety

      @@harshitpant07 it means that it is not going to take anything and will not return anything

    • @TechnicalAnkesh
      @TechnicalAnkesh Před 3 lety +1

      @@harshitpant07 if you don't want to write return 0; you can write void main() instead of int main()

  • @saurabhkoli8517
    @saurabhkoli8517 Před 4 lety +29

    Sir I understand all the concept but i am confused in when to use which function
    plz help me sir

  • @codificatore_05
    @codificatore_05 Před 8 měsíci +2

    Fantastic Video once again... Thank you harry bhai for clearing my concets on Functions .. Thank you very much

  • @saurabh_bansod
    @saurabh_bansod Před 2 měsíci +1

    #include
    void sumOfTwoIntegers() {
    int num1, num2, sum;
    // Read the first integer
    printf("Enter the first integer: ");
    scanf("%d", &num1);
    // Read the second integer
    printf("Enter the second integer: ");
    scanf("%d", &num2);
    // Calculate the sum
    sum = num1 + num2;
    // Print the sum
    printf("Sum of %d and %d is: %d
    ", num1, num2, sum);
    }
    int main() {
    // Call the function to calculate and print the sum of two integers
    sumOfTwoIntegers();
    return 0;
    }

  • @ommasal4787
    @ommasal4787 Před 9 měsíci +2

    challenge excepted
    #include
    void printstar(int n)
    {
    for (int i = 0; i < n; i++)
    {
    printf("%c",'*');
    }

    printf("%c",'*');
    }
    int takenumber(){
    int i;
    printf("Enter the number
    ");
    scanf("%d",&i);
    return i;
    }
    int main()
    {
    int a, b, c;
    a=5;
    b=5;
    printstar(23);
    c=takenumber();
    printf("%d",c);
    return 0;
    }

  • @therealview5880
    @therealview5880 Před 18 dny

    #include
    void practice ()
    {
    printf("This code for without argument and without return value ");
    }
    int main()
    {
    parctice() ;
    return 0;
    }

  • @SisodiyaTech
    @SisodiyaTech Před 4 lety +5

    #include
    void Harry()
    {
    printf ("harry is best ") ;
    }
    int main ()
    {
    Harry();
    }

  • @priyaranjanpradhan7418
    @priyaranjanpradhan7418 Před 4 lety +6

    harry bhai.....function ke upar ek aur vedio post kijie......please........sirf example leke samjhana

  • @binodbastola8255
    @binodbastola8255 Před rokem +2

    #include
    int main() { void display()
    {
    printf(" I am the function without argument and without return type ");
    }
    display(); return 0;}

    • @narutouzumakiee785
      @narutouzumakiee785 Před rokem +2

      Why you have written display instead of print?

    • @binodbastola8255
      @binodbastola8255 Před rokem +1

      @@narutouzumakiee785 I have written display(); at the last line that means i am calling the display function which is defined as void display(){ ...}.This function has a print statement which actually prints .

    • @narutouzumakiee785
      @narutouzumakiee785 Před rokem +1

      What if i write printf() instead of display(). Will it work same?

    • @narutouzumakiee785
      @narutouzumakiee785 Před rokem +1

      @@binodbastola8255 But harry sir has used printf as calling function in every way of defining function. I also searched and implement it on vs code by using prinf as calling function, it is giving me correct answer. But I think your logic is not true.

    • @narutouzumakiee785
      @narutouzumakiee785 Před rokem +1

      @@binodbastola8255 Printf is not reserved keyword it is library function.

  • @umairabdullah9041
    @umairabdullah9041 Před 2 lety +5

    10:12 (Declaration, defination, call) Important

  • @premshankarsaini5375
    @premshankarsaini5375 Před rokem +3

    Jai shree ram ji 🙏😇🙏🙏
    God bless you 😇

  • @tejasnere7125
    @tejasnere7125 Před 2 měsíci

    Simple program with
    Without argument and without return value :-
    #include
    void letter()
    {
    printf("Hello world");
    }
    int main()
    {
    letter();
    return 0;
    }

  • @janhvinarayan1633
    @janhvinarayan1633 Před 8 měsíci +1

    #include
    int main(){
    product();
    return 0;
    }
    int product(){
    int a,b,c;
    printf("Enter value of a:");
    scanf("%d",&a);
    printf("Enter value of b:");
    scanf("%d",&b);
    c=a*b;
    printf("The value of c is:%d",c);
    }

  • @oneseven1
    @oneseven1 Před 3 lety +9

    Thoda complicate hogaya.! Please make a new video on functions again with better examples.

  • @nahiarabeer9565
    @nahiarabeer9565 Před 3 lety +12

    Harry is carry in programming world
    🔥🔥🔥

  • @adipshah4392
    @adipshah4392 Před 3 lety +8

    we can create function even without declaring it by defining it before main function.
    I understood this after this video🤣

  • @writer_ap_1213
    @writer_ap_1213 Před 2 měsíci +4

    Samjh nhi aaya 😢

  • @ankursinger102
    @ankursinger102 Před 4 lety +5

    Sir yeh topic thda sa tough lga plzz is prr aur detailed video bnaiye easy way m🙏🙏

  • @CodingShin
    @CodingShin Před 2 měsíci

    For now i tried combining the types taught for making one for without argument and without return.
    #include
    void star()
    {int n;
    printf("enter a number");
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
    printf("%c", '*');
    }
    }
    int main()
    {
    star();
    return 0;
    }

  • @AS_Chandel
    @AS_Chandel Před rokem +2

    Name arrange
    #include
    #include
    // Function to swap two strings
    void swap(char *str1, char *str2) {
    char temp[100];
    strcpy(temp, str1);
    strcpy(str1, str2);
    strcpy(str2, temp);
    }
    // Function to perform bubble sort on an array of strings
    void bubbleSort(char arr[][100], int n) {
    int i, j;
    for (i = 0; i < n - 1; i++) {
    for (j = 0; j < n - i - 1; j++) {
    // Compare adjacent strings and swap them if needed
    if (strcmp(arr[j], arr[j + 1]) > 0) {
    swap(arr[j], arr[j + 1]);
    }
    }
    }
    }
    int main() {
    int n;
    printf("Enter the number of names: ");
    scanf("%d", &n);
    char names[n][100];
    printf("Enter the names one by one:
    ");
    for (int i = 0; i < n; i++) {
    scanf("%s", names[i]);
    }
    // Perform bubble sort on the array of names
    bubbleSort(names, n);
    printf("
    Sorted names:
    ");
    for (int i = 0; i < n; i++) {
    printf("%s
    ", names[i]);
    }
    return 0;
    }

  • @technicaltutorialarena
    @technicaltutorialarena Před 5 lety +33

    Without argument without return
    #include
    #Include
    int sum();
    Void main
    {
    int c;
    c=sum();
    printf("sum=%d",c);
    getch();
    }
    int sum()
    {
    int a, b;
    printf("enter two numbers ");
    scanf("%d%d",&a, &b);
    return(a+b);
    }
    Challenge accepted.

    • @akshatj21
      @akshatj21 Před 4 lety +18

      you are returning (a+b) so its without argument but with a return.

    • @WaltonGamingYt
      @WaltonGamingYt Před 4 lety +12

      Instead of return, printf("the sum is = %d", a+b)

    • @ravneetvirk3695
      @ravneetvirk3695 Před 3 lety +3

      Witout argument and with return type hai yeh

    • @himanimalhotra1071
      @himanimalhotra1071 Před 2 lety

      It has a return value.... So this condition falls in without argument and with return valur

    • @dilipmukhiya4401
      @dilipmukhiya4401 Před 2 lety

      It is return and no argument function

  • @ashutoshgupta6271
    @ashutoshgupta6271 Před 3 lety +3

    U ARE GREAT WITH CONTENT BROO!!!!

  • @kumarmanish16072
    @kumarmanish16072 Před 3 lety +2

    Nhi iss video ke concepts easy the aur mujhe bhut easily smjh aa gya functions aur sath hi me video ....

  • @vinayakgoyal8099
    @vinayakgoyal8099 Před 3 lety +1

    mast video he bhai

  • @shubhendusen721
    @shubhendusen721 Před 4 lety +16

    could you please clarify how you used "i" without previously declaring it.?
    21:01

    • @Naresh_Sharma
      @Naresh_Sharma Před 4 lety +12

      He declared it in the for loop. Notice that he wrote "int i" not just "i" in the for loop... You can also declare any variable inside the for loop. You should watch the for loop video, you will understand better :)

    • @shubhendusen721
      @shubhendusen721 Před 4 lety +12

      @@Naresh_Sharma ohhh yeah damn right !!
      Thanks man!!!!

    • @ashish4k07
      @ashish4k07 Před 2 lety +1

      he declared it inside the for loop instead that's the alternate and easy way.

  • @snehalshinde5907
    @snehalshinde5907 Před rokem +4

    #include
    void sum(void);
    int main()
    {
    sum();
    }
    void sum(void)
    {
    int a,b,c;
    a=10,b=10;
    c=a+b;
    printf("%d",c);
    }
    without arguments without return

  • @manoor0858
    @manoor0858 Před měsícem

    this topic is halwa after learning java from u ,tho i can relate jb mai phli baar pdha tha mje bhi bhot din lage the samajhne me ,toh guys just try to understand jitna ni smjh aya,1-2 din baad firse video dekhna and also do question practice usse concept aur clear ho jayega.Thanks :D

  • @mohammedwaseem8599
    @mohammedwaseem8599 Před 3 lety +3

    Void function we can use which has no return value and no arguments

  • @Hustler2025
    @Hustler2025 Před 3 lety +43

    Topics of the video are:
    1). What is Function.
    2). Syntax of Function.
    3). Advantages of C Functions.
    4). Declaration,Defination and Calling of FUNCTION.
    5). Types of C-Function( i. Library , ii. Used Defined Function).
    6). Function Code Example.

  • @Gamertyro
    @Gamertyro Před rokem

    Without argument without return value:
    #include
    int apple(){
    printf("Apple");
    }
    int main(){
    apple();
    }

  • @mystudy3729
    @mystudy3729 Před 11 měsíci

    Without argument or without return value..........
    #include
    void addition() {
    int num1, num2, sum;
    printf("Enter first number: ");
    scanf("%d", &num1);
    printf("Enter second number: ");
    scanf("%d", &num2);
    sum = num1 + num2;
    printf("Sum: %d
    ", sum);
    }
    int main() {
    addition();
    return 0;
    }

  • @crucialgyaan
    @crucialgyaan Před 3 lety +4

    Void main is the which has no arguments and no returne value

  • @aakash9025
    @aakash9025 Před 5 lety +22

    void nothing()
    {
    printf("Hey Everyone
    ");
    }
    Function with no return value and no arguments

  • @WhiteHatcode
    @WhiteHatcode Před rokem +2

    as expected you are great teacher ❤ love you sir 😘

  • @bhavikagandhi8061
    @bhavikagandhi8061 Před 2 lety +3

    This playlist can never b a beginner friendly.

  • @rakeshranjanprabhat9218
    @rakeshranjanprabhat9218 Před 3 lety +5

    sir u r great
    {.intially i was facing much prblm in C ,but i started your video ,i felt very comfortable in C},thank you so much for videos;

  • @manoor0858
    @manoor0858 Před měsícem

    // Without arguement and without return value:
    #include
    void noob()
    {
    printf("Good Morning
    ");
    }
    int main()
    {
    noob();
    }

  • @adarsh_kr_maurya
    @adarsh_kr_maurya Před 3 lety +2

    Sir I have completed quiz.thanks a lot..

  • @infoschoolofVishal
    @infoschoolofVishal Před 2 lety +5

    // Finding Maximum value from users inputed three numbers.
    // Also it is in loop. If want to exit type 1.
    #include
    int main(int argc, char const *argv[])
    {
    int a, b, c, ans;
    do
    {
    printf("Number A ");
    scanf("%d", &a);
    printf("Number B ");
    scanf("%d", &b);
    printf("Number C ");
    scanf("%d", &c);
    if (a > b && a > c)
    {
    printf("A is greatest.
    ");
    }
    else if (b > a && b > c)
    {
    printf("B is Greatest.
    ");
    }
    else if (c > a && c > b)
    {
    printf("C is Greatest.
    ");
    }
    printf(" Want to Exit ? type; 1 for Yes or 0 for no. ");
    scanf("%d", &ans);
    /* code */
    } while (ans == 0);
    return 0;
    }

    • @unknown-lv8io
      @unknown-lv8io Před 2 lety +2

      Ye to galat hoga na...kyuki ye to with argument without return value hua....hame without argument puchu hai

    • @noob_hck3864
      @noob_hck3864 Před 2 lety

      D = A if A>B and A>C else B if B>C else C
      print(D)

  • @talkwithhardy4322
    @talkwithhardy4322 Před 2 lety +7

    void put(){ //without argument , without return value
    int q, r;
    printf("enter number of q: ");
    scanf("%d", &q);
    r=q+q;
    printf("after adding q, value is : %d", r);
    int main()
    {
    put();
    }
    // I hope it will useful for everyone

  • @mr_affan15
    @mr_affan15 Před 2 lety +1

    Thanks for teaching sir

  • @piyushmanikantm
    @piyushmanikantm Před 3 lety +5

    without argument and without return value: void main()

  • @nikhilraj1842
    @nikhilraj1842 Před 5 lety +3

    /*
    author:Nikhil Raj
    purpose: To learn about funtions(Declartaion, Definatoin, Call)
    date:19/06/2019
    */
    #include
    void afuncwithoutreturnandarg(){
    printf("Harry Sir jinda baad
    ");
    }
    int main(){
    printf("Hello world
    ");
    afuncwithoutreturnandarg();
    return 0;
    }

  • @nimikhan1547
    @nimikhan1547 Před 3 lety

    Harry bhai you are great.. Mjy aj apki ye video dekhny ky bd functions smj ae wo bht achi tra.. Is sy phly bilkul b functions ka concept clear ni tha.. And done with quiz also💖

  • @zubaidasehnaz2086
    @zubaidasehnaz2086 Před rokem

    // Function without arguments and without return value
    #include
    void GM(){
    printf("good morning");
    }
    int main() {
    GM();
    return 0;
    }

  • @srcreation5052
    @srcreation5052 Před rokem +4

    Return type. Functionname(parameter)
    {
    Return anything
    }

  • @vishalchauhan9832
    @vishalchauhan9832 Před 5 lety +5

    Excellent lecture

  • @aniketpotbhare389
    @aniketpotbhare389 Před 9 měsíci +1

    //Without argument & without return value
    #include
    //Function declaration
    void sum (int ,int );
    int main()
    int a ,b ,c, n;
    {
    Printf("enter two numbers");
    Scanf("%d%d",&a,&b);
    //Function call
    Void sum (a,b);
    }
    //Function definition
    Void sum(int a, int b)
    {
    int add;
    add= a+b;
    Pritf("Addition of the numbers%d",add);
    }
    Ps: This code is written in Mobile so Ignore mistakes 😭

  • @shaikpattafaizu891
    @shaikpattafaizu891 Před 10 měsíci +1

    Please make another video on functions with more examples then it will become easy to understand

  • @atifmalik8012
    @atifmalik8012 Před 5 měsíci

    Function with arguments and with return value
    #include
    //this is function declaration
    int multiply(int a,int b);
    int main() {
    int a,b,c;
    printf("Enter the two values you want to multiply :
    ");
    printf ("first value:
    ");
    scanf("%d",&a);
    printf ("Second value :
    ");
    scanf("%d",&b);
    c = multiply(a,b);
    printf("The value of multiplication is %d
    ",c);

    }
    //this is function defination
    int multiply(int a ,int b){
    return a*b;
    }

  • @vivekkumarmishra3813
    @vivekkumarmishra3813 Před 3 lety +43

    Sir I found it little difficult to understand as compared to previous lectures

  • @_anway
    @_anway Před 2 lety +15

    Thank you brother I was struggling with functions for a while now and your video made my concept on functions crystal clear. I am really grateful!!

  • @CHE10DIARY
    @CHE10DIARY Před rokem

    #include
    void stars()
    {
    printf("hellow world");

    }
    int main()
    {
    stars();
    return 0;
    }

  • @SKATech01
    @SKATech01 Před 9 měsíci

    i am just try 😊😊
    #include
    int main()
    {
    int mark;
    printf("enter ther mark ");
    scanf("%d",&mark);
    if (mark>99) {
    printf("A+");
    } else if (mark > 90) {
    printf("A");
    } else if (mark > 80) {
    printf("B+");
    } else if (mark > 70) {
    printf("B");
    } else if (mark > 60) {
    printf("C+");
    } else if (mark > 50) {
    printf("C");
    } else if (mark > 40) {
    printf("E");
    } else if (mark > 30) {
    printf("E-");
    } else {
    printf("faild");
    }
    return 0;
    }

  • @anujchouksey3026
    @anujchouksey3026 Před 4 lety +17

    #include
    void function()
    {
    int j;
    printf("Enter a number
    ");
    scanf("%d",&j);
    if(j>=10){
    printf("The number entered is not a single digit number
    ");
    }
    else printf("The number entered is a single digit number");
    }
    int main()
    {
    function();
    return 0;
    }

  • @engineerbhai7642
    @engineerbhai7642 Před 5 lety +3

    Bestcoder in you tube

  • @sagarjamadar8989
    @sagarjamadar8989 Před 7 měsíci

    #include
    int print()
    {
    printf("hello sirji");
    }
    int main()
    {
    print();
    return 0;
    }
    Here we directly called the function without using any argument and did nit return anything

  • @sailendrachettri8521
    @sailendrachettri8521 Před 3 lety +1

    //QUIZ Solution.
    void printHello(){
    printf("Hello Harry Bhai");
    }
    int main(){
    printHello();
    }

  • @souravkumar7283
    @souravkumar7283 Před 4 lety +16

    Patience = Harry sir
    Amazing teaching skills = Harry sir

  • @SaurabhKumar-vk6wm
    @SaurabhKumar-vk6wm Před 2 lety +11

    Code of function without argument and without return value -
    #include
    void printTable();
    int main()
    {
    printTable();
    return 0;
    }
    void printTable(){
    int a;
    printf("the table of :");
    scanf("%d", &a);

    for( int i = 1; i

  • @atifmalik8012
    @atifmalik8012 Před 5 měsíci

    Function without argument and with return value
    #include
    int factorial_of_5();
    int c;
    int main(){
    c = factorial_of_5();
    printf("%d",c);
    }
    factorial_of_5(){
    int factorial = 1;
    for(int i = 5;i>=1;i--){
    factorial *= i;
    }
    return factorial;
    }

  • @AB-wn2gc
    @AB-wn2gc Před 2 lety +2

    Guys its tough for first time give it some time see alot of examples and shen you'll study classes you'll understand its actual use

  • @42-rutviktribhuvan92
    @42-rutviktribhuvan92 Před 5 měsíci

    Hi,
    Here is the respective code for without argument and without return type:
    /*
    Author: Rutvik Tribhuvan
    Purpose: Testing a function
    Date: 4th March 2024
    */
    #include
    void test(){
    printf(" This is a test.");
    }
    int main(int argc, char const *argv[])
    {
    /* code */
    test();
    return 0;
    }

  • @shivanigoswami7517
    @shivanigoswami7517 Před 5 lety +11

    Q1.Given an array arr[] of N integers, the task is to sort the array without changing the position of
    negative numbers (if any) i.e. the negative numbers need not be sorted.
    Examples:
    Input: arr[] = {2, -6, -3, 8, 4, 1}
    Output: 1 -6 -3 2 4 8
    Input: arr[] = {-2, -6, -3, -8, 4, 1}
    Output: -2 -6 -3 -8 1 4
    please solve it into c code

    • @Gamer_Amit_
      @Gamer_Amit_ Před rokem

      is it possible in python while using list?

    • @qwerty_ra_ungamma
      @qwerty_ra_ungamma Před rokem

      #include
      int main()
      {
      int arr[] = { 2, -6, -3, 8, 4, 1 };
      int n = sizeof(arr) / sizeof(arr[0]);
      for (int i = 0; i < n; i++)
      {
      if (arr[i] >= 0)
      { for (int j = 1, k = 0; i + j < n; j++)
      { if (arr[i + j] >= 0 && arr[i + j] < arr[i])
      { k = arr[i];
      arr[i] = arr[i + j];
      arr[i + j] = k; } } }
      printf("%d ", arr[i]);
      }
      return 0;
      }

  • @13naaz
    @13naaz Před rokem +3

    #include
    void display()
    {
    printf("Have a nice day");
    }
    int main(){
    display();
    return 0;
    }

  • @adityaraja8276
    @adityaraja8276 Před 7 měsíci

    Challenge accepted.
    Function without argument and without return value
    #include
    void display()
    {
    printf("This functions is without arg and return value");
    }
    int main()
    {
    display();
    return 0;
    }