User Tools

Site Tools


programming:c

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
programming:c [2018/09/03 17:25]
127.0.0.1 external edit
programming:c [2019/02/05 20:36] (current)
jessica Edited formatting
Line 1: Line 1:
-Splash page +====== ​======
- +
-**Welcome to the master race.**+
  
 C is a general-purpose programming language. It is closely associated with the UNIX system where it was developed, since the system and most of the programs that run on it are written in C. The language is not explicitly tied to one operating system or machine, and is useful for writing a variety of programs ranging from operating systems and compilers to major programs in many different domains. C is a general-purpose programming language. It is closely associated with the UNIX system where it was developed, since the system and most of the programs that run on it are written in C. The language is not explicitly tied to one operating system or machine, and is useful for writing a variety of programs ranging from operating systems and compilers to major programs in many different domains.
Line 7: Line 5:
 All of the features of C are contained in some form within C++ so when working with C++ it can be more efficent to work with C constructs instead of their newer equivilent. One example of this includes the ?: operator which can be used as a far more efficent version of a if statment <​sub>​Which unfortunately looks god awful in code</​sub>​ All of the features of C are contained in some form within C++ so when working with C++ it can be more efficent to work with C constructs instead of their newer equivilent. One example of this includes the ?: operator which can be used as a far more efficent version of a if statment <​sub>​Which unfortunately looks god awful in code</​sub>​
  
-\\+===== Basic examples =====
  
-Basic examples +==== Hello world ====
-  * Hello world+
  
-<​code>​+<​code ​c>
 #include <​stdio.h>​ // Inclusion for standard Input/​Output library #include <​stdio.h>​ // Inclusion for standard Input/​Output library
  
Line 23: Line 20:
 </​code>​ </​code>​
  
-  * For loops (With a bit of int concatination)+==== For loops (With a bit of int concatination) ​====
  
-<​code>​+<​code ​c>
 #include <​stdio.h>​ // Standard input output #include <​stdio.h>​ // Standard input output
  
Line 48: Line 45:
 </​code>​ </​code>​
  
-  * While loops (With a bit of the rand function) +==== While loops (With a bit of the rand function) ​==== 
-<​code>​+ 
 +<​code ​c>
 #include <​stdio.h>​ //​ Standard input output #include <​stdio.h>​ //​ Standard input output
 #include <​time.h>​ //​ Using time to seed the random function #include <​time.h>​ //​ Using time to seed the random function
Line 70: Line 68:
 </​code>​ </​code>​
  
-  * File creation +==== File creation ​==== 
-<​code>​+<​code ​c>
 #include <​stdio.h>​ // Standard input output (which includes file input output) #include <​stdio.h>​ // Standard input output (which includes file input output)
  
Line 90: Line 88:
 </​code>​ </​code>​
  
-Secure examples+===== Secure examples ​=====
   * buffers   * buffers
   * etc   * etc
programming/c.txt · Last modified: 2019/02/05 20:36 by jessica