Cheatography
                https://cheatography.com
            
        
        
    
                   
                            
    
                    C language, Programming 1
                    
                 
                    
        
        
            
    
        
                                    This is a draft cheat sheet. It is a work in progress and is not finished yet.
                    
        
                
        
            
                                
            
                
                                                
                                
    
    
            Computer Parts
        
                        
                                                                                    
                                                                                            Processing Unit (CPU, RAM, +):  | 
                                                                                                                        pentium, phenom, Core iX (i3, i5, i7, +)  | 
                                                                                 
                                                                                            
                                                                                            Storage:  | 
                                                                                                                        hard drive, floppy disk, CD/DVD, USB drive  | 
                                                                                 
                                                                                            
                                                                                            Input Devices:  | 
                                                                                                                        keyboard, mouse, touch screen, microphone  | 
                                                                                 
                                                                                            
                                                                                            Output Devices:  | 
                                                                                                                        monitor, printer, speakers  | 
                                                                                 
                                                                         
                             
    
    
            Conversion bits to bytes
        
                        
                                                                                    
                                                                                            1 bit = a piece of information (0 or 1), (Y or N), (T or F), (On or Off)  | 
                                                                                 
                                                                                            
                                                                                            8 bits = 1 byte (stores/holds one letter)  | 
                                                                                 
                                                                         
                             
    
    
            Variables
        
                        
                                                                                    
                                                                                            %c  | 
                                                                                                                        char ('c')  | 
                                                                                                                        printf (" %c\n ", a); // char  | 
                                                                                 
                                                                                            
                                                                                            %i or %d  | 
                                                                                                                        int; integer (123)  | 
                                                                                                                        printf (" %i or %d\n", e); \\ integer  | 
                                                                                 
                                                                                            
                                                                                            %f  | 
                                                                                                                        float; floating point number (2.05)  | 
                                                                                                                        printf (" %f\n ", c); \\ float  | 
                                                                                 
                                                                                            
                                                                                            %lf  | 
                                                                                                                        long float or double  | 
                                                                                                                        printf (" %lf\n ", d); \\ double\long float  | 
                                                                                 
                                                                                            
                                                                                            %s  | 
                                                                                                                        string; char name [] = "Hi!" (array of characters)  | 
                                                                                                                        printf (" %s\n ", b); \\ character array  | 
                                                                                 
                                                                         
                             
                             | 
                                                                              | 
                                                        
                                
    
    
            Loops
        
                        
                                                                                    
                                                                                            while loop: the code happens after the condition (0 or more)  | 
                                                                                                                        while ( count >= 0)  | 
                                                                                 
                                                                         
                             
                             | 
                                                                              | 
                                                        
                                                             |