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

1. Write a program to print logic 1 if input character is capital otherwise 0.

2. Write a program to display logic 0 if one reads a character through keyboard otherwise 1.
3. Write a program to shift inputed data by two bits to the right.
4. Write a program to shift inputed data by four bits to the left.
5. Write a program to binary to decimal number (100,10000,100000).
6. Write a program to binary to octal number (100,10000,100000).
7. Wrtie a program to use bitwise AND operator between the two integers and display the
results.
8. Wrtie a program to use bitwise OR operator between the two integers and display the
results.
9. Write a program to display ASCII equivalents of
a) „A‟, „B‟, „C‟ and „a‟, „b‟, „c‟.
b) „a‟-„C‟, „b‟-„A‟ and „c‟-„B‟.
c) „a‟+„c‟, „b‟*„a‟ and „c‟+12.
10. Write a program to evaluate the following expressions and display their results
a) ( )
b) where x,y and z are integers.
11. Write a program to check equivalence of two numbers. Use if statement.
12. Write a program to check whether the canditate‟s age is greater than 17 or not. If yes
display message “Eligible for Voting”.
13. If enter only three numbers and calculate their sum and multiplication.
14. Read the values of a,b,c through the keyboard. Add them and after addition check if it is
in the range of 100 & 200 or not. Print separate message for each.
15. Write a program to calculate the square of those numbers only whose least significant
digit is 5.
16. Write a program to calculate the salary of medical representative based on the sales.
Bonus and incentive to be offered to him will be based on total sales. If the sale exceeds
ks-1000000/- follow the particulars of Table (1) otherwise (2).
Table(1) Table(2)
Basic = Ks- 50000 Basic = Ks- 50000
Hra = 20 % of basic. Hra = 20 % of basic.
Da = 110% of basic. Da = 110% of basic.
Conveyance = Ks-2500 Conveyance = Ks-2500
Incentive = 10% of sales. Incentive = 5% of sales.
Bonus = Ks - 10000 Bonus = Ks - 5000

17. Write a program to sort six numbers and find the largest one by using ladder of if else.
18. Draw a graph for the function ( ) ( ) ( ) for .
Use magenta solid line, six-pointed star(hexagram) shape marker and black marker face
color for and black dashed line, circle shape marker red marker face color for . Give
appropriate graph legend for lines, grid line, title, x label and y label.
19. Draw a bar graph for energyout = [350,450,550,280,600,750,510] and year = [1990,
1992, 1993, 1994, 1995, 1996]. Draw a polar graph for r = ( ) .
Draw a pie chart showing for percentage function of students = [26, 15, 36, 52, 32]. All
graphs should be in one figure window. Give title for each graph. To use subplot
function.
( ) ( )
20. Create a contour graph for the function , for and
. Describe values of contour lines and colobar. Try to use ezcontour
function to create a contour plot for that function again.
21. Create a program that counts the number of alphabets in a name. Use isspace method.
22. Write a program to solve a system of linear equations by using Gaussian iteration
method. Test the program for the following system of linear equations.
4x – y + z = 12
x + 4y -2z = -1
x – 2y +4z = 5


23. The solution to quadratic equation, is . Write a
general program to solve quadratic equations and the program should able to tell a user
whether the equation has two complex roots, two identical real roots, or two distinct real
roots.
24. Write a program that asks for input vector and it will arrange the elements in that vector
in ascending order and descending order, then it will save the results to an excel file. Give
appropriate name for excel file. Don‟t used sort method.
25. Write a program to print the entered number in reverse order. Use do – while loop. Also
perform Sum and Multiplication with their digits.
26. Write a program to add even and odd numbers from 1 to 20. Store them and display their
results in two separate arrays.
27. Read the elements of the matrix of the order up to 10*10 and transpose its elements.
Don‟t used method.
28. Write a program to perform addition, subtraction, multiplication and division of two
matrices whose orders are up to 10 * 10. Using while loop.
29. Write a program that shows the smallest number and the largest number of any digits?
30. Write a program to solve the equation by using function

31. Write a program to compute the interest rate as we were given by MEC (Myanmar
Economic Corporation) annually. The interest will be 0.3% for per year. How much
money will you deposit and how long will you put your money in the bank? Money, Year
and Interest rate will be given from the keyboard.
32. Write Matlab script to run the following, The GUI looks like this when it first displays. In
the pop-up menu, select Membrane, then click the Mesh button, In the pop-up menu,
select Sinc, then click the surf button, In the pop-up menu, select Peaks, then click the
Contour button Arrange the output to look something like this.

33. Given the square matrix of order 3 whose entries are the first nine natural numbers, find
its inverse, its transposeand its diagonal. Transform it into a lower triangular matrix and
an upper triangular matrix and rotate it by 90 degrees counterclockwise. Find the sum of
the elements in the first row and the sum of the diagonal elements. Extract the subarray
whose diagonal is formed by the elements at 11 and 22 and also remove the subarray
whose diagonal elements are at 11 and 33.
34.

You might also like