/C-problems-Hacktoberfest2023

Make some contribution in c programming on Hacktoberfest2023

Primary LanguageCGNU General Public License v3.0GPL-3.0

C Language Basic-Problems Repository for Hactoberfest2023

This is a repository created specially for Hacktoberfest 2023 Contribution. Looking out to contribute with some good quality codes Go for it!!!

check out the guidelines

Welcome to the C Language Basic-Problem Solving Repository! This repository is dedicated to solving a list of programming questions in the C language. We invite you to contribute your solutions to these problems and help build a valuable resource for C programmers.

logo

Table of Contents

  • Introduction
  • How to Contribute
  • Getting Started
  • List of Questions
  • Code Style Guidelines
  • License

Introduction

C programming is a powerful and versatile language used in various fields of computer science and software development. Solving programming questions in C can improve your problem-solving skills and deepen your understanding of the language.

This repository aims to provide a collection of C programming questions for learners and enthusiasts to practice and enhance their skills. By contributing to this repository, you can help others learn and grow while improving your own programming abilities.

How to Contribute

We welcome contributions from developers of all skill levels. Whether you're a beginner looking to learn or an experienced programmer willing to share your knowledge, there are several ways to contribute:

  1. Solving Problems: Choose a problem from the list, create a new branch, and submit your solution in C.

  2. Improving Existing Solutions: If you find an existing solution that can be optimized or enhanced, feel free to make improvements.

  3. Adding New Problems: If you have a new C programming question you'd like to see in the list, please create an issue to discuss it or submit a pull request with the new problem and solution.

  4. Documentation: Improve the README, provide better explanations for the questions or add usage examples.

  5. Bug Fixes: If you come across any issues or bugs, please report them by creating an issue or, if possible, submit a pull request with a fix.

  6. Review and Feedback: Review pull requests, provide constructive feedback and help maintain the quality of the solutions.

To contribute, follow these steps:

  1. Fork this repository to your GitHub account.
  2. Clone your forked repository to your local machine.
  3. Create a new branch for your contribution: git checkout -b your-branch-name
  4. Add your solution or make improvements.
  5. Commit your changes with a meaningful message: git commit -m "Add solution to problem X"
  6. Push your changes to your forked repository: git push origin your-branch-name
  7. Create a pull request to merge your changes into this repository.

Getting Started

To get started, make sure you have the following tools installed on your system:

  • C Compiler (e.g., GCC)
  • Git
  • GitHub Account

Clone the repository:

git clone https://github.com/krishnapatidar458/C-problems-Hacktoberfest2023.git
cd C-problems-Hacktoberfest2023

Now you're ready to start solving problems and contributing!

List of Questions

Here is the list of C programming questions you can work on:

Question 1: Write a C language program to print Hello Word!.
Question 2: Write a C language program to read input from a keyboard of various data types and print them.
Question 3: Write a C language program to print the sum of first n natural numbers.
Question 4: Write a C language program to find if the year is a leap or not.
Question 5: Write a C language program to find the factorial of a positive integer. (number read from keyboard)
Question 6: Write a C language program to print the area of geometrical shapes – triangle, rectangle, circle, etc.
Question 7: Write a C language program to print weekdays using a switch case statement.
Question 8: Write a C language program to design a calculator using arithmetic operators using switch case statements.
Question 9: Write a C language program to print all numbers between 1 to 50 using all three C language loops (while, DO While, and For Loop).
Question 10: Write a C language program to print all alphabet from a to z using all three C language loops (while, DO While and For Loop).
Question 11: Write a C language program to print all alphabet from z to a using all three C language loops (while, DO While and For Loop).
Question 12: Write a C language program to print HAPPY BIRTHDAY 100 times and infinite time using all three C language loops (while, DO While and For Loop).
Question 13: Write a C language program to read no. from keyboard and detect given no. is prime, odd, even and composite no.
Question 14: Write a C language program to convert any no. up to 9 digit into Roman No.
Question 15: Write a C language program to insert commas suitable & write the names according to Indian and international system of numeration of any given no. by the keyboard.
Question 16: Write a C language program to print table of any given no.
Question 17: Write a C language program to print 1 to 100 – increasing order and decreasing order 100 to 1 using three loops (while, DO While and For Loop).
Question 18: Write a C language program to compute greater no. from given three no. Numbers read from keyboard.
Question 19: Write a C language program to compute greater no. from given two no. Numbers read from the keyboard.
Question 20: Write a C language program to swap/exchange value of a & b.
Question 21: Write a C language program to compute greater no. from given two no. Numbers read from the keyboard.
Question 22: Write a C language program to define a conditional (? :) operator.
Question 23: Write a C language program to computer arithmetical operations.
Question 24: Write a C language program to calculate root1and root2 of given no.
Question 25: Write a C language program to computer vowels and consonants from a given character using nested if statements.
Question 26: Write a C language program to compute factorials of any given no. (0!=1)
Question 27: Write a C language program to calculate the area of a circle, triangle, Rectangle, or square.
Question 28: Write a C language program to show a trigonometry table. (sin, cos, tan, sec, cosec, cot, and angle are 0,30,45,60 and 90 degrees).
Question 29: Write a C language program to calculate the power of no. (x^y)
Question 30: Write a C language program to print and the sum of Fibonacci series for a given value of n. 0,1,1,2,3,5,8,13,21, ……..,n
Question 31: Write a C language program to show instance variable, class variable, and local variable.
Question 32: Write a C language program to convert the given temperature in Fahrenheit to Celsius and Kelvin and vice versa forgetting the input from the user. And display the values in a tabular form.
C/5 = (F-32)/9 = K-273/5
Question 33: Write a C language program to explain relational operator with the help of an example.
Question 34: Write a C language program to explain logical operator with the help of an example.
Question 35: Write a C language program to explain the switch statement with the help of an example.
Question 36: Write a C language program to explain the break statement with the help of an example using three loops (while, DO While and For Loop).
Question 37: Write a C language program to explain the continue statement with the help of an example using three loops (while, DO While and For Loop). Question 38: Write a C language program to determine the sum of the following harmonic series for a given value of n 1+1/2+1/3+…….+1/n
Question 39: Write a C language program to add the first seven terms of the following series using for loop 1/1!+2/2!+3/3!+ ………….
Question 40: Write a C language program to test whether a the number given is positive or not.
Question 41: Write a C language program to obtain the age of a person and tell whether the person is an eligible voter or not.
Question 42: Write a C language program to obtain principal amount, and time, and then calculator simple interest as per the following specifications:
Question 43: Write a C language program to print the first natural number and their sum.
Question 44: Write a C language program to print an even number between 50 and 100 using three loops (while, DO While, and For Loop).
Question 45: Write a C language program to find the number of and the sum of all integers greater than 100 and less than 200 that are divisible by 7.

Feel free to add more questions and solutions as you see fit.

Note -> For File Formate.

1.File Name Format: Name your solution files in the following format:-

1. sol001.c for the first problem's solution.
2. sol002.c for the second problem's solution.
3. sol003.c for the third problem's solution.
And so on...

2.Leading Zeros:- Ensure that the solution file names include three digits, with leading zeros if necessary. For example, the tenth problem's solution should be named sol010.c.

Code Style Guidelines

To maintain consistency, please follow these code style guidelines:

  • Use clear and meaningful variable and function names.
  • Include comments to explain complex sections of code.
  • Format your code according to C coding standards.

License

This repository is licensed under the GNU License. By contributing to this repository, you agree to license your contributions under the same license.

Happy coding, and let's work together to build a fantastic resource for C programmers! Your contributions are highly appreciated.

Hactoberfest2023
krishnapatidar458