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

Labsheet

The document provides 20 programming exercises involving basic input/output functions, mathematical operations, arrays, strings, recursion, and functions in C. The exercises include writing programs to display text, convert temperatures, calculate circle properties, compare numbers, check divisibility, generate Fibonacci sequences, add matrices, find transposes, multiply matrices, check palindromes, sort arrays, convert character cases, and find averages.

Uploaded by

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

Labsheet

The document provides 20 programming exercises involving basic input/output functions, mathematical operations, arrays, strings, recursion, and functions in C. The exercises include writing programs to display text, convert temperatures, calculate circle properties, compare numbers, check divisibility, generate Fibonacci sequences, add matrices, find transposes, multiply matrices, check palindromes, sort arrays, convert character cases, and find averages.

Uploaded by

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

Labsheet: Basic I/O Function

1. Write a program to display "This is my first program in C."


2. Write a program to convert the temperature given in degree Fahrenheit into degree
Celsius. [Hints: F = 1.8C+32]
3. Write a program to calculate and display area and circumference of a circle.

4. Write a program which reads any two numbers and displays the largest one
using ternary operator.
5. Write a program to check whether the given number is odd or even.
6. Write a program which reads cost price & selling price and determine whether
there is profit or loss.
7. Write a program to check whether the given number is divisible by 5 but not by 7
or not.
8. Write a program to check whether the given number is Armstrong or not. [An ‘n’
digit number is said to be an Armstrong number if sum of nth power of each
digit is equal to the number itself. Eg 153 = (1 * 1 * 1) + (5 * 5 * 5) + (3 * 3 *3)]
9. Write a program to generate the following output
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
10. Write a c program to generate a Fibonacci series 1,1,2,3,5,8………….. upto 10 th
term.
11. Write a program to add any two matrixes.
12. Write a program to find the transpose of given matrix.
13. Write a program to multiply two 3 × 3 matrix.
14. Write a program to find whether the given string is palindrome or not.
15. Write a program to sort the name of students from the given array in
alphabetical order.
16. Write a program that converts the case of characters of the given string.
17. Write a program using user defined function to check whether the given number
is positive, negative or zero. (Function must return a value).
18. Write a function to find the factorial of any given number using recursion.
19. Write a program using user defined function to find the average of five numbers
given by the user without passing parameters.
20.

You might also like