Tuesday, August 24, 2021

Class-07 | Chapter-05 | Introducing Photoshop

Image File Format

àImage File format is extension of the image file.

1) .GIF                   –             Graphics Interchange Format

2)  .JPEG               -             Joint Photographic Experts Group

3) .TIFF                 -              Tagged image File Format

4) .PNG                  -              Portable Network Graphics

4) .PDF                  -              Portable Document Format

5) .PSD                  -              Photoshop Studio

 

1) Tick the correct answer  

a) Photoshop is a product of which company?

Answer | Adobe Corp

b) Which of these is not a type of marquee tool?

Answer | Magnetic

c) Which tool is used to to paint smooth edges?

Answer | Brush Tool

d) Which tool is used to darken the area of an image?

Answer | Burn tool

e) Which is the default file format of Photoshop?

Answer | .psd

f) Which tool helps to remove unwanted portion of an image?

Answer | Crop

 

 

4) Answer these questions:  

a) What is the use of Photoshop?

Answer | The use of Photoshop to create and modify pictures and photographs.

 

b) What is the use of Marquee tools? Name the different marquee tools available in Photoshop?

Answer | The use of Marquee tools to make selections on image. The different marquee tool available in Photoshop are :-  Rectangular Marquee tool, Elliptical Marquee Tool, Single rows Marquee Tool and Single Columns Marquee tool.

Wednesday, August 18, 2021

Class-06 | Chapter-05 | MS PowerPoint 2010 | Questions Answer Solutions

 

Class-06 | Chapter-05 | MS PowerPoint 2010 | Questions Answer Solutions

1) What is MS PowerPoint? Name any four components of PowerPoint 2010 Window.

Answer: MS PowerPoint 2010 is a Powerful presentation making Software.

The four components of PowerPoint 2010 Windows are:-

i) Title Bar

ii) Quick access tool bars

iii) Slide area

iv) Status bar

 

2) How do you save a presentation file in PowerPoint 2010?

Answer: The following steps used to save a presentation file in MS Power Point 2010.

Step 1 : click on the file tab

Step 2 : Select save option

Step 3 : Choose a drive to save your file.

Step 4 : Type file name.

Step 5 : Click on save button. The presentation file will get saved.

 

 

 

 

Wednesday, July 28, 2021

Class – 12 || Chapter-4 || The Rat Trap || Questions and Answer Solutions!


Chapter - 4 || The Rat Trap ||

Q1. From where did the peddler get the ideas of the world being a rattrap?

Ans : The peddler was rattrap seller. He was naturally thinking of his rattrap and get the idea that whole world being a big rattrap.

 

Q2. Why he was amused by this idea?

Ans : The world had never been kind to him. He always thought ill of it. So he was amused by the idea of the world being a rattrap. It gave him an unwanted joy.

 

Q3. Did the peddler expect the kind of hospitality that he received from the crofter?

Ans : No the peddler did not expect such kind of hospitality that he received from the crofter.

 

Q4. Why was crofter so talkative and friendly with the peddler?

Ans : The crofter was living alone in his cottage. He was happy to find someone to talk in his loneliness. So he was so talkative and friendly with the peddler.

 

Q5. Why did he show thirty kroner to the peddler?

Ans : The crofter was credulous man.  He was generous with his confidence. So he showed thirty kronor to the peddler. He did not have double that he was a thief.

 

Q6. Did the peddler respect the confidence reposed in him by the crofter?

Ans : No, the peddler did not respect the confidence which the crofter had shown him. He showed him 30 kroner and the peddler stole them.

 

Q7. What made the peddler think that he had indeed fallen into a rattrap?

Ans : The peddler stole 30 kronor from the crofter’s cottage and walked along. He thought himself smart. He avoided public highway and turn into the wood. It was big and confusing forest which he had got into. He tried to walk in a definite direction but he was failed.

He realized that he was walking around in the some parts of the forest. The whole forest seemed to him a big prison.

 

