Skip to content

Latest commit

 

History

History

0x04-pointers_arrays_strings

0x04. C - Pointers, arrays and strings

About

An introductory project on:

  • pointers and how to use them
  • arrays and how to use them
  • the differences between pointers and arrays
  • How to manipulate strings
  • Scope of variables

Requirements

  • Ubuntu 14.04
  • gcc 4.8.4

File Descriptions

Mandatory

0-reset_to_98.c - function that takes a pointer to an int as parameter and updates the value it points to to 98.

1-swap.c - function that swaps the values of two integers.

2-strlen.c - function that returns the length of a string.

3-puts.c - function that prints a string, followed by a new line, to stdout.

4-print_rev.c - function that prints a string, in reverse, followed by a new line.

5-rev_string.c - function that reverses a string.

6-puts2.c - function that prints one char out of 2 of a string, followed by a new line.

7-puts_half.c - function that prints half of a string, followed by a new line.

8-print_array.c - function that prints n elements of an array of integers, followed by a new line.

9-strcpy.c - function that copies the string pointed to by src, including the terminating null byte (\0), to the buffer pointed to by dest.

Advanced

100-atoi.c - converts a string to an integer.

101-keygen.c - generates random valid passwords for the program 101-crackme.