Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 16

PRACTISE SHEET 1

REGISTER NO : 2313721033030

NAME : POOJA.S

1.write a program to find the ascii values of a character

Output:
2.write a c program to find size of int,float,double and char.

Output:
3. Write a C Program to swap two numbers.

Output:
4. Write a program in C to print “Eligible to vote” if the age of the person is greater than 18

Output:
5. Write a program in C to find the biggest of three numbers (Use Nested if)

Output:
6. Write a C program to calculate the net salary of an employee. Calculate DA=10% of Basic Pay,
HRA=15% of Basic pay, IT deduction=5% of basic pay. Display Employee Name, age, Net Salary.

Output:
7. Write a prog in C to perform the following (a=10, b = 5, c=4, d=3)

i. a+b*c/d

ii. a–b%c+d

iii. a–b/c*c+d

Output:
8. Write a program in C to find whether a student is eligible to sit for placement in MOP (Criteria to
appear for placement: cgpa > 7 and backlog=No)

Output:
9. Write a program in C to print the grade of the student using if..elseif ladder

Output:
10. Write a program in C to print thought for the day using switch..case
statement
Output:
11.Write a C program to demonstrate the usage of shift operators.

Output:
12. Write a C program to accept and display a character.

Output:
13. Write a C program to accept and display a string.

Output:
14.Write a C program to accept input using scanf(), but limit the number of
digits in the input to 4 digits.

Output:
15. Write a C program to demonstrate the usage of accepting string using
scanf() and gets () function.

Output:

You might also like