Section A

  1. What is data type? Give examples. [2]
  2. What is literal? Give an example. [2]
  3. What will be the value of c. [2]
    int a=9, b=5,c;
    c=a + b++ + –a;
    If a=19; [1]
  4. What will be the value of ~a.
    int a=25,b=23; [1]
    Value of c=__________________.
  5. Write the output generated by the following [1]
    100+5<200 || 950>300+2;
  6. Write difference between Implicit & Explicit type casting. [2]
  7. What is an object. [2]

8. Write the expression in Java for [2]
Sin x+ √(〖ax〗^2-bx+c)/2a

Section B

Write any one program from the following. [10]

Write a program to To find and display the factorial of a number input by the user ( the factorial of a non negative integer n , denoted by n!, is the product of all integers less than or equal to n.
Sample input : n =5
Sample output : 5!=1x2x3x4x5=120

write a class to input a number and print its odd factors [6 has odd factors 1,3]


Please enter your comment!
Please enter your name here