Skip to content

4141Goloo/C_Complete_YouTube

 
 

Repository files navigation

KG Coding_YT Thumbnail (6)
  1. Show the following patterns just using print statements:
  • image
  1. Show the following patterns using single print statement:
  • image
  1. Create a program to input name of the person and respond with ”Welcome NAME to KG Coding”
  2. Create a program to declare two integer variables, assign them values, and display their values.
  3. Create a program that declares one variable of each of the fundamental data types (int, float, double, char) and prints their size using sizeof() operator.
  4. Define variables for storing a user's first name, last name, and age using appropriate naming conventions and then display them.
  5. Create a program to print the area of a square by inputting its side length.
  6. Create a program to define a constant for the mathematical value pi (3.14159) and use it to calculate and print the circumference of a circle with a radius input from user.
  7. Create a program to print the area of a circle by inputting its radius.
  8. Create a program to swap two numbers.
  9. Create a program that takes two numbers and shows result of all arithmetic operators (+,-,*,/,%).
  10. Given an integer value, convert it to a floating-point value and print both.
  11. Create a program to calculate product of two floating points numbers.
  12. Create a program to calculate Perimeter of a rectangle.
  • Perimeter of rectangle ABCD = A+B+C+D
  1. Create a program to calculate the Area of a Triangle.
  • Area of triangle = ½BH
  1. Create a program to calculate simple interest.
  • Simple Interest = (P x T x R)/100
  1. Create a program to calculate Compound interest.
  • Compound Interest = P(1 + R/100)t
  1. Create a program to convert Fahrenheit to Celsius
  • °C = (°F - 32) × 5/9
  1. Create a program that determines if a number is positive, negative, or zero.
  2. Create a program that determines if a number is odd or even.
  3. Create a program that determines the greatest of the three numbers.
  4. Create a program that determines if a given year is a leap year (considering conditions like divisible by 4 but not 100, unless also divisible by 400).
  5. Create a program that calculates grades based on marks
  • A -> above 90%
  • B -> above 75%
  • C -> above 60%
  • D -> above 30%
  • F -> below 30%
  1. Create a program that categorize a person into different age groups:
  • Child -> below 13
  • Teen -> below 20
  • Adult -> below 60
  • Senior-> above 60
  1. Create a program to find the minimum of two numbers using ternary operator.
  2. Create a program to find if the given number is even or odd using ternary operator.
  3. Create a program to calculate the absolute value of a given integer using ternary operator.
  4. Create a program to Based on a student's score, categorize as "High", "Moderate", or "Low" using the ternary operator (e.g., High for scores > 80, Moderate for 50-80, Low for < 50).
  5. Create a program to print the month of the year based on a number (1-12) input by the user.
  6. Create a program to create a simple calculator that uses a switch statement to perform basic arithmetic operations like addition, subtraction, multiplication, and division.
  7. Develop a program that prints the multiplication table for a given number.
  8. Create a program to sum all odd numbers from 1 to a specified number N.
  9. Write a function that calculates the factorial of a given number.
  10. Create a program that computes the sum of the digits of an integer.
  11. Create a program to find the Least Common Multiple (LCM) of two numbers.
  12. Create a program to find the Greatest Common Divisor (GCD) of two integers.
  13. Create a program to check whether a given number is prime using while.
  14. Create a program to reverse the digits of a number.
  15. Create a program to print the Fibonacci series up to a certain number.
  16. Create a program to check if a number is an Armstrong number.
  17. Create a program to verify if a number is a palindrome.
  18. Create a program that print patterns:
  • image
  1. Create a program that prompts the user to enter a positive number. Use a do-while loop to keep asking for the number until the user enters a valid positive number.
  2. Develop a program that calculates the sum of all numbers entered by a user until the user enters 0. The total sum should then be displayed.
  3. Create a program using for loop multiplication table for a number.
  4. Create a program using for to display if a number is prime or not.
  5. Create a program using continue to sum all positive numbers entered by the user; skip any negative numbers.
  6. Create a program using continue to print only even numbers using continue for odd numbers.
  7. Write a program that continuously reads integers from the user and prints their squares. Use an infinite loop and a break statement to exit when a special number (e.g., -1) is entered.
  8. Write a function named greet that prints "Hello, World!" when called.
  9. Write a function that adds that takes 4 int parameters and returns the sum.
  10. Define a function square that takes an int and returns its square.
  11. Call a function print_date that prints the current date. Define the function without any parameters.
  12. Create a function max that takes two float arguments and returns the larger value.
  13. Demonstrate with a function increment that the original integer passed to it does not change after incrementing it inside the function.
  14. Call a function get_average that takes five int numbers and returns the average.
  15. Create a program using recursion to display the Fibonacci series upto a certain number.
  16. Create a program using recursion to check if a number is a palindrome using recursion.
  17. Write a program that declares an integer variable and a pointer to it. Assign a value and print it using the pointer.
  18. Write a program to change the value of an integer variable using a pointer and the * operator.
  19. Declare a pointer to a char and use it to read and print a character entered by the user.
  20. Implement a void minmax(int *a, int *b, int *min, int *max) function that takes two integer pointers a and b as input and assigns the smaller value to min and the larger value to max using call by reference. Write a main function to test it with different values.
  21. Create a program that converts a large number of kilometers to miles, using long or long long to store the distance.
  22. Write a program to demonstrate the difference in range between long and long long by calculating the factorial of 20.
  23. Write a C program that initializes an unsigned int to its maximum possible value and an int to a negative number. Add 1 to both, and print the results to show how the unsigned int wraps around to 0, whereas the int remains negative due to overflow
  24. Create a program to find the sum and average of all elements in an array.
  25. Create a program to find number of occurrences of an element in an array.
  26. Create a program to find the maximum and minimum element in an array.
  27. Create a program to check if the given array is sorted.
  28. Create a program to return a new array deleting a specific element.
  29. Create a program to reverse an array.
  30. Create a program to check is the array is palindrome or not.
  31. Write a function that uses pointer arithmetic to copy an array of char into another.
  32. Create a program to merge two sorted arrays.
  33. Create a program to search an element in a 2-D array.
  34. Create a program to do sum and average of all elements in a 2-array.
  35. Create a program to find the sum of two diagonal elements.
  36. Read a line of text from the user using fgets and then print it using puts.
  37. Use printf with format specifiers to format and print a date string (day, month, year).
  38. Write a program to convert a input string to uppercase.
  39. Create a simple text-based user login system that compares a stored password string using strcmp.
  40. Use a 2-D character array to store and display a tic-tac-toe board.
  41. Write a function that takes a string and reverses it in place.
  42. Implement a trim function that removes leading and trailing spaces from a string.
  43. Create a program that checks if a given string is a palindrome (the same forwards and backwards) and outputs the result.
  44. Create a program using do-while to find password checker until a valid password is entered.
  45. Create a program using break to read inputs from the user in a loop and break the loop if a specific keyword (like "exit") is entered.
  46. Create a program where you need to store and process data for a Book with attributes like title, author, and price, demonstrating why a structure is more suitable than separate variables.
  47. Initialize an array of Book structures with different data for each book using designated initializers.
  48. Define a Car structure with fields for make, model, year, and color.
  49. Pass a Car structure to a function that prints out a description of the car in one complete sentence.
  50. Write a function that accepts a pointer to a Student structure with fields for id, name, year, gpa and modifies its grades.
  51. Write a function where the Student structure also has books they have borrowed inside, showing nested structure usage.
  52. Create a program that dynamically allocates memory for a Car structure and then free it at the end of the program.
  53. Create a program that uses malloc to dynamically allocate an array for a specified number of float values entered by the user and then stores user-entered numbers into it.
  54. Use calloc to allocate an array for a set of char characters representing a sentence, ensuring all the memory is initialized to zero.
  55. Allocate memory for a struct representing a Point with x and y coordinates, set some values, and then properly deallocate the memory using free.
  56. Create an array using calloc and fill it with random numbers, then use realloc to shrink the array size by half and print the remaining numbers.
  57. Write a program that asks the user for a filename, attempts to open it, and reports whether the operation was successful or not.
  58. Create a program that reads integers from a file and calculates their sum.
  59. Write a program that copies one text file's contents to another, stopping when it reaches EOF of the source file.
  60. Write a program that takes user input and writes it to a file, ensuring each entry is on a new line.
  61. Develop a program that appends user input to the end of a log file each time it's run.
  62. Create a program that performs both reading and writing operations on a file called data.txt

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 100.0%