Q8. Why did iron master speak kindly to the peddler and invite him home?

Ans : Iron master mistook the peddler for his old acquaintance with whom he had been in the regiment. So he spoke to him in kindly manner and invited him to his house to celebrate christmas eve.

 

Q9. Why did the peddler decline the invitation?

Ans : The peddler had stolen thirty kronor. If he accepted the invitation to manor house it would be like throwing himself into the lion’s den. So he declined the invitation.

 

Q10. What made the peddler accept Edla Willmansson's invitation?

Ans : Edla Willmansson’s introduced herself to the peddler. She said that she came to know that he wanted to sleep here in the forge to night. Then she asked permission to come and bring him home to them.

She also said that he would be allowed to leave freely . She requested him to stay with them over christmas Eve.

 

Q11. What doubts did Edla have about the peddler?

Ans : Edla had some doubts about peddler. She thought Either he has stolen something or else he has escaped from jail.

 

Q12. When did iron master realise his mistake?

Ans : The iron master realised his mistake when he saw the peddler standing in broad daylight washed and shaved. At that time it was impossible to mistake him for  an old acquaintance.

 

Q13. What did the peddler say in his defence when it was clear that he was not the person the ironmaster had thought he was?

Ans : The peddler said that it was not his fault. He also said that he never pretended to be anything but a poor trader. He pleaded and begged to be allowed to stay in the forge.

He then said that he had not done any harm and at worst he would put  on his rags again and go away. All this the peddler said in his defence when it was clear that he was not the person the iron master had though  he was.

 

Q14. Why did Edla still entertain the peddler even after she knew the truth about him?

Ans : Edla still entertain the peddler even after she knew the truth about him because she thought  it was not appropriate to chase away a human being when they have asked to come there, and to whom they have promised christmas cheer.

 

15. Why was Edla happy to see the gift left by the peddler?

Ans : Edla was happy to see that gift left by the peddler because she found a small rattrap, and in it lay three wrinkled ten kronor notes. The peddler has praised her for reforming him.

 

Q16. Why did the peddler sign himself as captain von stahle?

Ans : The peddler signed himself as captain von stahle because of the ironmaster’s daughter could reform himself. She addressed him as a captain. He would have been caught in this world’s rattrap if he had not been raised to captain.

In that way he got the power to cheer himself and that’s why he signed as “Captain Van Stahle”. In fact he was  captain von stahle.

 


Thank U to All of U

 

Tuesday, June 22, 2021

JAVA Programming || Objective Questions Practice Set!

 




JAVA Programming || Objective Questions Brainware Set!

 

1. What is the range of data type short in Java?

a) -128 to 127

b) -32768 to 32767

c) -2147483648 to 2147483647

d) None of the mentioned

 

2. What is the range of data type byte in Java?

a) -128 to 127

b) -32768 to 32767

c) -2147483648 to 2147483647

d) None of the mentioned

 

3. Which of the following are legal lines of Java code?

1. int w = (int)888.8;

2. byte x = (byte)100L;

3. long y = (byte)100;

4. byte z = (byte)100L;

a) 1 and 2

b) 2 and 3

c) 3 and 4

d) All statements are correct.

 

 

 

 

 

 

4. An expression involving byte, int, and literal numbers is promoted to which of these?

a) int

b) long

c) byte

d) float

 

 

5. Which of these literals can be contained in a data type float variable?

a) 1.7e-308

b) 3.4e-038

c) 1.7e+308

d) 3.4e-050

 

6. Which data type value is returned by all transcendental math functions?

a) int

b) float

c) double

d) long

 

7. What is the output of this program?

1.             class average {

2.                 public static void main(String args[])

3.                 {

4.                     double num[] = {5.5, 10.1, 11, 12.8, 56.9, 2.5};

5.                     double result;

6.                     result = 0;

7.                     for (int i = 0; i < 6; ++i)

8.                         result = result + num[i];

9.                         System.out.print(result/6);

10.      

11.               }

12.           }

