Tuesday , 5 December 2017
Home » Weekly Practice Question Class 10 » [Week 4] Important Practice Questions for ICSE and ISC

[Week 4] Important Practice Questions for ICSE and ISC

This week we have a few short questions which covers the basic syllabus, for the ICSE as well as ISC students preparing for their 2013 Computer Applications and Computer Science Examinations respectively.

[To know more about these weekly practice questions, Click Here]

You need to answer the given questions, and reply it as comments by filling the “Leave a Reply” section below this post.

The correct answers will be posted next week.

Question 1. What is the role of the keyword ‘void’ in declaring functions?

Question 2. What is the significance/use of the keyword ‘return’ ?

Question 3. If a function contains several return statements, how many of them will be executed?

Question 4. Which OOP principle implements the concept of Data Hiding?

Question 5. What is the output of the following :
System.out.println(“Five:”+5+2);
System.out.println(“Five:”+(5+2));

Check Also

Important Practice Questions for ICSE [Set 1]

Important practice questions for ICSE Computer Application students [Multiple Choice Questions and Output Questions)

14 comments

  1. 1.. keyword void is used when there is no return statement in function declaration.
    2..return statement is used to pass the the value calculated by the function to the calling function.
    3..when there are more than 1 return statements in the function , only one of them will be executed which is encountered first.
    4..encapsulation.
    5..five:52
    6..five :7

  2. 1.void keyword is used to signify the return data type of that function which doesn’t have any value to send back to the calling statement or variable.
    2.return keyword is used to send the value obtained in a method after necessary calculations to the calling variable or statement.
    3.there may be multiple return statements in a method but only one of them may be executed in a single call.
    4.data hiding or data abstraction may be implemented in a class through the concept of encapsulation.
    5.FIVE:52
    FIVE:7

    Please reply if the answers are appropriate… It will be of immense help..thank you sir..

  3. 1.The keyword void tells us that a particular function returns no value.
    2.The keyword return is used to return values to the caller function.
    3.Only the first return value is executed.
    4.Encapsulation.
    5.Five:52
    Five:7

  4. 1.. keyword void is used when there is no return statement in function declaration.
    2..return statement is used to pass the the value calculated by the function to the calling function.
    3..when there are more than 1 return statements in the function , only one of them will be executed which is encountered first.
    4..encapsulation.
    5..five:52
    five :7

  5. Very helpful resources thanks a lot please upload program collection of inheritance just like you did for recursion

  6. 1. In declaring function the keyword ‘void’ serves the purpose of not returning any value by the function.

    2. The keyword ‘return’ is used to return the type of value ,as specified in the function’s signature, by the function.

    ‘return’ can also be used to terminate the function in case when the return type of the function is ‘void’.

    3. If a function has many return statements then the one which satisfies both, the function’s signature and any boolean expression(if any), gets executes.Therefore only one of those return statement is executed.

    4.Encapsulation.

    5.Five 52
    Five 7

  7. 1. if no value is to be returned by a function “void” is to be used.

    2. return statement is  used to return a value to the calling code and also cause an immediate exit from the function as soon as it is encountered.

    3.only one return statement can be executed in a function.

    4.Abstraction , bcz it refers to the act of representing essential features hiding background details.

    5. Five : 52

    Five : 7

    • Correct Answers given by Ankita. In answer #4 it is safe and better to answer Encapsulation.

      • for 4th question u have asked for the OOP principle which implements data hiding so the answer should be abstraction..?? encapsulation refers to wrapping up of data and functions into a single unit, then how can this concept implements data hiding?? plz can u explain it in detail, i m not getting this answer.. plz  “java for school” help me…

        • No need to panick Ankita. 🙂

          We all know that a class can be referred to as “a collection of data and methods.” And this is what Encapsulation states: “Encapsulation is the wrapping up of data and associated functions into a single unit and that single unit is a class”

          Hiding the data within the class and making it available only through the methods is one of the important object-oriented techniques . This technique is known as encapsulation because it seals the data (and internal methods) safely inside the “capsule” of the class, where it can be accessed only by trusted users (i.e., by the methods of the class) and hence hiding the data from the outside world.

          Encapsulation can be described as a protective barrier that prevents the code and data being randomly accessed by other code defined outside the class, thereby hiding the data and code within the class.

          Furthermore, We hope that you would have heard this statement that “Encapsulation is a way to implement Data Abstraction”.
          Hence, When all data (relevant and irrelevant) are hidden together in the class (i.e. encapsulated) only then can you select that data from it which is relevant at that time (i.e. abstraction).

          So, that is why we wrote that it is safe and better to answer Encapsulation.

          Ankita if you still have doubts then feel free to ask.

          • thanx java for school……. i have undrstood it :-D…….. n plz issue more such practice questions, they are really nice……

  8. 5. Five 52
    Five 7

  9. 1.It help’s in printing any value rather than returning boolean type value to main method.
    2.It return boolean type value of a given function.
    3.Only one boolean type value is return .
    4.Encapsulation.
    5.Five 5+2
    Five 7

  10. 1. it helps in printing the value rather than returning on the screen.
    2. it returns the value of a given function
    3. If a function contains several return statements,
    it executes the value of the given datatype.
    4. encapsulation.
    5. Five 5+2
    Five 7

Leave a Reply

Your email address will not be published. Required fields are marked *