-
Notifications
You must be signed in to change notification settings - Fork 2
License
Imran4424/C-Problems-and-Solutions-step-by-step
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
1. Input Output 1.1. Write a program that prints your name 1.2. An integer variable n contains 5. Write a program that prints value of n. 1.3. Write a program that read and display an integer number 1.4. Write a program that read and display floating point number 1.5. Write a program that read and display a long number 1.6. Write a program that read and display a long integer number 1.7. Write a program that read and display double number 1.8. Write a program that read and display any character 1.9. Write a program that read ASCII value and display equivalent character 1.10. Wrtie a program that read any character and display equivalent ASCII value 1.11. Write a program that read any lower case character and display in upper case 1.12. Write a program that read any upper case character and display in lower case 1.13. Write a program that read any decimal number and display equivalent octal number 1.14. Write a program that read any decimal number and display equivalent hexadecimal number 1.15. Write a program that read any octal number and display equivalent decimal number 1.16. Write a program that read any hexadecimal number and display equivalent decimal number 1.17. Write a program that read as many characters as need to read your name and display the characters sequencially without spaces 1.18. Write a program that read and display your name 1.19. Write a program that read and display a line of text 1.20. Write a program that read any date in the format DD/MM/YYYY and displays day, month and year separately 1.21. Write a program that read any date in the format DD-MM-YYYY and displays day, month and year separately 1.22. Write a program that read any date in the format DD MM YYYY and displays day, month and year separately 1.23. Write a program that read any date in the format DD,MM,YYYY and displays day, month and year separately 2. Operator 2.1. Write a program that read two integer and display sum 2.2. Write a program that subtracts two integers 2.3. Write a program that read two integers and display product 2.4. Write a program that read two integers and divide them 2.5. Write a program that read two floating point numbers and divide them 2.6. Write a program that read two integer and display remainder 2.7. Write a program that read radius of a circle and display the area 2.8. Write a program that read temperature in Celsius and display in Farenheit 2.9. Write a program that read temperature in Farenheit and display in Celsius 2.10. Write a program that read two numbers and display bitwise AND 2.11. Write a program that read two numbers and display bitwise OR 2.12. Write a program that read two numbers and display bitwise Exclusive OR 2.13. Write a program that read a number and divide by two using shift operator 2.14. Write a program that read a number and multiply by two using shift operator 2.15. Write a program that read a number and multiply by five using shift operator 2.16. Write a program that read a number and mod by four using bitwise AND 2.17. Write a program that read a number and mod by eight using bitwise AND 2.18. Write a C program to swap the values of two variables using temporary variable 2.19. Write a C program to swap the values of two variables without using temporary variable 2.20. Write a program that read two numbers and display maximum using ternary operator 2.21. Write a program that read two numbers and display minimum using ternary operator 3. Math.h 3.1. Write a program that read any integer number and display absolute value 3.2. Write a program that read any angle t and display sin(t) 3.3. Write a program that read any angle t and display cos(t) 3.4. Write a program that read any angle t and display tan(t) 3.5. Write a program that read any angle t and display cot(t) 3.6. Write a program that read any angle t and display sec(t) 3.7. Write a program that read any angle t and display cosec(t) 3.8. Write a program that read a value n and display sin inverse(n) 3.9. Write a program that read a value n and display cos inverse(n) 3.10. Write a program that read a value n and display tan inverse(n) 3.11. Write a program that read a value n and display cot inverse(n) 3.12. Write a program that read a value n and display sec inverse(n) 3.13. Write a program that read a value n and display cosec inverse(n) 3.14. Write a program that read two numbers base, power and display the value of base^power 3.15. Write a program that read any number and display it's square root 3.16. Write a program that read any number x and display e^x 3.17. Write a program that read any number x and display log(x) 3.18. Write a program that read any number x and display log10(x) 4. Conditional Logic 4.1. Write a program that read an integer and prints odd or even 4.2. Write a program to determine whether a number is divisible by 5 or not 4.3. Write a program that read two numbers and display maximum 4.4. Write a program that read two numbers and display minimum 4.5. Write a program that read three numbers and display maximum 4.6. Write a program that read three numbers and display minimum 4.7. Write a program that read three numbers and display mediam 4.8. Write a program that read mark and display pass or fail 4.9. Write a program that read mark and display result in grade 4.10. Write a program that read any year and display its leap year or not 4.11. Write the code to check whether an input alphabet is a vowel or not. Both lower-case and upper-case should be checked 4.12. Write a C program to input any character and check whether it is alphabet, digit or special character 4.13. Write a C program to check whether a character is uppercase or lowercase alphabet 4.14. Write a C program to generate a simple arithmetic calculator hints: enter two numbers: 6 5 select the menu: 1. Add 2. Subtract 3. Multiply 4. Divide 4.15. Write a program that read three numbers a,b,c and determine the roots of the quadratic equation: ax^2 + bx + c = 0 4.16. Write a C program to input angles of a triangle and check whether triangle is valid or not 4.17. Write a C program to input all sides of a triangle and check whether triangle is valid or not 4.18. Write a C program to check whether the triangle is equilateral, isosceles or scalene triangle 5. Switch 5.1. Write a program that read a digit and diplay by spelling 5.2. Write a program that read any number and display equivalent roman number 5.3. Write a C program to print day of week name using switch case 5.4. Write a C program print total number of days in a month using switch case 5.5. Write a C program to create Simple Calculator using switch case 6. Series 6.1. Write a program to calculate the series: 1 + 2 + 3 + 4 + ... + n 6.2. Write a program to calculate the series: 2 + 4 + 6 + 8 + ... + n 6.3. Write a program to calculate the series: 1 + 3 + 5 + 7 + ... + n 6.4. Write a program to calculate the series: 4 + 12 + 20 + 28 + ... + n 6.5. Write a program to calculate the series: 2 + 5 + 8 + 11 + ... + n 6.6. Write a program to calculate the series: 1.2 + 2.3 + 3.4 + ... + n(n+1) 6.7. Write a program to calculate the series: 2.1 + 5.3 + 8.5 + ... + n(n - nth) 6.8. Write a program to calculate the series: 1.3 + 3.5 + 5.7 + ... + n(n+2) 6.9. Write a program to calculate the series: 1^2 + 2^2 + 3^2 + ... + n^2 6.10. Write a program to calculate the series: 1^2 + 3^2 + 5^2 + ... + n^2 6.11. Write a program to calculate the series: 1^3 + 2^3 + 3^3 + ... + n^3 6.12. Write a program to calculate the series: 1^1 + 2^2 + 3^3 + ... + n^n 6.13. Write a program to calculate the series: 1.1^2 + 2.3^2 + 3.5^2 + ... + n.(n + nth - 1)^2 6.14. Write a program to calculate the series: 1.2^2 + 2.3^2 + 3.4^2 + ... + n.(n+1)^2 6.15. Write a program to calculate the series: 1.2.3 + 2.3.4 + 3.4.5 + ... + n(n+1)(n+2) 6.16. Write a program to calculate the series: 2.5.8 + 5.8.11 + 8.11.14 + ... + n(n+3)(n+6) 6.17. Write a program to calculate the series: 5.6.7 + 6.7.8 + 7.8.9 + ... + n(n+1)(n+2) 6.18. Write a program to calculate the series: 1.3.5.7 + 3.5.7.9 + 5.7.9.11 + ... + n(n+2)(n+4)(n+6) Mini Section - Traversing loop in reverse order 6.51. Write a program to print all numbers from 100 to 1. 6.52. Write a program to print all even numbers from 100 to 1. 6.53. Write a program to print all odd numbers from 100 to 1. 6.54. Write a program to print all number from n to 1. 6.55. Write a program to print all number who is divible by 5 from n to 1. 6.56. Write a program to print all number who is divible by y from n to 1 (y < n). 7. Pyramid 7.1. 1 1 2 1 2 3 7.2. 1 2 2 3 3 3 7.3. 1 0 0 1 1 1 0 0 0 0 1 1 1 1 1 7.4. 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 7.5. 2 3 4 4 5 6 5 6 7 8 6 7 8 9 10 7.6. 1 2 3 3 4 5 4 5 6 7 5 6 7 8 9 7.7. 0 1 0 0 1 0 1 0 1 0 0 1 0 1 0 7.8. 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 7.9. A B B C C C D D D D E E E E E 7.10. A A B A B C A B C D A B C D E 7.11. 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 7.12. 5 5 5 5 5 4 4 4 4 3 3 3 2 2 1 7.13. 1 1 1 1 1 0 0 0 0 1 1 1 0 0 1 7.14. 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 7.15. 6 7 8 9 10 5 6 7 8 4 5 6 3 4 2 7.16. 5 6 7 8 9 4 5 6 7 3 4 5 2 3 1 7.17. 0 1 0 1 0 1 0 1 0 0 1 0 1 0 0 7.18. 1 0 1 0 1 0 1 0 1 1 0 1 0 1 1 7.19. E E E E E D D D D C C C B B A 7.20. A B C D E A B C D A B C A B A 7.21. 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 7.22. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 7.23. 1 0 0 1 1 1 0 0 0 0 1 1 1 1 1 7.24. 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 7.25. 1 22 333 4444 55555 0 space between digits 7.25.1 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 1 space between digits in both spacer and main loop 7.25.2 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 1 space between digits in just main loop 7.25.3. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 3 space between digits in just main loop 7.26. A B B C C C D D D D E E E E E 1 space between digits in just main loop 7.26.2. A B B C C C D D D D E E E E E 3 space between digits in just main loop 7.27. A B B C C C D D D D E E E E E D D D D C C C B B A 7.28. A B B C C C D D D D E E E E E D D D D C C C B B A 1 space between digits in just main loop 7.28.2. A B B C C C D D D D E E E E E D D D D C C C B B A 3 space between digits in just main loop 7.29. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 4 4 4 4 3 3 3 2 2 1 1 space between digits in just main loop 7.29.2. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 4 4 4 4 3 3 3 2 2 1 3 space between digits in both spacer and main loop 7.30. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 4 4 4 4 3 3 3 2 2 1 7.31. 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 4 4 4 4 3 3 3 2 2 1 7.32. 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 4 5 4 3 2 1 7.33. 1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1 1 2 3 4 5 4 3 2 1 1 2 3 4 3 2 1 1 2 3 2 1 1 2 1 1 7.34. 1 2 3 2 3 4 5 4 3 4 5 6 7 6 5 4 5 6 7 8 9 8 7 6 5 6 7 8 9 10 11 10 9 8 7 6 7 8 9 10 11 12 13 12 11 10 9 8 7 6 7 8 9 10 11 10 9 8 7 6 5 6 7 8 9 8 7 6 5 4 5 6 7 6 5 4 3 4 5 4 3 2 3 2 1 3 space between digits in both spacer and main loop 7.35. 1 2 3 2 3 4 5 4 3 4 5 6 7 6 5 4 5 6 7 8 9 8 7 6 5 6 7 8 9 10 11 10 9 8 7 6 7 8 9 10 11 12 13 12 11 10 9 8 7 6 7 8 9 10 11 10 9 8 7 6 5 6 7 8 9 8 7 6 5 4 5 6 7 6 5 4 3 4 5 4 3 2 3 2 1 3 space between digits in both spacer and main loop 7.36. 1 2 3 2 3 4 5 4 3 4 5 6 7 6 5 4 5 6 7 8 9 8 7 6 5 6 7 8 9 0 1 0 9 8 7 6 7 8 9 0 1 2 3 2 1 0 9 8 7 6 7 8 9 0 1 0 9 8 7 6 5 6 7 8 9 8 7 6 5 4 5 6 7 6 5 4 3 4 5 4 3 2 3 2 1 1 space between digits in both spacer and main loop 7.36.2 1 2 3 2 3 4 5 4 3 4 5 6 7 6 5 4 5 6 7 8 9 8 7 6 5 6 7 8 9 0 1 0 9 8 7 6 7 8 9 0 1 2 3 2 1 0 9 8 7 6 7 8 9 0 1 0 9 8 7 6 5 6 7 8 9 8 7 6 5 4 5 6 7 6 5 4 3 4 5 4 3 2 3 2 1 3 space between digits in both spacer and main loop 7.37. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 space between digits in both spacer and main loop 7.38. 1 2 1 3 3 1 4 6 4 1 5 10 10 5 1 6 15 20 15 6 1 3 space between digits in both spacer and main loop 7.39. 1 1 1 1 2 1 1 3 3 1 1 4 6 4 1 1 5 10 10 5 1 1 6 15 20 15 6 1 3 space between digits in both spacer and main loop 7.40. The following program asks the user to enter a number n. It then prints a picture showing a triangle that points to the right that has 2n - 1 rows and n columns. For example, if n = 4 the program would print * ** *** **** *** ** * 7.41. The following program asks the user to enter a number n. It then prints a picture showing a downward pointing triangle with n rows and 2n - 1 columns. For example, if n = 4 it would print ******* ***** *** * 7.42. Write a complete C program that asks the user for a number n of triangles to print. It then prints n triangles made of X symbols, one above another. Each triangle has n rows and every second triangle is upside down. The triangles should be separated by lines of - symbols. For example, here is the output from the program where the user specifies 4 for n. X XX XXX XXXX ---- XXXX XXX XX X ---- X XX XXX XXXX ---- XXXX XXX XX X ---- 7.43. Write a complete C program that asks the user for a number n and then prints a large grid of small squares. Each small square has size (n − 1) × (n − 1) and contains ∗ symbols. The large grid should have n rows each of which contains n small squares, with a blank column separating these squares. The rows of small squares in the large grid should be separated by blank rows. For example, if the user specified 3 for n, the program would print as follows: ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 7.44. Write a complete C++ program that asks the user for a number n and prints n squares made of ∗ symbols each with an upward diagonal stripe made of O symbols. Each square has height n and width n and the squares form a horizontal sequence. For example, if the user specified 4 for n, the program would print as follows: ***O ***O ***O ***O **O* **O* **O* **O* *O** *O** *O** *O** O*** O*** O*** O*** 7.45. Write a complete C program that asks the user to enter a positive integer n. If n is not positive the program should print a message Not positive. Enter another: and continue to do this until the user enters a positive integer. Then the program should print n squares of *s with decreasing size that begin with an n × n square and end with a 1 × 1 square. The right hand edges of the squares should line up. Enter a positive integer n: -3 Not positive. Enter another: 4 **** **** **** **** *** *** *** ** ** * 7.46. Write a complete C program that asks the user to enter an odd positive integer n. If n is illegal the program must terminate at once. Otherwise the program should print squares of *s. that begin with an n × n square and end with a 1 × 1 square and such that the sizes of squares decrease by 2 as they go down the page. The right hand edges of the squares should line up. Enter an odd positive integer n: 5 ***** ***** ***** ***** ***** *** *** *** * 8. Loop 8.1. Write down a program that can take a lower bound i and an upper bound n and then find out the summation of those numbers which are even from i to n. 8.2. Write down a program that can take a lower bound i and an upper bound n and then find out the summation of those numbers which are divisible by 3 from i to n. 8.3. Write a C program to print multiplication table of any number 8.4. Write a program that read a positive integer and display its factorial 8.5. Write a program that read a positive integer and display sum of its digit 8.6. Write a C program to find first and last digit of a number 8.7. Write a C program to find sum of first and last digit of a number 8.8. Write a C program to swap first and last digits of a number 8.9. Write a program that read any positive integer and display reverse 8.10. Write a program that read any positive integer and reverse the positive number 8.11. Write a C program to find one's complement of a binary number 8.12. Write a C program to find two's complement of a binary number 8.13. Write a program that read any decimal number and display equivalent binary number 8.14. Write a program that read any decimal number and display equivalent octal number 8.15. Write a program that read any decimal number and display equivalent hexadecimal number 8.16. Write a program that read two numbers and display GCD(greatest common divisor) 8.17. Write a program that read two numbers and display LCM(least common multiple) 8.18. Write a program that read two numbers(x,y) and display x^y (x power y) using loop 8.19. Write a program that read two numbers(n,r) and display nPr(Permutation) 8.20. Write a program that read two numbers(n,r) and display nCr(Combination) 8.21. Write a program that read any integer and display its digital root (using loop) Hint: If the number is 12345, then digital root will be 6 (Add all the digits of the number until summed value is in single digit) 8.22. Write a program that read any integer and test that is prime or not 8.23. Write a program that prints all prime numbers from 1 to n 8.24. Write a program that prints all prime numbers from m to n (m > n) 8.25. Write a program that count total prime numbers from 1 to n 8.26. Write a program that displays first n prime numbers. 8.27. Write a program that displays first n Fibonacci 8.28. Write a program that displays all fibonacci numbers from 1 to n 8.29. Write a program that determine a number fibonacci or not 8.30. Write a C program to find out all the palindrome numbers in the range 0 to 10000. Also print the palindrome numbers Hint: If a positive integer and its reverse are same then the number is called a palindrome. 242 is parildrome because 242 = 242 (reversed but still same) 8.31. Write a C program to find out the perfect numbers in the range 0 to 10000. Also print them Hint: a positive integer that is equal to the sum of its proper divisors. The smallest perfect number is 6, which is the sum of 1, 2 and 3 8.32. Write a C program to find out the strong numbers in the range 0 to 10000. Also print them Hint: 145 is strong number. Since, 1!+4!+5! = 145. 8.33. Write a C program to find out the armstrong numbers in the range 0 to 10000. Also print them Hint: 371 is armstrong number. Since, 371 three digits, so, 3^3 + 7^3 + 1^3 = 371. 1634 is armstrong number. Since, 1634 four digits, so, 1^4 + 6^4 + 3^4 + 4^4 = 1634. all single digit numbers are armstrong number. 8.34. Write a C program to check if an integer (entered by the user) can be expressed as the sum of two prime numbers. Also show all of the possible combinations Hint: Enter a positive integer: 34 34 = 3 + 31 34 = 5 + 29 34 = 11 + 23 34 = 17 + 17 8.35. Write a C program to print Pascal triangle upto n rows 9. goto, break, continue 9.1. Write a program that finds the first multiple of 7 between 50 and 100. 9.2. Write a program that prints all odd numbers between 1 and 20. 9.3. Write a program that sums integers entered by the user until the user enters a negative number. 9.4. Write a program that uses nested loops to find a pair of numbers (i, j) such that i ranges from 1 to 5 and j ranges from 1 to 5, and their product is 12. 9.5. Write a program that prints a multiplication table from 1 to 5, but skips the multiples of 3. 9.6. Write a program that finds the first prime number greater than 50. 9.7. Write a program that calculates the sum of all numbers between 1 and 100 that are not multiples of 5 9.8. Write a program that repeatedly asks the user to enter a positive integer. If the user enters a non-positive integer, prompt them again. The program should stop asking for input when the user has entered 5 positive integers and then print the sum of these integers. 9.9. Write a program that reads numbers from the user until the user enters a zero. The program should print the sum of all positive numbers entered and the count of negative numbers entered. 10. One Dimensional Array 10.1. Write a program that read and display an array 10.2. Write a program that read an array and display sum 10.3. Write a program that read an array and display average 10.4. Write a program that read an array and display maximum 10.5. Write a program that read an array and display minimum 10.6. Write a program that inserts any number in an array 10.7. Write a program that deletes any number from an array 10.8. Write a program that searches any number from an array 10.9. write a program that read and sort an array in ascending order 10.10. write a program that read and sort an array in decending order 10.11. Write a program that read and sort an array using bubble sort in ascending order 10.12. Write a program that read and sort an array using bubble sort in decending order 10.13. Write a program that read an array and display median 10.14. Write a program that display first n fibonacci numbers using array 10.15. Write a program that display first n prime numbers using array 10.16. Write a program that reads any decimal number and display equivalent binary number 11. Multi Dimentional Array 11.1. Write a program that read and display read and display a 2D array 11.2. Write a program that read and display read and display a matrix 11.3. Write a program that adds two matrices 11.4. Write a program that substract two matrices 11.5. Write a program that multiply two matrices 11.6. Write a program that add and multiply two matrices 11.7. Write a program that displays Pascal Pyramid 1 2 1 3 3 1 4 6 4 1 5 10 10 5 1 3 spaces between 1 digits number, 2 spaces between 2 digits number 12. String 12.1. Write a program that displays a string (single word) 12.2. Write a program that displays a string (a line) 12.3. Write a program that converts a line to uppercase. 12.4. Write a program that converts a line to lowercase. 12.5. Write a program that read a line of text and display it's length 12.6. Write a program that read a line of text and display it in reverse order 12.7. Write a program that read your name and display every character with one space 12.8. Write a program that read your name and display every character with one space in reverse order 12.9. Write a program that read any line of text and display every character in separate line 12.10. Write a program that read any line of text and display every character with ASCII value in separate line 12.11. Write a program that read any line of text and display number of uppercase, lowercase, digits, spaces and other characters 12.12. Write a program that read any line of text and display number of vowels, consonants, digits, spaces and other characters 12.13. Write a program that read a line of text and displays the frequency of every character 12.14. Write a program that read two lines of text and copy second line into first line 12.15. Write a program that read two lines of text and add second line with first line 12.16. Write a program that compares two strings 12.17. Write a program that compares two strings without case sensitivity 12.18. Write a program that read and display an array of string 12.19. Write a program that read and display an array of strings with alphabetic order (without case sensitive) 12.20. Write a program that read and display an array of strings with alphabetic order (with case sensitive) 13. String.h 13.1. Write a program that read a line of text and display it's length 13.2. Write a program that read a line of text and display it in reverse order 13.3. Write a program that read two lines of text and copy second line into first line 13.4. Write a program that read two lines of text and add second line with first line 13.5. Write a program that read a line of text and display in lowercase 13.6. Write a program that read a line of text and display in uppercase 13.7. Write a program that compares two strings 13.8. Write a program that compares two strings without case sensitivity 14. Function 14.1.1. Write a function that reads two integers and display Addition 14.1.2. Write a function that reads two integers and returns Addition 14.1.3. Write a function that gets two integers and display Addition 14.1.4. Write a function that gets two integers and returns Addition 14.2.1. Write a function that reads two integers and display Substraction 14.2.2. Write a function that reads two integers and returns Substraction 14.2.3. Write a function that gets two integers and display Substraction 14.2.4. Write a function that gets two integers and returns Substraction 14.3.1. Write a function that reads two integers and display Multiplication 14.3.2. Write a function that reads two integers and returns Multiplication 14.3.3. Write a function that gets two integers and display Multiplication 14.3.4. Write a function that gets two integers and returns Multiplication 14.4.1. Write a function that reads two integers and display Division 14.4.2. Write a function that reads two integers and returns Division 14.4.3. Write a function that gets two integers and display Division 14.4.4. Write a function that gets two integers and returns Division 14.5.1. Write a function that reads two integers and display maximum 14.5.2. Write a function that reads two integers and returns maximum 14.5.3. Write a function that gets two integers and display maximum 14.5.4. Write a function that gets two integers and returns maximum 14.6.1. Write a function that reads two integers and display minimum 14.6.2. Write a function that reads two integers and returns minimum 14.6.3. Write a function that gets two integers and display minimum 14.6.4. Write a function that gets two integers and returns minimum 14.7.1. Write a function that reads three integers and display maximum 14.7.2. Write a function that reads three integers and returns maximum 14.7.3. Write a function that gets three integers and display maximum 14.7.4. Write a function that gets three integers and returns maximum 14.8.1. Write a function that reads three integers and display minimum 14.8.2. Write a function that reads three integers and returns minimum 14.8.3. Write a function that gets three integers and display minimum 14.8.4. Write a function that gets three integers and returns minimum 14.9.1. Write a function that reads three integers and display median 14.9.2. Write a function that reads three integers and returns median 14.9.3. Write a function that gets three integers and display median 14.9.4. Write a function that gets three integers and returns median 14.10. Write a function that gets length and width of a rectangle and returns area 14.11. Write a function that gets radius of a circle and returns area 14.12. Write a function that gets any positive integer and returns it's factorial 14.13. Write a function that gets any positive integer and returns it's digital sum 14.14. Write a function that gets any positive integer and returns it's digital root 14.15. Write a function that gets any positive integer and returns it's reverse 14.16. Write a function that gets any positive integer and determine it's prime or not 14.17. Write a function that gets two positive integer(a,b) and returns a to the power b 14.18. Write a function that gets two positive integer and returns nPr (Permutation) 14.19. Write a function that gets two positive integer and returns nCr (Combination) 14.20. Write a function that gets two positive integer and returns GCD (greatest common divisor) 14.21. Write a function that gets two positive integer and returns LCM (least common multiple) 14.22. Write a function that gets an array and returns sum 14.23. Write a function that gets an array and returns average 14.24. Write a function that gets an array and returns maximum 14.25. Write a function that gets an array and returns minimum 14.26. Write a function that gets an array and adds 10 to each element 14.27. Write a function that gets an array and subtract 15 from each element 14.28. Write a function that gets an array and product each element by 5 14.29. Write a function that searches any number in an array 14.30. Write a function that sorts an array Ascending 14.31. Write a function that sorts an array Decending 14.32. Write a C program to check whether a number is even or odd using functions 14.33. Write a C program to check whether a number is prime or not using functions 14.34. Write a C program to check whether a number is palindrome or not using functions 14.35. Write a C program to check whether a number is perfect or not using functions 14.36. Write a C program to check whether a number is strong or not using functions 14.37. Write a C program to find all prime numbers between a given interval using functions. 14.38. Write a C program to find all palindrome numbers between a given interval using functions. 14.39. Write a C program to find all perfect numbers between given a interval using functions. 14.40. Write a C program to find all strong numbers between given a interval using functions. 14.41. Write a function that gets a string and returns it's length 14.42. Write a function that gets a string and reverse all characters 14.43. Write a function that gets a string and convert it to uppercase 14.44. Write a function that gets a string and convert it to lowercase 14.45. Write a function that gets a string and copy to another string 14.46. Write a function that gets two string and compares them 14.47. Write a function that gets two string and concatenates (adds) them 15. Recursion 15.1. Write a recursive function that gets any positive integer and returns it's factorial 15.2. Write a recursive function that returns nth Fibonacci number. 15.3. Write a recursive function that prints 50 to 100. 15.4. Write a recursive function that prints the Fibonacci series. 15.5. Write a recursive function that prints 4 12 20 28 series up to 10th. 15.6. Write a recursive function to calculate the series: 1 + 3 + 5 + 7 + ... + n 15.7. Write a recursive function to calculate the series: 1^2 + 2^2 + 3^2 + 4^2 + ... + n^2 15.8. Write a recursive function to calculate the series: 1^1 + 2^2 + 3^3 + 4^4 + ... + n^n 15.9. Write recursive functions to build the following pyramid 1 1 2 1 2 3 15.10. Write recursive functions to build the following pyramid 1 2 2 3 3 3 15.11. Write recursive functions to build the following pyramid 1 0 0 1 1 1 0 0 0 0 1 1 1 1 1 15.12. Write recursive functions to build the following pyramid 1 1 0 1 0 1 1 0 1 0 1 0 1 0 1 15.13. Write recursive functions to build the following pyramid 1 2 3 3 4 5 4 5 6 7 5 6 7 8 9 16. Pointer 16.1. Write a program that read any number and display it with pointer variables. 16.2. Write a program that read any number and change it with a pointer variable then display it. 16.3. Write a void function that gets two numbers and adds them, then display the result within main function. (x + y) 16.4. Write a void function that gets two numbers and substract them, then display the result within main function. (x - y) 16.5. Write a void function that gets two numbers and multiply them, then display the result within main function. (x * y) 16.6. Write a void function that gets two numbers and divide them, then display the result within main function. (x / y) 16.7. Write a void function that gets two numbers and determine maximum, then display the result within main function. 16.8. Write a void function that gets two numbers and determine minimum, then display the result within main function. 16.9. Write a void function that gets three numbers and determine maximum, then display the result within main function. 16.10. Write a void function that gets three numbers and determine minimum, then display the result within main function. 16.11. Write a void function that gets three numbers and determine median, then display the result within main function. 16.12. Write a void function that gets a number and calculate factorial, then display the result within main function. 16.13. Write a void function that gets a number and calculate sum of the digit, then display the result within main function. 16.14. Write a void function that gets a number and reverse it, then display the result within main function. 16.15. Write a void function that gets an array and find average, then display the result within main function. 16.16. Write a program that read an array and display it. access the array with pointers not with indexing operators[]. 17. Structure 17.1. Write a program that read and display any student's name, roll, and total mark using structure 17.2. Write a program that read and display some student's name, roll, and total mark using structure 17.3. Write a program that read and display basic information of a departments students using structure 17.4. Write a program that read and display some student's name, roll, subject wise mark, total mark and average using structure. 17.5. Write a program that read roll, three subjects mark and display the highest mark in each subjects and highest total with the students roll who obtained this using structure. 17.6. Write a program that read some players name, team name and batting average. Display this accroding to team name. 17.7. Write a program that read some students name, id, department and display them according to department. 18. File 19. Dynamic Memory Allocation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published