a) 16.34

b) 16.566666644

c) 16.46666666666667

d) 16.46666666666666

 

8. What is the output of this program?

1.             class conversion {

2.                 public static void main(String args[])

3.                 {   

4.                      double a = 295.04;

5.                      int  b = 300;

6.                      byte c = (byte) a;

7.                      byte d = (byte) b;

8.                      System.out.println(c + " "  + d);

9.                 }

10.           }

a) 38 43

b) 39 44

c) 295 300

d) 295.04 300

 

9. What is the output of this program?

1.             class increment {

2.                 public static void main(String args[])

3.                 {       

4.                      int g = 3;

5.                      System.out.print(++g * 8);

6.                 }

7.             }

a) 25

b) 24

c) 32

d) 33

 

10. What is the output of this program?

1.             class area {

2.                 public static void main(String args[])

3.                 {   

4.                      double r, pi, a;

5.                      r = 9.8;

6.                      p1 = 3.14;

7.                      a = pi * r * r;

8.                      System.out.println(a);

9.                 }

10.           }

a) 301.5656

b) 301

c) 301.56

d) 301.56560000

 

11. What is the output of relational operators?

a) Integer

b) Boolean

c) Characters

d) Double

 

12. Which of these is returned by greater than, <, and equal to, ==, operator?

a) Integers

b) Floating - point numbers

c) Boolean

d) None of the mentioned

 

13. Which of the following operators can operate on a boolean variable?

1. &&

2. ==

3. ?:

4. +=

a) 3 & 2

b) 1 & 4

c) 1, 2 & 4

d) 1, 2 & 3

 

14. Which of these operators can skip evaluating right hand operand?

a) !

b) |

c) &

d) &&

 

15. Which of these statement is correct?

a) true and false are numeric values 1 and 0.

b) true and false are numeric values 0 and 1.

c) true is any non zero value and false is 0.

d) true and false are non numeric values.

 

16. What is the output of this program?

1.             class Relational_operator {

2.                 public static void main(String args[])

3.                 {

4.                     int var1 = 5;

5.                     int var2 = 6;

6.                     System.out.print(var1 > var2);

7.                 }

8.             }

a) 1

b) 0

c) true

d) false

 

17. What is the output of this program?

1.             class bool_operator {

2.                 public static void main(String args[])

3.                 {   

4.                      boolean a = true;

5.                      boolean b = !true;

6.                      boolean c = a | b;

7.                         boolean d = a & b;

8.                      boolean e = d ? b : c;

9.                      System.out.println(d + " " + e);

10.               }

11.           }

a) false false

b) true ture

c) true false

d) false true

 

18. What is the output of this program?

1.             class ternary_operator {

2.                 public static void main(String args[])

3.                 {       

4.                      int x = 3;

5.                      int y = ~ x;

6.                      int z;

7.                      z = x > y ? x : y;

8.                      System.out.print(z);

9.                 }

10.           }

a) 0

b) 1

c) 3

d) -4

 

19. What is the output of this program?

1.             class Output {

2.                 public static void main(String args[])

3.                 {   

4.                      int x , y = 1;

5.                      x = 10;

6.                      if (x != 10 && x / 0 == 0)

7.                          System.out.println(y);

8.                      else

9.                          System.out.println(++y);

10.               }

11.           }

a) 1

b) 2

c) Runtime error owing to division by zero in if condition.

d) Unpredictable behavior of program.

 

20. What is the output of this program?

1.             class Output {

2.                 public static void main(String args[])

3.                 {   

4.                      boolean a = true;

5.                      boolean b = false;

6.                      boolean c = a ^ b;

7.                      System.out.println(!b);

8.                 }

9.             }

a) 0

b) 1

c) false

d) true

21. Which of these selection statements test only for equality?

a) if

b) switch

c) Both a & b

d) None of the mentioned

 

22. Which of these are selection statements in Java?

a) if()

b) for()

c) continue

