Thursday, May 2, 2013

programs in c language using basics


1.       Write a program to read a number into a variable and display its square.
2.       Write a program to read 2 numbers into 2 variables and display addition, substraction, multiplication and division.
3.       Write a program to read 3 subject marks into m,p,c variables and display total and average marks.
4.       Read a letter into a character variable and display its ASCII value.
5.       Read an alphabet into a character variable and display its previous and next letter
6.       Write a program to read 2 numbers into 2 variables and interchange.
7.       Write a program to read a number and check the given number is zero or positive or negative.
8.       Write a program to read a number and check the given number is zero or even or odd.
9.       Write a program to read 3 numbers and display the biggest one.
10.    Write a program to read 3 numbers and display the smallest one.
11.    Write a program to read 3 subject marks into m,p,c variables and display total and average, result and grade.
12.    Read a letter into a character variable and check the given letter is digit or not.
13.    Read an alphabet into a character variable and check the given letter is capital letter alphabet or not.
14.    Read an alphabet into a character variable and check the given letter is small letter alphabet or not.
15.    Read an alphabet into a character variable and check the given letter is vowel or not.
16.    Read an alphabet into a character variable and check the given letter is alphabet or not.
17.    Read a small letter alphabet into a variable and display its capital letter
18.    Read a capital letter alphabet into a variable and display its small letter
19.    Read a alphabet into a variable and display its opposite case letter
20.    Read a letter into a character variable and check the given letter is capital or small or digit or space or special letter
21.    Read a number and display its relevant month name (using switch case).
22.    Read a number and display its relevant weekday name (using switch case).

No comments:

Post a Comment