Return to
Home page
C Programming Languages (Basic concepts)
while cycle 1: Insert 5 numbers using the keyboard and count how many even and odd numbers have been inserted.
casting: Some examples about mathematical expressions and casting
array 1: Print the first even number and its position of a 10 elements array/vector.
functions 1: Multiplication of all the elements of a vector by 3.0, using a function (parameters are passed to the function by value).
while do-while for loops 1: A simple example about the utilization of the
while
,
do-while
and
for
loops constructs to print numbers between da
0
and
n
.
array 2: find and print adjacent and equal values stored in an array
-
-
-
-
file reading 1: Example on how to read a file row-by-row, word-by-word, character-by-character and how to read a structured file (where field of different type are save in each row of the file).
-
-
-
More specific exercises
-
printf format inttypes.h: Use of the function printf to format the output of variables with fixed dimension, as defined in the <inttypes.h> library.
max3: Compute the maximum value between 3 numbers
-
-
switch: The same program written in four different ways, the last by using the
switch
statement
calc: Use the
switch
statement to realize a simple calculator
sudoku: Solution of the sudoku game, given a
9×9
matrix with unknown numbers
Documentation
If you found any error, or if you want to partecipate to the editing of this wiki, please contact: admin [at] skenz.it
You can reuse, distribute or modify the content of this page, but you must cite in any document (or webpage) this url: https://www.skenz.it/cs/c_language/basic_concepts