d) break

 

 

23. Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?

a) do-while

b) while

c) for

d) None of the mentioned

 

24. Which of these jump statements can skip processing remainder of code in its body for a particular iteration?

a) break

b) return

c) exit

d) continue

 

25. Which of these statements is correct?

a) switch statement is more efficient than a set of nested ifs.

b) two case constants in the same switch can have identical values.

c) switch statement can only test for equality, whereas if statement can evaluate any type of boolean expression.

d) it is possible to create a nested switch statements.

 

26. What is the default data type of a decimal number in Java?

a. int

b. float

c. double

d. long

 

27 JAVA variable cannot begin with.             

a.         An alphabet

b.         A number

c.         A special symbol other that underscore

d.         Both B and C

28. In JAVA, Which Class __________ cannot inherits?

a.         super class

b.         abstract class

c.         sub class

d.         final class

29. Which of the following statements about the Java language is true?

a.         Java supports only Procedural approach towards programming

b.         Both Procedural and Object Oriented Programming are supported in Java

c.         Java supports only Object Oriented Programming approach

d.         None of the Above

30. Which of the following is logical operator?

a.         &&

b.         ++

c.         !

d.         ~

31.How many times the loop will execute for the given program.

int k=5;

do

{

 System.out.println(“JAVA IS PURE OOPs”);

}

while(k>=1);

 

a.         1 times                                    c. infinite times                       

b.         5 times                                    d. None of these.

 

32. JVM stands for

a. Java Verified Machine

b. Java Virtual Machine

c. Java Very large Machine

d. Java Very small Machine

 

33. Which of these jump statements can skip processing remainder of code in its body for a particular iteration?

a) break

b) return

c) exit

d) continue

34. Which of this statement is correct?

a) true and false are numeric values 1 and 0.

b) true and false are numeric values 0 and 1.

c) true is any non zero value and false is 0.

d) true and false are non numeric values.

35) What are the major components of the JDBC?

a.         DriverManager, Driver, Connection, Statement, and ResultSet

b.         DriverManager, Driver, Connection, and Statement

c.         DriverManager, Statement, and ResultSet

d.         DriverManager, Connection, Statement, and ResultSet

36) Select the packages in which JDBC classes are defined?

a.         jdbc and javax.jdbc

b.         rdb and javax.rdb

c.         jdbc and java.jdbc.sql

d.         sql and javax.sql

37) Which of the following method is used to perform DML statements in JDBC?

a.         executeResult()

b.         executeQuery()

c.         executeUpdate()

d.         execute()

38) Which methods are required to load a database driver in JDBC?

a.         getConnection()

b.         registerDriver()

c.         forName()

d.         Both b and c

39) Parameterized queries can be executed by?

a.         ParameterizedStatement

b.         PreparedStatement

c.         CallableStatement and Parameterized Statement

d.         All kinds of Statements

40) Which of the following is not a valid statement in JDBC?

a.         Statement

b.         PreparedStatement

c.         QueryStatement

d.         CallableStatement

41) What should be the correct order to close the database resource?What should be the correct order to close the database resource?

a.         Connection, Statements, and then ResultSet

b.         ResultSet, Connection, and then Statements

c.         Statements, ResultSet, and then Connection

d.         ResultSet, Statements, and then Connection

 

42) JDBC-ODBC driver is also known as?

a.         Type 4

b.         Type 3

c.         Type 1

d.         Type 2

 

43) Identify the DSN in the following statement:

DriverManager.getConnection("jdbc:odbc:oradsn", "scott", "tiger") 

a.         jdbc

b.         odbc

c.         scott

d.         oradsn

 

44) JDBC Stands for ____________.:

a.         Java Data Base Connectivity

b.         Java Data Base Connection

c.         Java Data Based Connection

d.         Java DBMS Connectivity

 

45. Which of the following contains both date and time?

a) java.io.date

b) java.sql.date

c) java.util.date

d) java.util.dateTime

 

