Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

SDJ International College C Programming FYBCA SEM-1

C PROGRAMMING PRACTICE SHEET


1 WAP to take input through the keyboard, and find out whether it is
an odd or even number.

2 WAP to take year as input from user and determine whether the
year is leap year or not.
3 WAP to take 5-digit number input from user and calculate the sum
of its digits. (Hint: Use modulus operator%)
4 WAP to take 5-digit number input from user and reverse the
number.
5 WAP to take 5-digit number input from user and calculate the sum
of its digits. (Hint: Use modulus operator%)
6 WAP to take 5-digit number input from user and reverse the
number.
7 WAP to take 5-digit number input from user and reverse the
number and determine whether the original & reversed numbers
are equal or not.
8 WAP to find the factorial value of any number entered through the
keyboard.
9 WAP to find maximum between three user entered numbers.
10 WAP to check whether a user given number is negative or positive.
11 WAP to check whether a given number is even or odd.
12 WAP to check whether a year is leap year or not.
13 WAP to check whether a given alphabet is vowel or consonant.
14 WAP to check whether a given character is upper case or lower
case.
15 Write a C program to input day number and print week day.
16 Write a C program to input month number and print number of
days in that month.
17 Write a C program to calculate profit or loss.
Write a C program to print all natural numbers from 1 to n. (Using
while loop)

DR. POONAM PATEL 1


SDJ International College C Programming FYBCA SEM-1
18 Write a C program to print all natural numbers in reverse (from n
to 1) Using while loop
19 Write a C program to print all even numbers between 1 to 100.
20 Write a C program to print all Odd numbers between 1 to 100.
21 Write a C program to find sum of all natural numbers between 1 to
n.
22 Write a C program to find sum of all even natural numbers
between 1 to n.
24 Write a C program to find sum of all odd natural numbers between
1 to n.
25 Write a C program to print multiplication table of any number.
26 Write a C program to count number of digits in a number.
27 Write a C program to find out first and last digit of a number.
28 Write a C program to find out sum of first and last digit of a
number.
29 Write a C program to swap out first and last digit of a number.
30 Write a C program to enter a number and print its reverse.
31 Write a C program to check whether a number is palindrome or
not.
32 Write a C program to find power of a number using for loop.
33 Write a C program to find all factors of a number.
34 Write a C program to calculate factorial of a number.
35 Write a C program to check whether a given number is prime or
not.
36 Write a C program to check whether a number is Armstrong or
not.
37 Write a C program to print all Armstrong numbers between 1 to n.
38 Write a C program to print day of week name using switch case.
39 Write a C program to print total number of days in a month using
switch case.
40 Write a C program to create Simple calculator using switch case.
41 Write a C program to use strlen, strcpy, strcat, strcmp functions
with pointer.

DR. POONAM PATEL 2


SDJ International College C Programming FYBCA SEM-1
42 Write a C program to generate the triangle. (With special character
*)
*
**
***
****
*****
43 Write a C program to generate the triangle (With special character
*)
*
**
***
****
*****

44 Write a C program to generate the triangle (With special character


*)
*
**
***
****
*****

45 Write a C program to generate the triangle (With special character


$)
$$$$$
$$$$
$$$
$$
$

46 Write a C program to generate the triangle. (With number)


55555
4444
DR. POONAM PATEL 3
SDJ International College C Programming FYBCA SEM-1
333
22
1

47 Write a C program to print Floyd’s triangle.


1
2 3
4 5 6
7 8 9 10
11 12 13 14
48 Write a C program to print Floyd’s triangle.
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
49 Write a C program to print Triangle.
0
10
101
0101
01010
50 Write a C program to print Triangle.
1
01
010
1010
10101
51 Write a C program to generate Multiplication table of the given
number.
52 Write a C program to find the value of one Number raised to
another. For eg. The 2 Numbers are 3 and 2, the answer should be
9, since 3 is raised to 2.

DR. POONAM PATEL 4


SDJ International College C Programming FYBCA SEM-1
53 Write a C program to print the following series:
a. 0 2 5 7 10 12 15…
b. 0 1 3 6 10 15 21…
c. 1 2 4 8 16 32 …..
54 Write a menu driven program that performs the functions of a
calculator. The input from the user should be validated and error
message in case of wrong input should be prompted on screen.
The minimum operations expected are addition, subtraction,
Multiplication, Division, Square and Factorial.

DR. POONAM PATEL 5

You might also like