Professional Documents
Culture Documents
Computer Achiever2
Computer Achiever2
MM-30 Time-1hr
5. Evaluate the following expression if the value of x=2, y=3 and z=1.
v=x+ –z+ y++ +y
9. Name the type of error (syntax, runtime or logical error) in each case given below:
(i) Math.sqrt (36-45)
(ii) int a;b;c;
10. Write a function prototype of the following: A function PosChar which takes a string argument and a character
argument and returns an integer value.
2.Write a menu driven program to display the pattern as per user’s choice. For an incorrect option, an appropriate error
message should be displayed.
Pattern 1 Pattern 2
ABCDE B
ABCD LL
ABC UUU
AB EEEE
A