{"id":25639469,"url":"https://github.com/fatima-progmmer/function-in-c-","last_synced_at":"2025-02-23T03:38:16.845Z","repository":{"id":226534947,"uuid":"768965583","full_name":"Fatima-progmmer/Function-in-C-","owner":"Fatima-progmmer","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-04T10:53:13.000Z","size":1502,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-04T11:31:59.781Z","etag":null,"topics":["cpp","function","program","programming-language"],"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/Fatima-progmmer.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,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-08T04:06:59.000Z","updated_at":"2025-02-04T10:53:16.000Z","dependencies_parsed_at":"2024-03-08T05:23:52.872Z","dependency_job_id":"40968460-07a2-499c-bfa7-c4534bc8d4a9","html_url":"https://github.com/Fatima-progmmer/Function-in-C-","commit_stats":null,"previous_names":["fatima-progmmer/function-in-c-"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatima-progmmer%2FFunction-in-C-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatima-progmmer%2FFunction-in-C-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatima-progmmer%2FFunction-in-C-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fatima-progmmer%2FFunction-in-C-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fatima-progmmer","download_url":"https://codeload.github.com/Fatima-progmmer/Function-in-C-/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240265481,"owners_count":19774071,"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","function","program","programming-language"],"created_at":"2025-02-23T03:38:16.319Z","updated_at":"2025-02-23T03:38:16.807Z","avatar_url":"https://github.com/Fatima-progmmer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n---\n\n# Function in C  \n\nThis repository contains a C program demonstrating **functions** in C. Functions help in structuring code, improving reusability, and making programs more readable.  \n\n## 🎥 Video Explanation  \nI have also created a video explaining this program in detail. Watch it [here](your-video-link).  \n\n## 📝 Program Overview  \n- Defines a function to perform a specific task.  \n- Calls the function from `main()` to execute the logic.  \n- Demonstrates the concept of **function declaration, definition, and calling**.  \n\n## 📜 Code Snippet  \n```c\n#include \u003cstdio.h\u003e\n\n// Function declaration\nint add(int a, int b);\n\nint main() {\n    int num1, num2, sum;\n\n    printf(\"Enter two numbers: \");\n    scanf(\"%d %d\", \u0026num1, \u0026num2);\n\n    // Function call\n    sum = add(num1, num2);\n\n    printf(\"Sum: %d\\n\", sum);\n\n    return 0;\n}\n\n// Function definition\nint add(int a, int b) {\n    return a + b;\n}\n```  \n\n## 🚀 How to Run  \n### Option 1: Compile and Run the Code  \n1. Clone this repository:  \n   ```sh\n   git clone https://github.com/Fatima-progmmer/Function-in-C-.git\n   ```\n2. Navigate to the directory:  \n   ```sh\n   cd Function-in-C-\n   ```\n3. Compile the program:  \n   ```sh\n   gcc function.c -o function\n   ```\n4. Run the executable:  \n   ```sh\n   ./function\n   ```\n\n### Option 2: Run the Pre-Compiled `.exe` File (Windows)  \n1. Download the `function.exe` file from this repository.  \n2. Double-click to run it.  \n3. Follow the on-screen instructions.  \n\n## 📌 Explanation  \n- **Function Declaration** → `int add(int a, int b);`  \n- **Function Call** → `sum = add(num1, num2);`  \n- **Function Definition** → `int add(int a, int b) { return a + b; }`  \n\n## 🤝 Contributing  \nFeel free to fork this repository and contribute improvements!  \n\n## 📜 License  \nThis project is open-source and free to use.  \n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatima-progmmer%2Ffunction-in-c-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffatima-progmmer%2Ffunction-in-c-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffatima-progmmer%2Ffunction-in-c-/lists"}