

InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
1. |
A plant is kept in a dark cupboard for about 48 hours before conducting any experiment on photosynthesis to :(A) Remove starch from the plant. (B) Ensure that starch is not translocated from the leaves. (C) Remove chlorophyll from the leaf of the plant. (D) Remove starch from the experimental leaf. |
Answer» A plant is kept in a dark cupboard for about 48 hours before conducting any experiment on photosynthesis to remove starch from the plant. |
|
2. |
The producer of Lime Fresh’ tea introduces ‘Buy one Get one’ scheme on all the products of ‘Lime Fresh’. Identify the promotional strategy’ used by the producer. State any one objective that could be met by this strategy. |
Answer» Sales promotion strategy is used by the producers. Objective: It will increase the immediate sales. |
|
3. |
A stringed musical instrument, such as the sitar,is provided with a number of wires of different thicknesses. explain the reason for this. |
Answer» String instruments such as sitar are provided with number of wires of different thickness so that frequency of vibration could be altered thereby changing the pitch of tire sound produced. |
|
4. |
Mention whether the following would result in inflow, outflow or no flow of cash :(i) Issue of fully paid Bonus Shares (ii) Cash withdrawn from Bank |
Answer» (i) Cash no flow (ii) Cash no flow |
|
5. |
State with reason whether the following would result in inflow, outflow or no flow of cash :(i) Charging depreciation on furniture. (ii) Cash withdrawn for bank for office use. |
Answer» (i) It would not result in any flow of cash as it is a non-cash transaction or item. (ii) It would not result in any flow of cash as it is the movement between two items of cash and cash equivalents itself. |
|
6. |
Give four points of anatomical differences between a monocot stem and a dicot stem. |
||||||||||||||||
Answer»
|
|||||||||||||||||
7. |
State the conditions required for total internal reflection of light to take place. |
Answer» Conditions necessary for total internal reflection to take place are : (i) Angle of incidence must be greater than critical angle for the given pair of media. (ii) The ray should travel from denser medium to rarer medium. |
|
8. |
State the conditions required for total internal reflection of light to take place. |
Answer» (i) The light must travel from a denser to a rarer medium. (ii) The angle of incidence must be greater than the critical angle for the given pair of media. |
|
9. |
(i) When does a ray of light falling on a lens pass through it undeviated ? (ii) Which lens can produce a real and inverted image of an object ? |
Answer» (i) When the ray is directed towards the optical centre. (ii) Convex lens. |
|
10. |
When acoustic resonance takes place a loud sound is heard. Why does this happen ? Explain. |
Answer» When acoustic resonance takes place, the natural frequency of vibration of body is equal to the frequency of external force, so the body vibrations of the largest possible amplitude. Since loudness ∝ Amplitude2 . ∴ A loud sound is heard. |
|
11. |
Briefly explain any five factors’ a businessman should keep in mind while selecting a suitable mode of transport. |
Answer» Factors that businessman should keep in mind while selecting a suitable mode of transport are: 1. Cost of Service: Railways are a cheaper mode of transport for carrying heavy goods over long distances. However for small consignments over short distances motor transport would be cheaper. Air transport is the costliest. 2. Speed of Transport: Motor transport is faster than railways for short distances. However, railways are faster than motor transport over long distances because they operate on an exclusive track without much hindrances. 3. Flexibility of Service: Motor transport is the most flexible mode in comparison to rail, water and air transport. 4. Regularity of Service: Railways provide the most dependable and regular service. They follow a fixed time schedule and are not affected much by weather. On the other hand motor transport and ocean transport are affected by rain, snow etc. 5. Safety: Roadways and airways provide better safety and security to goods than waterways and railways. |
|
12. |
A linked list is formed from the objects of the class:class Node { int number, Node nextNode; } Write an Algorithm OR a Method to add a node at the end of an existing linked list. The method declaration is as follows: void add node (Node start, int num) |
Answer» Algorithm to add a node at the end of an existing linked list. Steps: 1. Start 2. Set temporary pointer to start node 3. Repeat steps 4 until it reaches null 4. move the pointer to the next node 5. create a new node, assign num to number and link to the temporary node 6. End Method to add a node at the end of an existing linked list. void add node (node start, int num) { Node A = new Node(start) while (A != null) A=A.nextNode; Node C = new node (); C. number = num; C.nextNode = null; A. next = C; } |
|
13. |
Define the terms complexity and big-O notation. |
Answer» Complexity: It is the measurement or growth rate of an algorithm with respect to time and space. Big ‘O’ notation: It is a unit of measurement of an algorithm or represents complexity. |
|
14. |
Answer the following from the diagram of the Binary Tree given below:(i) The root of the tree. (ii) Left subtree(iii) Inorder traversal of the tree (iv) Size of the tree. |
Answer» (i) A (ii) B, C, F, D, G, E, H (iii) C, D, E, B, G, H, F, A, K, L, J (iv) 11 |
|
15. |
Answer the following from the diagram of a Binary Tree given below:(i) Name the leaf nodes of the right sub-tree.(ii) Write postorder traversal of the left subtree of node B including itself. (iii) State the level number of nodes R and M when the root is at level 0.(iv) Name the internal nodes of the tree. |
Answer» (i) Nodes P and E are the leaf nodes of the right sub-tree. (ii) R, N, M, C, B is the required post-order traversal. (iii) 2 (iv) C, F, M, H are the internal nodes. |
|
16. |
Answer the following from the diagram of a Binary Tree is given below:(i) Preorder Transversal of the tree.(ii) Children of node E.(iii) The left subtree of node D.(iv) Height of the tree when the root of the tree is at level 0. |
Answer» (i) A, I, B, C, D, E, G, H, F (ii) G and H (iii) EGH (iv) 4 |
|
17. |
Answer the following questions from the diagram of a Binary Tree given below:(i) Write the inorder traversal of the above tree structure.(ii) State the height of the tree, if the root is at level 0 (zero).(iii) List the leaf nodes of the tree. |
Answer» (i) Inorder Traversal = E A B = G E C A B D = G E C H A B D F (ii) Height of Tree = 4 (iii) Leaf nodes of the tree are those nodes that do not have any child. Therefore, leaf nodes are H and F. |
|
18. |
State the Principle of Duality. |
Answer» The duality principle states that every algebraic expression deducible from the postulates of Boolean algebra remains valid if the operators and identity elements are interchanged. |
|
19. |
State the law represented by the following proposition and prove it with the help of a truth table:P ∨ P = P |
||||||||||||
Answer» The law represented by the given proposition is Idempotent law. Truth Table:
|
|||||||||||||
20. |
Write the truth table for a 2-input conjunction and disjunction in a proposition. |
||||||||||||||||||||
Answer» Truth Table :
|
|||||||||||||||||||||
21. |
Differentiate between a proposition and wff. |
Answer» A proposition is an elementary atomic sentence that returns either true or false. Whereas wff’s are a well-formed formula which contains propositions and connectives. |
|
22. |
Minimize the expression using Boolean laws: F = (A + B’)(B + CD)’ |
Answer» F = (A + B’).(B + CD)’ F = (A + B’). (B’. (CD)’) F = AB’+B’B’.(C’+D’) F = B’.(C’+D’) |
|
23. |
The following function witty() is a part of some class. What will be the output of the function witty( ) when the value of n is ‘SCIENCE’ and the value of p is 5. Show the dry run/working:void witty (String n, int p) { if (p < 0) System.out.println(" "); else { System. out .printing. char At (p) + " . "); witty (n, p - 1); System.out.print[n. char At (p)]: } } |
Answer» C. N. E. I. C. S. SCIENCE. |
|
24. |
What is the role of an appendix in a report ? |
Answer» Appendix in a report is a supporting document which is attached to the report. An appendix may contain the following items : • reference • bibliography • glossary etc. It helps to explain and support the contents and conclusions of the report. |
|
25. |
Explain cross referencing, in the context of report writing. |
Answer» Cross referencing means making a mention at one place in the report about some other point of the report. It helps to save time and facilitates task of the person who are to read and use the report whenever necessary, cross-referencing should be done in a report. . |
|
26. |
Give two advantages of having an ‘Appendix’ in a report. |
Answer» (i) (a) It contains statistical data or tables, graph list of persons or witnesses etc. (b) It helps to explain and support the contents and conditions of the report. (ii) An amendment may be moved with or without any previous notice. It need not be in writing or seconded. But it should not in whole change the motion, otherwise it will become a counter motion. |
|
27. |
What are reports ? Explain cross-referencing and appendix with regard to reports. |
Answer» A Report is a written statement based on a collection of facts and opinions. It may deal with past accomplishments, present conditions of probable future developments. It provides the required information to shareholders, creditors, customers and the Government. It also serves as a basis for measuring executive or departmental performance. Cross-Referencing : Cross Referencing means making a mention at one place in the report about some other point of the report. It helps to save time, space and facilitates the task of the person who are to read and use the report. Appendix: An appendix helps to explain and support the contents and conclusions of the report. It includes statistical data, graphs, tables, list of persons or witness etc. |
|
28. |
Write a short note on Role of a counselor is dealing with individuals. |
Answer» Counseling is an interactive process conjoin-ing the counselee, who needs assistance and the counselor, who is trained and educated to give assistance. Role of counselor in dealing with indivi-duals : Counseling deals with wellness, personal growth, career and pathological concerns. In other words, counselors work in area that involve relationships. Counseling meets the requirement of a wide spectrum of people. Clients have developmental or situational concerns that require help in regard to adjustment or remediation. Counseling is intended to help the individuals to realize their potentials and to make optimum contributions to the growth of society. Counseling aims at providing assistance to teachers in their efforts to understand their students. Counseling aims at developing in student’s qualities such as perseverance, dedication, sincerity, devotion, positive outlook, respect for views of others. Currently counseling is also successful to rehabilitate criminals and prevent criminal tendencies and delinquency if detected early. Vocational counseling is provided to criminals to rehabilitate them. The common areas of counseling are as follows: Child counseling : Counseling dealing with different problems of a child, such as learning difficulties, temper tantrums, conduct problems, lack of concentration, inadequacy in cognitive, perceptual or social development, emotional disturbances and child abuse. Parental or family counseling : The main aim is to resolve the problematic issues pertinent in the family of the client. Parental counseling is an extended part of child counseling. It helps to improve parent-child relationship. Academic and school counseling : This deals with school children regarding their academic difficulties, relational problems with teachers, classmates, career issues and personal problems. Workplace counseling : It aims to assist both the employer and the employee by intervening with an active problem-solving approach. It helps in increasing productivity of an organization. Couple counseling : This helps couples of any type to realize and resolve their conflicts and improves their relationship. It enables the couples either to make thoughtful decisions about rebuilding the relationship or getting separated. Group counseling : People suffering from the same or similar problems get together and share their problems and coping mechanism that they use. They sense a feeling of having a support system. Popular group therapies are seen in the form of alcoholic anonymous, or support group for cancer patients. Geriatric counseling : This helps to manage problems arising in and from old-age. Counseling of delinquents : Counseling the delinquents involve addressing the emotional, behavioural and personality issues of the delinquents. Career counseling : This helps the individual in their decision for the right choice of career or vocational course. Sports counseling : This area is mainly concerned with the physical health, mental functioning and performance of a sports person. Counseling for mental health issues : Counseling is also used to treat and alleviate mental disorders, adjustment problems and emotional disturbances. Phobia is an anxiety disorder. It means extreme and irrational fear of some specific object or situation that leads to avoidance to these objects or situation by the person. According to DSM-IV- TR There are three kinds of phobia- specific, social and agora-phobia. Criteria for specific phobia- (according to DSM-IV-TR): • Marked and persistent fear that is excessive and unreasonable caused by the presence or anticipation of a specific object or situation. • Exposure to phobic stimulus provokes an immediate anxiety response or panic attack. • Person recognizes that the fear is excessive or unreasonable. • Phobic stimuli is avoided or endured with intense anxiety. • Symptoms interfere significantly with normal functioning. • Duration of at least six months. Criteria for social phobia : (according to DSM-IV-TR) • Marked or persistent fear of one or more social situations in which the person is exposed to unfamiliar people or possible scrutiny of others. • Exposure feared social situation provokes anxiety or panic. • Person recognizes the fear to be excessive or unreasonable. • Feared social or performance situation is avoided or endured with great distress or anxiety. • Symptoms interfere significantly with normal functioning. Agoraphobia- the Greek word ‘Agora’ means public places of assembly. Criteria for agoraphobia: • Anxiety about being in places from which escape might be difficult or in which help may not be available. • Situations are avoided or endured with marked distress. Causes: Biological factors : Genetic factors : Genetic and temperamental variables affect the speed and strength of conditioning the fear. Several studies have suggested, a moderate genetic contribution in the development of phobias. Behaviourally inhibited children who are shy, timid and easily distressed are likely to develop phobias from different objects or situations. Psychosocial factors: 1. Psychodynamic perspective : According to this viewpoint phobia is represented as a defense against anxiety that stems from repressed impulses from the Id. It is too dangerous to know the repressed Id impulses the anxiety is displaced on to some external object/ situation that has some symbolic relationship to real objects of anxiety. 2. Phobias as learned behaviour : The principle of classical conditioning appear to account for the acquisition of irrational fears and phobias. The fear response can readily be conditioned to previously neutral stimuli when these stimuli are paired with traumatic or painful events. Once acquired phobic fears would generalize to other similar situations or objects. 3. Vicarious conditioning of phobic fears : People learn irrational phobic fears simply watching a phobic person. This can be distressing to the observer and can result in fear being transmitted from one person to another through vicarious or observational learning. For example- A boy who has witnessed his grandfather vomit while dying developed a strong and persistent vomiting fear. 4. Evolutionary preparedness : Humans seem to be evolutionarily prepared to rapidly associate certain objects such as snakes, spiders, water and enclosed spaces with frightening or unpleasant events. This preparedness occurs because certain objects or situations posed real threat to our early ancestors. Thus the prepared fears are not inborn rather they are easily acquired and resistant to extinction. On the other hand social phobia is a result of dominance hierarchies, a common form of social arrangement among animals. Domi¬nance hierarchies are established through aggressive encounters between members of a social group and a defeated individual typically displaces fear and submissive behaviour but rarely attempts to escape the situation completely. Social phobias are evolutionary basis to acquire fears of social stimuli that signal dominance and aggression from other humans. 5. Cognitive factors : Beck suggested that people with social phobia tend to expect that other people will reject or negatively evaluate them. This leads to a sense of threat from people around them. |
|
29. |
What is obsessive compulsive disorder ? |
Answer» Obsessive-Compulsive Disorder (OCD) is an anxiety disorder defined by the occu-rrence of unwanted and intrusive obsessive thoughts or distressing images; usually accompanied by compulsive behaviors performed to neutralize the obsessive thoughts and images. |
|
30. |
Write a short note on obsessive Compulsive Disorder. |
Answer» Obsessive Compulsive Disorder : It is defined by the occurrence of unwanted and intrusive obsessive thoughts that are usually accompanied by compulsive behaviors performed to neutralize the obsessive thought. Criteria for Obsessive Compulsive Disorder (According to DSM-IV-TR) Obsession is defined by : • Recurrent and persistent thoughts that are intrusive and cause anxiety. • Intrusive thoughts come frequently and . trigger extreme anxiety that gets in the way of day-to-day functioning. • Person attempts to suppress, ignore or neutralize them by some other thought or action. • Person recognizes thoughts are a product of his/her own mind. Compulsion is defined as : • Repetitive behaviors (hand washing, ordering, checking) or mental acts (praying, counting). The person feels driven to perform in response to obsession. • Behaviors or mental acts aim at preventing or reducing distress. 1. Person recognizes that the obsessions and compulsions are excessive and unreasonable. 2. Obsessions and compulsions cause marked distress and interfere significantly with normal functioning. Causes: Biological factors: (i) Genetic influences : Evidence from twin studies reveal a moderately high concordance rate for monozygotic twins and a lower concordance rate for dizygotic twins. (ii) Abnormalities in brain function : PET scans have shown that people with OCD have abnormalities in the active metabolic levels in the caudate nucleus, the orbital frontal cortex and cingulated cortex. (iii) The role of serotonin : Current evidence suggest that increased serotonin activity and sensitivity of some brain structure to serotonin are involved in OCD symptoms. Psychosocial factors: (i) Behavioral viewpoint: According to O.H. Mower’s twoprocess theory of avoidance learning, neutral stimuli become associated with frightening thoughts or experiences through classical conditioning and elicit anxiety. For example – touching a doorknob or shaking hands might become associated with the ‘scary idea’ of contamination. Once learned such avoidance responses are extremely resistant to extinction. (ii) Cognitive biases and distortions : People with OCD seems to have difficulty blocking out negative irrelevant input or distracting information so they may attempt to ‘suppress’ negative thoughts stimulated by this information. Trying to suppress negative thoughts may paradoxically increase their frequency. OCD is also caused by the faulty belief where a person believes that having a thought about doing something (for instance killing a person) is equivalent to doing it (having killed a person). This is known as thought-action fusion. This belief keeps increasing the anxiety due to expectation of causing harmful consequences. This impels the person to engage in various compulsive behaviours to reduce the likelihood of any harmful consequences. Psychodynamic perspective : This view suggests that obsessions and compulsions stem from unconscious conflicts arising when primitive Id impulses are conflicting with socially acceptable behaviours. Since the conflict is highly distressing the person may resort to something more manageable, like an intrusive thought or an associated compulsive behaviour |
|
31. |
Write a composition of (300 – 350 words) on the topic given below :Summers are becoming hotter with each passing year. Write a description of one such very hot day. What did you see and hear as you walked outside? How were birds and animals affected ? |
Answer» Summers are getting hotter with each passing year. The effect of the climate change is being felt all around. Inspite of so many facilities with which to fight the scorching heat during summer, the heat of the season continues to torment the people, the poor being hit the worst. This year, the 6th of June was regarded as the hottest day of the year. The vertical rays of the sun began to be felt soon after the morning. It was close. At noon, it was almost impossible to go out of doors. Lemonade and other cold drinks failed to quench thirst. We had hardly finished our lunch when the power broke down. I had planned to have a nap after lunch. Even this was snatched due to the failure of our inverter. I was feeling agitated and upset when my uncle dropped in unexpectedly. Though we welcomed him yet the unbearable heat of the sun was oppressing our nerves so acutely that somehow our inner irritability at the power breakdown betrayed itself. My mother asked me to go to the market to bring some household items for the kitchen. Willy nilly I had to go out. I took an umbrella to protect myself from sunstroke. As I was moving about, I found some poor rickshaw pullers carrying their load, sweating hard. As I looked towards the fields, the cows and buffaloes were equally disquiet due to extreme heat from which there appeared no respite. The birds in the trees were also quiet. It took me half an hour to complete my errand. I had to take water twice on the way as my lips were getting dry. When I reached home at about 4 pm I felt a sigh of relief because the conditions outside were much worse than inside. I sat down to relax when all of a sudden the sky was overcast with the clouds of dust. Evidently the dust storm was making its appearance. Soon it began to blow so hard that we had to close all doors and windows to keep the dust out. It was suffocating inside. The dust storm died down in about fifteen minutes, leaving the dust setling on everything and every being. But thank God, the power was restored and we could have the fans and coolers giving us much needed relief. Such hot days leave their indelible imprint on men, animals and birds. |
|
32. |
Murine fish when placed in tap water bursts because of : (A) Endosmosis (B) Exosmosis (C) Diffusion. (D) Plasmolysis |
Answer» Murine fish when placed in tap water bursts because of Endosmosis. |
|
33. |
State any three goals of the human genome project. |
Answer» Human Genome Project (HGP) is an international research program to analyse the complete genetic material of human being and also selected experimental animals. HGP’s goal is to decode the complete DNA material or genome of human beings by 2003 and make them accessible for further biological study. Objectives of Human Genome Project (HGP) are : • To improve forensic science. • The diagnosis of diseases is accurate. • To develop new and improved medicines. • To predict and prevent diseases. |
|
34. |
From the list of characteristics given below, select the five which are relevant to non-metals and their compounds:A. ductileB. Conduct electricityC. BrittleD. Acidic oxideE. Basic oxidesF. Discharge at anodeG. Discharge at cathodeH. Ionic chloridesI. Covalent chloridesJ. Reaction with dilute sulphuric acid yields hydrogen,K. 1, 2, or 3 valence electronsL. 5, 6, 7 valence electrons(write the five letters corresponding to the correct characteristics) |
Answer» (C) Brittle (D) Acidic oxide (F) Discharged at anode (I) Covalent chlorides (L) 5,6,7 valence electrons |
|
35. |
Brass is an alloy of:A. Copper and tin,B. Copper and ZicC. Zinc and lead,D. Lead and tin. |
Answer» Brass is an alloy of copper and Zinc. |
|
36. |
Discuss the Raven’s Progressive Matrices Test for measuring intelligence |
Answer» Raven’s Progressive Matrices (RPM) is a non-verbal, culture fair group test. It was originally developed by John C.Raven in 1938. Test description: RPM is constructed for groups ranging from 5 year olds to the elderly. In each matrix, the subject is asked to identify the missing element from the given options that completes the pattern. There are six to eight options given to choose from. There is no time limit to complete the task. It checks the individual’s eductive and reproductive ability. Version : The matrices are available in three different forms for participants of different abilities. These matrices are : Standard Progressive Matrices : This is the original form of the matrices made for average six years old to eight years old. It has five sets(From A to E) of 12 items each (numbered as A1 to A12,B1 to B12…). The items in each set are organized at an increasing difficulty level. The items are presented in black ink on a white background. Coloured Progressive Matrices : These matrices are used for children aged from 5 to 11 years of age, the elderly and for people who have moderate to severe learning difficulties. They have sets A and B of the Standard Progressive Matrices in coloured format. Additionally it has another set of 12 items between the sets of A and B. The additional set is referred to as AB. Most of the items have a coloured background to make them visually stimulating for the target group. However, the last few items of Set B are presented in blackink against white background. If the participant performs better than the tester’s expectation then the participant is moved to do the sets C, D and E of the Standard Progressive Matrices. Advanced Progressive Matrices : These matrices are used for adolescents and adults who show the signs of being above average intelligence. It has 48 items. It is presented as Set I, which has 12 subsets and Set II, which has 36 subsets. Items are presented in black ink on white background. The items in the set are arranged in increasing order of difficulty. Underlying Factor : RPM measures the two main components of general intelligence, originally identified by Charles Spearman. These are : • The clear thinking ability, with an ability to make sense of a complete situation called the eductive ability. • The ability of storing and reproducing learnt information, known as reproductive ability. |
|
37. |
Design a class name ShowRoom with the following description :Instance variables/ Data members : String name – To store the name of the customer long mobno – To store the mobile number of the customerdouble cost – To store the cost of the items purchased double dis – To store the discount amount double amount – To store the amount to be paid after discountMember methods: – ShowRoom() – default constructor to initialize data members void input() – To input customer name, mobile number, cost void calculate() – To calculate discount on the cost of purchased items, based on following criteriaCostDiscount (in percentage)Less than or equal to ₹ 100005%More than ₹ 10000 and less than or equal to ₹ 2000010%More than ₹ 20000 and less than or equal to ₹ 3500015%More than ₹ 3500020% |
Answer» Solution. import java.io.*; import java.util.*; class ShowRoom { String name; long mobno; double cost; double dis; double amount; ShowRoom( ) { name = ” “; mobno =0; cost = 0; dis = 0; amount = 0; } void input( ) { Scanner sc = new Scanner(System.in); System.out.println(“EnterName:”); name = sc.nextLine( ); System.out.println(“Enter Mobile number:”); mobno = sc.nextLong( ); System.out.println(“Enter cost:”); cost = sc.nextDouble( ); } void calculate( ) { if (cost 10000 && cost < = 20000) { dis = cost* 10/100; amount cost – dis; } else if (cost > 20000 && cost < = 35000) { dis = cost* 15/100; amount = cost – dis; } else if (cost > 35000) { dis = cost*20/100; amount = cost – dis; } } void display( ) { System.out.println(“Name::” +name); System.out.println(“Mobile No.::” +mobno); System.out.println(“Amount::” +amount); } public static void main(String args( )) { ShowRoom ob = new ShowRoom( ); ob.input( ); ob.calculate( ); ob.display( ); } } |
|
38. |
Write a program to input a sentence and convert it into uppercase and count and display the total number of words starting with a letter ‘A’.Example: Sample Input: ADVANCEMENT AND APPLICATION OF INFORMATION TECHNOLOGY ARE EVER CHANGING. Sample Output : Total number of words starting with letter A’ = 4. |
Answer» import java.io.*; import java.util.*; class UpperCount { public static void main(String args[ ]) { int i, a; Scanner sc = new Scanner(System.in); String str, str1, str2; System.out.prindn(“Enter sentence::”); str = sc.nextLine(); strl = str.toUpperCaseO; ‘ str2 = “” + strl; a = 0; , for (i = 0; i < = str2.1ength(); i+ +) { if(str2.charAt(i) == ‘ ‘) if(str2.charAt(i + 1) == ‘A’); a+ +; } System.out.println(“Total number of words starting with letter ‘A’::” +a); } } |
|
39. |
Write the output of the following :(i)System.out.println(Character.isUpperCase(‘R’)); (ii)System.out.println(Character.toUpperCase(‘j’); |
Answer» At the time of function declaration void signify that function has no return type, that means function will not return any value. |
|
40. |
How are private members of a class different from public members ? |
Answer» Scope of the private members is within the class whereas scope of the public members is global. |
|
41. |
Name any two wrapper classes. |
Answer» (i) Integer (ii) Character |
|
42. |
State the data type and value of res after the following is executed : char ch = ‘9’; res = Character. isDigit(ch) ; |
Answer» boolean True |
|
43. |
Differentiate between searching and sorting. |
Answer» Searching is a technique which is used to search a particular element in an array or string. Sorting is a technique which is used to rearrange the elements of an array or string in a particular order either ascending or descending. |
|
44. |
Write a difference between the functions isUpperCase( ) and toUpperCase( ). |
Answer» The isUpperCase( ) method is used to check whether the given character is in upper case or not. It returns Boolean data type. The toUpperCase( ) method is used to convert a character or string into upper case. It returns char or String type. |
|
45. |
Define abstraction. |
Answer» Abstraction is a process of hiding the implementation details and showing only functionality to the user. |
|
46. |
Name the wrapper classes of char type and boolean type. |
Answer» What are the values of a and b after the following function is executed, if the values passed are 30 and 50: void paws(int a, int b) { a=a + b; b=a – b; a=a – b; System.out.println (a+ “,” +b); } |
|
47. |
Name the following :(i) A keyword used to call a package in the program. (ii) Any one reference data type. |
Answer» (i) import (ii) Array |
|
48. |
Name the two types of constructors |
Answer» Two types of constructor : (i) default constructor (ii) parameterized constructor. |
|
49. |
What is inheritance ? |
Answer» Inheritance in java is a mechanism in which one object acquires all the. properties and behaviors of parent object. The idea behind inheritance in java is that you can create new classes that are built upon existing classes. When you inherit from an existing class, you can reuse methods ‘and fields of parent class, and you can add new methods and fields also. |
|
50. |
Write the memory capacity (storage size) of short and float data type in bytes. |
Answer» (i) short: 2 bytes (ii) float: 4 bytes |
|