46. Which of the following is advantage of using JDBC connection pool?

a) Slow performance

b) Using more memory

c) Using less memory

d) Better performance

 

47. Which of the following is used to call stored procedure?

a) Statement

b) PreparedStatement

c) CallableStatment

d) CalledStatement

 

48. Which of the following is advantage of using PreparedStatement in Java?

a) Slow performance

b) Encourages SQL injection

c) Prevents SQL injection

d) More memory usage

 

49. Which method is used to establish connection?

a) getConnection()

b) Class.forName()

c) createStatement()

d) PreparedStatement()

 

50. Which Package used in JDBC Concept?

a. java.utill package

b. java.lang package

c. java.sql package

d. java.io package

 

51.Default Layout Manager of Panel is ______________.                                                               

a.         FlowLayout

b.         BorderLayout

c.         GridLayout

d.         AbsCoordinate

53. Which Tags Supported in JSP.   

a.         scriplet

b.         declaration

c.         expression

d.         all of the above

54. JSP Comment of Server page.               

e.         <!-- Comment -->

f.          <%--Comment--%>

g.         Both a & b

h.         None of these

55. _____________ used to includes a file during the translation phase.

a.         page directive

b.         include directive

c.         taglib directive

d.         all of the above

56.       ____________ is set of JAVA API used for executing SQL Statements.

a.         JSP.

b.         Servlet.

c.         JDBC.

d.         Struts.

 

 

57. Which Exception requiredto handle in JDBC Application?

a.         SQLException

b.         IOException

c.         ArithmeticException

d.         ClassNotFoundException

58. _______________ is server side programming technology that enables creation of dynamic web page for building web based application.

a. JSP.

b. Servlet.

c. JDBC.

d. Struts.

  59. _______________ is Supported Type-4 Driver of JDBC Application.

a.         Native Protocol Pure Java Driver.

b.         Native API Partly Java Driver.

c.         JDBC-ODBC Bridge Driver.

d.         JDBC Net Pure Java Driver.

 

 

60. JSP stands for

a.         Java Secure Page

b.         Java ServerPage

c.Java Smart Page

d.         Java Small Page

61.Which Method of Statement interface used for Executing Select Query.

a. execute

b.executeUpdate

c. executeQuery

d. All of these.

62. JAVA Package for Networking Utilities.

a. java.lang

b. java.sql

c. java.net

d. java.utill

63. Which SQL Statement used for Executing Stored Procedure.

a. Statement

b. PreparedStatement

c. CallableStatement

d. All of these.

  64. _______________ is java programming language class used to extend the capability of server.

a.         JSP.

b.         Servlet.

c.         JDBC.

d.         Struts.

65.__________________ JSP tags contain Java Code.

a.         Declaration

b.         Directive

c.         Scriplet

d.         Expression

66. ___________ is anOpen Source Web Framework that extends Java Servlet API to employ

MVC architecture.

a. JSP

b. Servlet

c. Struts

d. JDBC

67.  Default value of action attributes in form tags.

a.         get

b.         post

c.         both a & b

d.         none of these

68. Non Executable code of JAVA Programming language.

a. Package

b. Comment

c. Array

d. Variable

69. _____ is the ability of an Java application to perform multiple tasks at the same time?

a.         Multiprogramming

b.         Multithreading

c.         Multiprocessing

d.         Multitasking

70. Which of the following is used to redirect the response from a servlet to a JSP page?

a.response.sendRedirect()

b.request.sendRedirect()

c.request.forward()

d.response.forward()

17. What is the default data type of a decimal number in Java?

a. int

b. float

c. double

d.long

72.       Character variable can store _____ at a time.                                                                      

e.         1 character

f.          8 character

g.         254 character

h.         None of above

73. In JAVA __________ can not inherits.    

e.         super class

f.          abstract class

g.         sub class

h.         final class

74. JAVA variable cannot begin with.            

i.          An alphabet

j.          A number

k.         A special symbol other that underscore

