Skip to content

MScodi/C-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C

C Programming

Compile and run on : https://www.onlinegdb.com/

Loop

1)For            -Typically, we Use when we know how much iteration we want-
      for(initilization expr; condition expr; update){
              ------------------//body
              }
2)While Loop     -Typically, we use when we don't know how much iteration we want--
            while(condition){
                     --------
                     --------  }
3) Do-While Loop
            do{
                  --------    Body executed at least Once.          
                  ---------   Exit controlled loop 
                }while(condition);

Function

1 )User Defined Function- Created by Users
2)Library Function     - printf(),scanf(),sqrt();
Return and argument is not mandatory

int f(int a){                                    | f(x);
---------   //here a is formal or dummy argument |  // here x is actual Parameter
----------                                       |
}

-- Function in C/C++ return a single value . But we are able to return Multiple value by using *Pointers*,structure,arrays.

 #Uses
-  Abstraction
-  Reusablity
3) Variadic funcion -Functions which take a variable number of arguments. Must add _<stdarg.h>_
        va_list: To initialize the arguments pointer.
        va_start :Point to the first element.
        va_arg  : Point to first and then move to next arguments on evrery function call.
        va_end   : End using variable argument list

About

Learning a C programming language by implementing code side by side. Solved Some basic Problems in C.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages