{"id":26291155,"url":"https://github.com/tahaaa22/printf","last_synced_at":"2026-04-19T03:07:24.120Z","repository":{"id":183726617,"uuid":"669922063","full_name":"tahaaa22/printf","owner":"tahaaa22","description":"custom implementation of the printf function in C using linux and vim","archived":false,"fork":false,"pushed_at":"2024-01-31T09:07:04.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-31T10:27:59.932Z","etag":null,"topics":["cpp","linux","vim"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tahaaa22.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-23T21:34:44.000Z","updated_at":"2024-01-31T09:08:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1d12958-0393-4272-a376-3987d5cd70b2","html_url":"https://github.com/tahaaa22/printf","commit_stats":null,"previous_names":["tahaaa22/printf"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahaaa22%2Fprintf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahaaa22%2Fprintf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahaaa22%2Fprintf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tahaaa22%2Fprintf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tahaaa22","download_url":"https://codeload.github.com/tahaaa22/printf/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243668011,"owners_count":20328035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","linux","vim"],"created_at":"2025-03-15T00:34:45.761Z","updated_at":"2026-04-19T03:07:24.074Z","avatar_url":"https://github.com/tahaaa22.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Printf Function\n\nThis is a custom implementation of the `printf` function in C. The `printf` function is used to print formatted output to the standard output stream. This implementation provides similar functionality to the standard `printf` function in the C library.\n\n## Usage\n\nTo use this `printf` function, follow these steps:\n\n1. Include the necessary header files:\n```c\n#include \u003climits.h\u003e\n#include \u003cstdio.h\u003e\n#include \"main.h\"\n```\n\n2. Write your program's `main` function and call the `_printf` function to print the desired output. For example:\n```c\nint main(void)\n{\n    int len;\n    int len2;\n\n    len = _printf(\"Let's try to printf a simple sentence.\\n\");\n    len2 = printf(\"Let's try to printf a simple sentence.\\n\");\n\n    // More printf statements...\n\n    return (0);\n}\n```\n\n3. Compile and run your program. Make sure to link the `main.h` header file.\n```bash\ngcc -o program main.c main.h\n./program\n```\n\n## Functionality\n\nThis implementation of `printf` supports the following format specifiers:\n\n- `%d` or `%i` - for printing integers.\n- `%c` - for printing characters.\n- `%s` - for printing strings.\n- `%%` - for printing a literal percent sign.\n\nIt also supports the following modifiers:\n\n- `-` - for left-aligning the output.\n- `0` - for zero-padding the output.\n\n## Examples\n\nHere are some examples of how to use the custom `_printf` function:\n\n```c\n_printf(\"Length:[%d, %i]\\n\", len, len);\n```\n\n```c\n_printf(\"Negative:[%d]\\n\", -762534);\n```\n\n```c\n_printf(\"Character:[%c]\\n\", 'H');\n```\n\n```c\n_printf(\"String:[%s]\\n\", \"I am a string !\");\n```\n\n```c\n_printf(\"Percent:[%%]\\n\");\n```\n\n## Note\n\nPlease note that this implementation might have limitations or differences compared to the standard `printf` function in the C library. It is intended as a learning exercise and may not be suitable for all production use cases.\n\nIf you encounter any issues or have any questions, please feel free to contact us.\n\nEnjoy using our custom `printf` function!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahaaa22%2Fprintf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftahaaa22%2Fprintf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftahaaa22%2Fprintf/lists"}