l.          Both B and C

 

75. In JAVA__________ cannot instantiated.

e.         super class

f.          abstract class

g.         sub class

h.         final class

76.       Which of the following is false in JAVA         

e.         Keywords cannot be used as variable names.

f.          A variable name begins withDigit.

g.         Variable names do not contain a blank space.

h.         Capital letters can be used in variable names.

 

 

77. Which of the following statements about the Java language is true?

a.         Java supports only Procedural approach towards programming

b.         Both Procedural and Object Oriented Programming are supported in Java

c.         Java supports only Object Oriented Programming approach

d.         None of the Above

 

78. Which of the following is not logical operator?

e.         &&

f.          ++

g.         !

h.         ||

 

 

79.How many times the loop will execute for the given program.

int k=5;

do

{

System.out.println(“JAVA IS PURE OOPs”);

}

while(k>=1);

 

c.         1 times                                    c. infinite times                       

d.         5 times                                    d. None of these.

 

80. JVM stands for

a.         Java Verified Machine

b.         Java Virtual Machine

c.         Java Very large Machine

d.         Java Very small Machine

 

81.__________Generated after the compile of JAVA program.

a. JVM

b.bytecode

c. class file

d. both b & c.

82. Output of given JAVA program:-

main()

{

 int a=4,y;

y=a++;

System.out.print(“\ny = ”+y);

System.out.print(“a = ”+a)

}

a.         y=5 a=5          

b.         y=4 a=5          

c.         y=5      a=4     

d.         None of these

 

83. Unary operator of JAVA Programming language.

a.         ++

b.         --

c.        

d.         All of the above.

 

84. JAVA Package for file handling.

a. lang

b. io

c. fstream.h

d. utill

 

85. JRE stands for

a.         Java Real Environment

b.         Java Rapid Enterprise

c.         Java RuntimeEnvironment

d.         None of the above

 

86.Default section of class in JAVA is ____________.

e.         public

f.          private

g.         protected

h.         none of these

87. ___________ is a name given to a variable, class or method

a. Constant

b. Reference

c. Identifier

d. Modifier

88.  Which variable cannot reinitialize.

e.         static variable

f.          abstract variable

g.         local variable

h.         final variable

89. Non Executable code of JAVA language.

a. Package

b. Comment

c. Array

d. Variable

90. Which ofthe following is exit controlled loop?

e.         For

f.          While

g.         Do while

h.         None of these

91.What is the default data type of a decimal number in Java?

a. int

b. float

c. double

d. long

92.       Character variable can store _____ at a time.                                                                      

i.          1 character

j.          8 character

k.         254 character

l.          None of above

93. In JAVA __________ can not inherits.    

e.         super class

f.          abstract class

g.         sub class

h.         final class

94. JAVA variable cannot begin with.            

m.        An alphabet

n.         A number

o.         A special symbol other that underscore

p.         Both B and C

95.  In JAVA __________ cannot instantiated.

a.         super class

b.         abstract class

c.         sub class

d.         final class

96.       Which of the following is false in JAVA         

i.          Keywords cannot be used as variable names.

j.          A variable name begins with Digit.

k.         Variable names do not contain a blank space.

l.          Capital letters can be used in variable names.

97. Which of the following statements about the Java language is true?

a.         Java supports only Procedural approach towards programming

b.         Both Procedural and Object Oriented Programming are supported in Java

c.         Java supports only Object Oriented Programming approach

d.         None of the Above

98. Which of the following is not logical operator?

i.          &&

j.          ++

k.         !

l.          ||

99.How many times the loop will execute for the given program.

int k=5;

do

{

 System.out.println(“JAVA IS PURE OOPs”);

}

while(k>=1);

 

e.         1 times                                    c. infinite times                       

f.          5 times                                    d. None of these.

100. JVM stands for

a. Java Verified Machine

b. Java Virtual Machine

c. Java Very large Machine

d. Java Very small Machine

 

101. What is the output of this program?

