Code Monkey home page Code Monkey logo

printf's Introduction

_printf:

Returns the resulting format on success. If failed, return -1.

Each file contains a function to aid with basic functioning of _printf.

Format Capabilities

Our version of program can print the following: Character: %c Strings: %s Signed integers: %d Signed decimal intergers: %i Unsigned integers: %u Hex (lower and upper): %x and %X Octal: %o Binary: %b ROT13: %R Reverse String: %r

To run our _printf, do the following:

Clone the repo:

git clone https://github.com/gjdame/printf.git

Type in the commands:

gcc -Wall -Wextra -Werror -pedantic -Wno-format *.c

Run the executable:

./a.out

Examples:

int main(void)
{
	_printf("Char: [%c]\n", 'H');
	_printf("String: [%s]\n", "I am a string !");
	_printf("Negative:[%d]\n", -762534);
	_printf("Binary: [%b]\n", 98);
	_printf("Unsigned octal: [%o]\n", ui);
	_printf("Unsigned hexadecimal:[%x, %X]\n", ui, ui);
	_printf("Unknown:[%r]\n");
	_printf("Reverse me, muchacho: %r\n", "Reverse me, muchacho");
	_printf("Big Whopper: %R\n", "Big Whopper");
	return (0);
}

Character:[H]
String:[I am a string !]
Negative:[-762534]
Binary:[1100010]
Unsigned octal:[20000001777]
Unsigned hexadecimal:[800003ff, 800003FF]
Unknown:[%r]
Reverse me, muchacho: ohcahcum, em esreveR
Big Whopper: reppohW giB

YAAY.

printf's People

Contributors

gjdame avatar wyrd00 avatar

Stargazers

Ablade Steven avatar

Forkers

wyrd00

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.