Skip to content

Files

Latest commit

34cc479 · Oct 28, 2022

History

History

0x01-variables_if_else_while

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Sep 9, 2022
Oct 28, 2022

0x01. C - Variables,if,else,while

Resources

Tasks

0. Positive anything is better than negative nothing

image

  • Source Code
  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 0-positive_or_negative.c -o 0-positive_or_negative
1. The last digit

image

  • Source Code
  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 1-last_digit.c -o 1-last_digit
2. I sometimes suffer from insomnia. And when I can't fall asleep, I play what I call the alphabet game

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 2-print_alphabet.c -o 2-print_alphabet

image

3. alphABET

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 3-print_alphabets.c -o 3-print_alphabets
4. When I was having that alphabet soup, I never thought that it would pay off

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 4-print_alphabt.c -o 4-print_alphabt
5. Numbers

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 5-print_numbers.c -o 5-print_numbers
6. Numberz

image

  • This ASCII table will help you understand my solution.
    • For this you need to understand that putchar holds the decimal representation of the variable.
    • So we add 0 == 48 48 is the decimal value to our single digit integer to convert it into its character representation.
    • Better explanation here
  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 6-print_numberz.c -o 6-print_numberz
7. Smile in the mirror

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 7-print_tebahpla.c -o 7-print_tebahpla
8. Hexadecimal

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 8-print_base16.c -o 8-print_base16
9. Patience, persistence and perspiration make an unbeatable combination for success

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 9-print_comb.c -o 9-print_comb
10. Inventing is a combination of brains and materials. The more brains you use, the less material you need

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 100-print_comb3.c -o 100-print_comb3
11. The success combination in business is: Do what you do better... and: do more of what you do...

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 101-print_comb4.c -o 101-print_comb4
12. Software is eating the World

image

  • Compile this way: gcc -Wall -pedantic -Werror -Wextra -std=gnu89 102-print_comb5.c -o 102-print_comb5