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

Programming Sample Problems Guide

The document lists various sample programming problems categorized by topics such as Arithmetic Operations, Decision-Making, Iteration, Arrays, Strings, Functions, Recursion, Pointers, Storage Classes, Structures, and File Handling. Each problem is designed to test specific programming concepts and skills, ranging from basic arithmetic calculations to file operations and data structures. The problems include tasks like computing areas, implementing algorithms, and manipulating data structures.

Uploaded by

moorthyathi5
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)
17 views2 pages

Programming Sample Problems Guide

The document lists various sample programming problems categorized by topics such as Arithmetic Operations, Decision-Making, Iteration, Arrays, Strings, Functions, Recursion, Pointers, Storage Classes, Structures, and File Handling. Each problem is designed to test specific programming concepts and skills, ranging from basic arithmetic calculations to file operations and data structures. The problems include tasks like computing areas, implementing algorithms, and manipulating data structures.

Uploaded by

moorthyathi5
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

Sample problems

[Link] Topic Problem

1 Arithmetic Operations Compute area, perimeter, and diagonal of a rectangle.

2 Arithmetic Operations Compute quotient and remainder without using %.

3 Arithmetic Operations Evaluate (a + b)³ using only arithmetic ops.

4 Decision-Making Check if a number is positive, negative, or zero.

5 Decision-Making Menu-driven calculator using switch-case.

6 Iteration (Loops) Print first N prime numbers using for loop.

7 Iteration (Loops) Sum of digits using while loop.

8 Iteration (Loops) Multiplication table (1–10) using do-while.

9 Nested Loops Generate a pyramid star pattern.

10 Nested Loops Print Pascal’s Triangle for N rows.

11 Arrays Find largest & smallest with positions in an array.

12 Arrays Reverse an array without using another array.

13 Arrays (2D) Matrix addition and multiplication.

14 Strings Implement custom strlen() using loops.

15 Strings Check if a string is a palindrome.

16 Strings Count vowels, consonants, digits, specials.

17 Functions Implement power() without using pow().

18 Functions Function to compute average of array elements.

19 Recursion Find factorial using recursion.

20 Recursion Fibonacci series using recursion.

21 Recursion Find GCD of two numbers using recursion.

22 Pointers Increment array elements using pointer notation.

23 Pointers Count vowels in a string using pointer traversal.


Sample problems

[Link] Topic Problem

24 Pointer Arithmetic Print array elements in reverse using pointer arithmetic.

25 Storage Classes Demonstrate static vs automatic inside a loop.

26 Storage Classes Show effect of same-named global & local variables.

27 Structures Student structure: total and average.

28 Array of Structures Employee structure: display highest salary.

29 Structure + Functions Read & display book details using functions.

Pointer to Structure + Add two complex numbers using typedef + pointer to


30
Typedef structure.

Write a program to read a text file and count characters,


31 File Handling
words, and lines.

Write employee records to a file and read them back using


32 File Handling
structure + file operations.

You might also like