Skip to content

Latest commit

 

History

History

0x00-hello_world

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

0x00. C - Hello, World

Here are some C programming tasks to sharpen your skills and explore different aspects of the C language. Each task has a specific objective and instructions for completion. Happy coding! 🖥️

Task List

0️⃣ Preprocess C File: Write a script that runs a C file through the preprocessor and saves the result into another file.

Instructions:

  • Set the C file name to the value stored in the variable $CFILE.
  • Save the preprocessed output in a file named c.

1️⃣ Compile C File (No Linking): Write a script that compiles a C file without linking.

Instructions:

  • Set the C file name to the value stored in the variable $CFILE.
  • Generate the output file by replacing the .c extension with .o.
  • Example: If the C file is main.c, the output file should be main.o.

2️⃣ Generate Assembly Code: Write a script that generates the assembly code of a C file and saves it in an output file.

Instructions:

  • Set the C file name to the value stored in the variable $CFILE.
  • Generate the output file by replacing the .c extension with .s.
  • Example: If the C file is main.c, the output file should be main.s.

3️⃣ Compile and Create Executable: Write a script that compiles a C file and creates an executable named "cisfun".

Instructions:

  • Set the C file name to the value stored in the variable $CFILE.
  • Create the executable named "cisfun".

4️⃣ Print String: Write a C program that prints "Programming is like building a multilingual puzzle" followed by a new line.

Instructions:

  • Use the puts function to print the string.
  • Ensure the program ends with the value 0.

5️⃣ Print with Proper Grammar: Write a C program that prints "with proper grammar, but the outcome is a piece of art," followed by a new line.

Instructions:

  • Use the printf function to print the string.
  • Ensure the program returns 0.
  • Compile the program without warnings using the -Wall gcc option.

6️⃣ Print Size of Types: Write a C program that prints the size of various types on the computer it is compiled and run on.

Instructions:

  • Your program should produce the same output as the example provided.
  • Warnings are allowed.
  • Ensure the program returns 0.
  • Note: You might need to install the package libc6-dev-i386 on Linux to test the -m32 gcc option.

7️⃣ Generate Assembly Code (Intel Syntax): Write a script that generates the assembly code (Intel syntax) of a C file and saves it in an output file.

Instructions:

  • Set the C file name to the value stored in the variable $CFILE.
  • Generate the output file by replacing the .c extension with .s.
  • Example: If the C file is main.c, the output file should be main.s.

8️⃣ Print Art to Standard Error: Write a C program that prints "and that piece of art is useful" - Dora Korpar, 2015-10-19, followed by a new line, to the standard error.

Instructions:

  • Do not use any functions listed in the NAME section of the man (3) printf or man (3) puts.
  • Ensure the program returns 1.
  • Compile the program without any warnings using the -Wall gcc option.

Thank you for exploring our project and reviewing the README and the tasks provided. We believe these resources will assist you in understanding the objectives and requirements of each task. If you have any questions or require further assistance, please don't hesitate to reach out. We wish you success in completing the tasks and hope they contribute to your growth as a developer. 🚀