13.           class average {

14.               public static void main(String args[])

15.               {

16.                   double num[] = {5.5, 10.1, 11, 12.8, 56.9, 2.5};

17.                   double result;

18.                   result = 0;

19.                   for (int i = 0; i < 6; ++i)

20.                       result = result + num[i];

21.                       System.out.print(result/6);

22.      

23.               }

24.           }

a) 16.34

b) 16.566666644

c) 16.46666666666667

d) 16.46666666666666

 

 

 

102. What is the output of this program?

11.           class conversion {

12.               public static void main(String args[])

13.               {   

14.                    double a = 295.04;

15.                    int  b = 300;

16.                    byte c = (byte) a;

17.                    byte d = (byte) b;

18.                    System.out.println(c + " "  + d);

19.               }

20.           }

a) 38 43

b) 39 44

c) 295 300

d) 295.04 300

 

103. What is the output of this program?

8.             class increment {

9.                 public static void main(String args[])

10.               {       

11.                    int g = 3;

12.                    System.out.print(++g * 8);

13.               }

14.           }

a) 25

b) 24

c) 32

d) 33

 

104. What is the output of this program?

11.           class area {

12.               public static void main(String args[])

13.               {   

14.                    double r, pi, a;

15.                    r = 9.8;

16.                    p1 = 3.14;

17.                    a = pi * r * r;

18.                    System.out.println(a);

19.               }

20.           }

a) 301.5656

b) 301

c) 301.56

d) 301.56560000

105. What is the output of relational operators?

a) Integer

b) Boolean

c) Characters

d) Double

106. Which of these is returned by greater than, <, and equal to, ==, operator?

a) Integers

b) Floating - point numbers

c) Boolean

d) None of the mentioned

 107. Which of this statement is correct?

a) true and false are numeric values 1 and 0.

b) true and false are numeric values 0 and 1.

c) true is any non zero value and false is 0.

d) true and false are non numeric values.

 108. What is the output of this program?

11.           class ternary_operator {

12.               public static void main(String args[])

13.               {       

14.                    int x = 3;

15.                    int y = ~ x;

16.                    int z;

17.                    z = x > y ? x : y;

18.                    System.out.print(z);

19.               }

20.           }

a) 0

b) 1

c) 3

d) -4

 109. What is the output of this program?

12.           class Output {

13.               public static void main(String args[])

14.               {   

15.                    int x , y = 1;

16.                    x = 10;

17.                    if (x != 10 && x / 0 == 0)

18.                        System.out.println(y);

19.                    else

20.                        System.out.println(++y);

21.               }

22.           }

a) 1

b) 2

c) Runtime error owing to division by zero in if condition.

d) Unpredictable behavior of program.

 120. What is the output of this program?

10.           class Output {

11.               public static void main(String args[])

12.               {   

13.                    boolean a = true;

14.                    boolean b = false;

15.                    boolean c = a ^ b;

16.                    System.out.println(!b);

17.               }

18.           }

a) 0

b) 1

c) false

d) true

121. Which of these selection statements test only for equality?

a) if

b) switch

c) Both a & b

d) None of the mentioned

 122. Which of these are selection statements in Java?

a) if()

b) for()

c) continue

d) break

 123. Which of the following loops will execute the body of loop even when condition controlling the loop is initially false?

a) do-while

b) while

c) for

d) None of the mentioned

 124. Which of these jump statements can skip processing remainder of code in its body for a particular iteration?

a) break

b) return

c) exit

d) continue

 125. Which of these statements is correct?

a) switch statement is more efficient than a set of nested ifs.

b) two case constants in the same switch can have identical values.

c) switch statement can only test for equality, whereas if statement can evaluate any type of boolean expression.

d) it is possible to create a nested switch statements.

 

 

Computer Objective Questions || Practice Set || Shishu Varg || Class 4 & 5

1) What is the first mechanical calculating device of the world? Answer:- Abacus Q2) Who is Know as the world's First Programmer...