Skip to content

Latest commit

 

History

History

0x05-pointers_arrays_strings

0x05. C - Pointers, arrays and strings

Description

What you should learn from this project:

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

  • Write a function that takes a pointer to an int as parameter and updates the value it points to to 98.
  • Write a function that swaps the values of two integers.
  • Write a function that returns the length of a string.
  • Write a function that prints a string, followed by a new line, to stdout.
  • Write a function that prints a string, in reverse, followed by a new line.
  • Write a function that reverses a string.
  • Write a function that prints every other character of a string, starting with the first character, followed by a new line.
  • Write a function that prints half of a string, followed by a new line.

[8. Arrays are not pointers](./ 8-print_array.c)

  • Write a function that prints n elements of an array of integers, followed by a new line.

Prototype: char *_strcpy(char *dest, char *src);

  • Write a function that convert a string to an integer.
  • Create a program that generates random valid passwords for the program 101-crackme.

Author