Skip to content

Latest commit

 

History

History
57 lines (49 loc) · 1.7 KB

README.md

File metadata and controls

57 lines (49 loc) · 1.7 KB

Learning-c

So, learning C as in C not c# c++ or any other wanky thingy, just plain c

Usuage

  • Build and Run a project: make p=<project_name> e.g. make p=hello-world
  • Build: make p=<project_name> build
  • Clean up a project dir (removes compiled files): make p=<project_name> clean

Usefull links

Exercises

1. Hello World

Write a program that outputs Hello World 20 times

2. Strings

Write a program that stores your age, length and name in variables and prints them.

3. Piramid

Create a program that prints a piramid that looks like this:

                   #
                  ##
                 ###
                ####
               #####
              ######
             #######
            ########
           #########
          ##########
         ###########
        ############
       #############
      ##############
     ###############
    ################
   #################
  ##################
 ###################
####################

4. Arrays

Write a program that will prompt the user to input ten integer values. The program will display the smallest and greatest of those values. It also displays the value that occur the most. - Source

5. Matrix

By using two-dimensional array, write C program to display a matrix as shown below: - Source

 0	 1	 1	 1	 1	 
-1	 0	 1	 1	 1
-1	-1	 0	 1	 1
-1	-1	-1	 0	 1
-1	-1	-1	-1	 0