# Shamyak Goel

cfunctions includes functions from c/c++ and syntax is very similar to c/c++

- Please install the package ansd share this package to your friend's
- Also subscribe my youtube channel Codewithshamyak

## Features

- Popular c/c++ functions in python
- Includes printf and scanf

## Installation

cfunctions requires python interpretor (python 3)

Install python on <a href="https://python.org/downloads" rel="noreferrer noopener" target="_blank">python.org</a> and download latest version of python then

Install the package as shown below

```
pip install cfunctions
```
If you get an error  - pip is not recognized as function etc.
then wacth this video - <a href="https://www.youtube.com/watch?v=An2UBGAlzpU" rel="noreferrer noopener" target="_blank">Click Here</a>
# Functions
## All functions
- fopen : Identical to c/++ fopen function. Opens a file in text mode.
- fgets : Identical to c/c++ fgets function. Writes a string to a file.
- fputs : Identical to c/c++ fputs function. Reads a string from a file.
- fgetc : Identical to c/c++ fgetc function. Reads a character from a file.
- fputc : Identical to c/c++ fputc function. Writes a character to a file.
- get   : Same as fgetc function.
- put   : Same as fputc function.
- puts  : Identical to c/c++ puts function. Writes a string to stdout (Screen).
- getchar : Identical to c/c++ getchar function. Reads a character from stdin (Input).
- scanf : Identical to c/c++ scanf function. Reads input and convert them into specific formats. (%d or %i for an int , %s for a string , %f for a float , %b for a bolean value)
- getline : Identical to c++ getline function but you can pass a propmt.
- gets  : Identical to c/c++ gets function. Reads a string from stdin (Input).
- sscanf : Identical to c/c++ sscanf function. Reads data from an array in specific formats.(%d or %i for an int , %s for a string , %f for a float , %b for a bolean value)
- sprintf : Identical to c/c++ sprintf function. Writes data into an array in specific formats. (%d or %i for an int , %s for a string , %f for a float , %b for a bolean value)
- printf : Identical to c/c++ printf function. Writes data in stdout (Screen) in specific formats. (%d or %i for an int , %s for a string , %f for a float , %b for a bolean value)
- isdigit : Return true of string is a digit string otherwise false
- priint : New function that writes integers on stdout (Screen).
- priflo : New function that writes floats on stdout (Screen).
- pristr : New function that writes strings on stdout (Screen).
- bopen : Opens a file in binary mode
- bwrite : Writes encoded content in a binary file
- bread : Returns text version of decoded binary file
- fprintf : Identical to c/c++ fprintf function. Writes data in file and you can pass formats of variables.(%d or %i for an int , %s for a string , %f for a float , %b for a bolean value)
- putc : Identical to c/c++ putc function. Writes a character into a file.
- getc : Identical tto c/c++ getc function. Returns a character read from a file.

## New functions
- bopen : Opens a file in binary mode
- bwrite : Writes encoded content in a binary file
- bread : Returns text version of decoded binary file
- fgets : Identical to c/c++ fgets function
- fputs : Identical to c/c++ fputs function
- fopen : Identical to c/++ fopen function
- fprintf : Identical to c/c++ fprintf function.
- putc : Identical to c/c++ putc function.
- getc : Identical to c/c++ getc function.
## License

MIT
