0% found this document useful (0 votes)
3 views

C LAB QUESTIONS

The document outlines a series of C programming lab assignment questions that cover fundamental programming concepts. Tasks include calculating areas, checking for prime numbers, manipulating arrays and strings, and using structures for student and book details. The assignments are designed to enhance practical programming skills through various exercises.

Uploaded by

hrijubanerjee
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

C LAB QUESTIONS

The document outlines a series of C programming lab assignment questions that cover fundamental programming concepts. Tasks include calculating areas, checking for prime numbers, manipulating arrays and strings, and using structures for student and book details. The assignments are designed to enhance practical programming skills through various exercises.

Uploaded by

hrijubanerjee
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

C-Programming LAB Assignment Questions

1. Write a program to find the area of a rectangle.

2. Write a program to calculate simple interest.

3. Write a program to find the greatest among two numbers.

4. Write a program to check whether a number is even or odd.

5. Write a program to check whether a year is a leap year or not.

6. Write a program to classify grades of a student based on marks.

7. Write a program to input a number (1 to 7) and print the corresponding day of the week
using a switch-case statement.

9. Write a program to find the sum of N natural numbers.

10. Write a program to calculate the factorial of a number.

11. Write a program to check whether a number is prime or not.

12. Write a program to find the sum of digits of a given number using a while loop.

13. Write a program to print the reverse of a number.

14. Write a program to print the following pattern:

**

***

****

15. Write a program to print the following pattern:

***

**

16. Write a program to print the following pattern:

12

123

16. Write a function to calculate the area of a circle given its radius.

17. Write a function to find the greatest among three numbers.

18. Write a function to check whether a number is PRIME OR NOT.


19. Write a function to calculate the factorial of a number using recursion.

22. Write a program to find the largest and smallest elements in an array.

23. Write a program to calculate the sum of elements in an array.

24. Write a program to reverse an array.

25. Write a program to search for a given element in an array using linear search.

26. Write a program to swap two numbers using pointers.

27. Write a program to reverse a string using pointers.

28. Write a program to find the length of a string using pointers.

29. Write a program to define a structure for a student containing fields like name, roll number,
and marks. Input and display the details of 5 students.

30. Write a program to define a structure for a book containing fields like title, author, and price.
Input and display the details of 3 books.

You might also like