Skip to content

Full Reference

// Standard Input Output
#include <stdio.h>
// Console Output
int printf(const char *format, ...);
int puts(const char *str);
// Console Input
int scanf(const char *format, ...);
char *gets(char *str);
//  File Functions
FILE *fopen(const char *filename, const char *mode);
int fclose(FILE *stream);
// File Writing
size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream);
int fprintf(FILE *stream, const char *format, ...);
int fputc(int char, FILE *stream); // or putc
int fputs(const char *str, FILE *stream);
// File Reading
size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream);
int fscanf(FILE *stream, const char *format, ...);
int fgetc(FILE *stream); // or getc
char *fgets(char *str, int n, FILE *stream);
// File Position Manipulation
int fseek(FILE *stream, long int offset, int whence);
long int ftell(FILE *stream);
void rewind(FILE *stream);


// Standard Library
#include <stdlib.h>
void *malloc(size_t size);
void *calloc(size_t n_items, size_t size);
void *realloc(void *ptr, size_t size);
void free(void *ptr);


// String
#include <string.h>
void *memcpy(void *dest, const void *src, size_t n);
void *memmove(void *dest, const void *src, size_t n);
size_t strlen(const char *str);
int strcmp(const char *str1, const char *str2);
char *strcpy(char *dest, const char *src);
char *strcat(char *dest, const char *src);
char *strrev(char *str);


// Character Type
#include <ctype.h>
int isalnum(int c);
int isalpha(int c);
int isdigit(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int islower(int c);
int toupper(int c);
int tolower(int c);