0% found this document useful (0 votes)
1 views2 pages

Tutorial sheet-Algorithms and programming

The document is a tutorial sheet for a course on Algorithm and Programming, outlining various C programming exercises. It includes tasks such as printing 'Hello, World!', calculating sums, checking for odd/even numbers, and working with arrays and matrices. Each task is designed to help students practice fundamental programming concepts and algorithms.

Uploaded by

dragonlinux42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Tutorial sheet-Algorithms and programming

The document is a tutorial sheet for a course on Algorithm and Programming, outlining various C programming exercises. It includes tasks such as printing 'Hello, World!', calculating sums, checking for odd/even numbers, and working with arrays and matrices. Each task is designed to help students practice fundamental programming concepts and algorithms.

Uploaded by

dragonlinux42
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Tutorial sheet

Course : Algorithm and Programming

1. Hello World Program

Write a C program to print "Hello, World!" to the screen.

2. Sum of Two Numbers

Write a C program that takes two numbers as input from the user and prints their sum.

3. Check Odd or Even

Write a C program that takes a number as input and checks if it's odd or even.

4. Find the Largest of Two Numbers

Write a C program that takes two numbers as input and prints the largest number.

5. Find the Largest of Three Numbers

Write a C program that takes three numbers as input and prints the largest number.

6. Factorial of a Number

Write a C program to calculate the factorial of a given number (use both iterative and recursive
methods).

7. Fibonacci Series

Write a C program that prints the Fibonacci series up to a given number.

8. Prime Number Check

Write a C program that checks if a number is prime or not.

9. Palindrome Check

Write a C program to check whether a given string or number is a palindrome.

10. Reverse a Number


Write a C program to reverse a given number.

11. Count Vowels and Consonants in a String

Write a C program that takes a string as input and counts the number of vowels and consonants.

12. Find the Sum of Digits of a Number

Write a C program that calculates the sum of digits of a given number.

13. Array Sum and Average

Write a C program that takes an array of integers and calculates their sum and average.

14. Find the Largest Element in an Array

Write a C program to find the largest element in an array of integers.

15. Sort an Array in Ascending Order

Write a C program to sort an array of integers in ascending order using the Bubble Sort algorithm.

16. Linear Search

Write a C program to search for a specific number in an array using Linear Search.

17. Count the Number of Words in a String

Write a C program that counts the number of words in a given string.

18. Matrix Addition

Write a C program that takes two 2D arrays (matrices) as input and adds them together.

19. Transpose of a Matrix

Write a C program that finds the transpose of a given 2D matrix.

20. Multiplication Table of a Number

Write a C program that takes a number as input and prints its multiplication table.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy