Skip to content

nurolab/C_Laboratory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C Laboratory

C programs to practice - optimization, discussions and collaborative development

Basic programs


  1. Write a C program to print Hello World message on screen.
  2. Write a C program to input an integer, float and character and print it on screen.
  3. Write a C program to input two integers and perform various arithmetic operations on two numbers.
  4. Write a program to print the sizes of different data types.
  5. Write a program to find the sum of two numbers.
  6. Write a program to find the ASCII value of a character.
  7. Write a program to find the quotient and remainder of a number.
  8. Write a C program to convert and print temperature given in Fahrenheit into centigrade. Using the formula = 5*(F-32)/9.
  9. Write a C program to convert and print temperature given in Celsius to Fahrenheit. Using the formula: F=9/5*C+32.
  10. Write a C program to input princ1ple amount, rate of interest and time period and calculate the simple interest
  11. Write a C program to input the radius of circle and calculate area and circumference of a circle.
  12. Write a C program to calculate area of a right angle triangle.
  13. Write a program to calculate area of a triangle given its three sides.
  14. Write a program to find the area of a rhombus given its diagonals.
  15. Write a program to find the area of a parallelogram given its base and height.
  16. Write a program to find the volume of a cylinder.
  17. Write a C program to swap the value of two variables using third variable.
  18. Write a C program to swap the value of two variables without using third variable.
  19. Write a program to find the volume of a cone given its base radius and height of the cone.
  20. Write a program to find the volume of sphere.
  21. Write program to find the volume of cuboid.
  22. Write a program to find the volume of a cube.

Conditional statements & Loops


  1. Write a program to check whether no is positive or not.
  2. Write a program to check whether a number is even or odd.
  3. Write a program to check whether a character is vowel or not.
  4. Write a C program to calculate all roots of the quadratic equation: ax + bx + c = 0
  5. Write a C program to find greater of two numbers.
  6. Write a C program to input three numbers and print smallest and largest.
  7. Write a C program to check whether a person is eligible to vote or not.
  8. Write a C program to find whether a given number is divisible by another number or not.
  9. Write a C program to generate table of input number.
  10. Write a C program to find factorial of a given number.
  11. Write a C program to reverse the digits of a given integer number.
  12. Write a C program to find the sum of digits of a positive integer.
  13. Write a C program to find Armstrong number.
  14. Write a C program to find whether a given number is prime or no.
  15. WAP to find whether a give year is leap or not.
  16. WAP to find the smallest divisor of an integer.
  17. WAP to Find the Greatest common divisor (gcd) of two integers.
  18. Write a program to find the LCM of two numbers.
  19. WAP to compute the prime factors of an integer.
  20. Write a program to check whether a number is palindrome or not.
  21. WAP to raise a number to a given power without using power function.
  22. Write a program to print the following pattern:
1
2 3
4 5 6
7 8 9 10
11 12 13 14 15
  1. Write a C program to print the following pattern:
*
* *
* * *
* * * *
* * * * *
  1. Write a C program to find sum of following series: 1 + 2 + 3 + 4 + ...n up to n terms
  2. Write a program to find the sum of the series: 1 + 3 + 5+ ... up to n terms
  3. Write a program to find the sum of he series: (1) + (1+2) + (1+2+3) +... up to n terms
  4. Write a program to find the sum of the sine(x) series.
  5. Write a program to find a program to check whether a given number is even or odd using switch case
  6. Write a C program to design an arithmetic calculator using switch case statement.

Function, Recursion, Array & Pointer:


  1. Write a C program using menu driven function to show matrix addition, subtraction & multiplication.
  2. Write a program to print the diagonal elements in a matrix.
  3. Write a program to print the upper triangular matrix.
  4. Write a program to print the transpose of a matrix.
  5. Write a program to print the sum of the elements of the matrix.
  6. Write a program to read and display a 3D matrix.
  7. Write a C program to print the Fibonacci series using recursion.
  8. Write a C program to calculate the factorial of a number using recursion.
  9. Write a program to swap to numbers using function to demonstrate pass by address.
  10. Write a C program to declare an integer variable, a pointer and a pointer-to-pointer. Print the value of variable using pointer and pointer-to-pointer.
  11. Write a C program to perform following operation on an array of S elements using pointer:
    • Sum
    • Average
    • Search a Specific element
    • Sort array elements
  12. Write a program to perform following operation on a string using pointer:
    • find length of a string
    • search specific character in the string
    • count vowels in the string
  13. Write a program to input elements in a wo dimensional array using pointer.

Structure


  1. Write a c program to declare a structure student with elements name, roll no., age and marks of five subjects. Input the values and display the average marks.
  2. Write a c program to declare a structure complex with elements real and imaginary and add two complex numbers.
  3. Write ac program to declare a structure student with elements name, roll no and age. Input the details of 10 students in an array of structure and find out how many students are above 18 years.
  4. Write a C program to declare a distance structure with elements feet and inches. Input two distances and find the sum of these two distances.
  5. Write a program to declare a self-referential structure and illustrate its use.

File handling


  1. Write a program to write content to a file and read from the file and display it on the screen.
  2. Write a program to append content to a existing file.
  3. Write a program to count numbers of characters and number of lines in a file.
  4. Write a program to illustrate the use of fseek(), ftell() and rewind() function.
  5. Write a program to copy content of one file into another file.

About

C programs to practice - optimization, discussions and collaborative development

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages