Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Loading...
User Settings
close menu
Welcome to Scribd!
Upload
Read for free
FAQ and support
Language (EN)
Sign in
0 ratings
0% found this document useful (0 votes)
39 views
Slip Test 3 2023-24 - 231222 - 162802
Uploaded by
Shakila.D Raks Pallikkoodam
AI-enhanced
Copyright:
© All Rights Reserved
Available Formats
Download
as PDF or read online from Scribd
Download
Save
Save Slip Test 3 2023-24_231222_162802 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Slip Test 3 2023-24 - 231222 - 162802
Uploaded by
Shakila.D Raks Pallikkoodam
0 ratings
0% found this document useful (0 votes)
39 views
9 pages
AI-enhanced title
Document Information
click to expand document information
Original Title
Slip Test 3 2023-24_231222_162802
Copyright
© © All Rights Reserved
Available Formats
PDF or read online from Scribd
Share this document
Share or Embed Document
Sharing Options
Share on Facebook, opens a new window
Facebook
Share on Twitter, opens a new window
Twitter
Share on LinkedIn, opens a new window
LinkedIn
Share with Email, opens mail client
Email
Copy link
Copy link
Did you find this document useful?
0%
0% found this document useful, Mark this document as useful
0%
0% found this document not useful, Mark this document as not useful
Is this content inappropriate?
Report
Copyright:
© All Rights Reserved
Available Formats
Download
as PDF or read online from Scribd
Download now
Download as pdf
Save
Save Slip Test 3 2023-24_231222_162802 For Later
0 ratings
0% found this document useful (0 votes)
39 views
9 pages
Slip Test 3 2023-24 - 231222 - 162802
Uploaded by
Shakila.D Raks Pallikkoodam
AI-enhanced title
Copyright:
© All Rights Reserved
Available Formats
Download
as PDF or read online from Scribd
Save
Save Slip Test 3 2023-24_231222_162802 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download as pdf
Jump to Page
You are on page 1
of 9
Search inside document
Fullscreen
ASHGKA ASHOKA GROUP OF SCHOOLS, Ashoka Marg Academic Session 2023-2024 Grade X Marks: 50 Slip Test3. Computer Application 19" Dec 2023. Time: 1 Hour Topic:Encapsulation, Strings, Arrays Question 1: Multiple choice questions [Marks 15] 1. Which of the following is a valid statement for declaring an array of type char? a) char{ ] e=new char(); ©) charf ] c=new char(4); ) char{ J e=new charf Js ) char ] c=new char [4]; 2. Which of these is necessary to specify at time of array initialisation? a) Row cc) Both row and column b) Column d) None of the above °) 3. Which variables are initialised inside a method, block or constructor? a) Local Variable cc) Instance Variable b) Class variable 4) Static Variable 4, Which element is represented by af5]? a) sth oa b) ot a) th 5. What will be the output of the following? int x{] = {12,13,14,15,16}; Systemoul.printIn(x{2] +" "+ x{4)); a) 14 16 ©) 13 15 b)30 4) 1415 6. The number of bytes occupied by a character array of 10 elements. a) 20 bytes ©) 40 bytes b) 60 bytes 4) 120 bytes 7. int af]={4,8,7,12,3} System.out printIn(a[2+1]); a) 12 ©) 10 b) 14 ail 8. Which of the following statements is the most appropriate for the private members? a). They are visible out of the class in which they are defined. b) They can be used in the sub-classes. 2023-24/Grade- X /Slip Test 3/Computer Application Page 1 of 9©) They are only visible in the class in which they are declared. 4) They can be used in same package 9. Assertion(A); Array is a datatype which can store multiple values of similar type. Reason(R): int arr{J= { 1,2, 3, 4,5}; is an example of an array. a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A) b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion(A) ©) Assertion (A) is true and Reason (R) is false 4) Assertion (A) i false and Reason (R) is true 10. is the name of the array when it is used with a subscript to access a singk element of the array. a) actual variable ¢) subseripted variable b) primitive variable ) array variable 11. If the number of locations reserved for an array is 59, the maximum no of elements that can be stored in this array are: a) 58 ©) 60 b) 59 4) More than 60 12. Assertion(A); for array arr{}={1,2,3} ; arr. ength () will give output as 3. Reason(R): The kength attribute of an array provides a quick way to obtain its size. a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A) 'b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation. of Assertion(A) c) Assertion (A) is true and Reason (R) is fae 4) Assertion (A) is false and Reason (R) is true 13, The image depict which type of datatpe a) class c) Arrays. b) String 4) interfice 2023-24/Grade- X /Slip Test 3/Computer Application Page 2 of 914, Assertion(A); to display all the elements of the array we can use the following. for loop for(int i-li<-n;i++) where nis the size of the array Reason(R): Arrays in Java use zero-based indexing, meaning the first element is accessed with index 0, the second with index 1, and so on. a) Both Assertion (A) and Reason (R) are true and Reason (R) is a correct explanation of Assertion (A) 'b) Both Assertion (A) and Reason (R) are true and Reason (R) is not a correct explanation of Assertion(A) c) Assertion (A) is true and Reason (R) is false 4) Assertion (A) is false and Reason (R) is true 15. Out of the following statements which is not correct in respect to arrays a) The size of an array in Java is fixed upon creation and cannot be changed afterward b) While the size of an array is fixed, its elements can be dynamically initialized ©) Arrays in Java can store both primitive data types (int, char, ete.) and objects. d) Arrays is a heterogenous data structure. 16. Consider the following declaration String line = "Some more interesting. stuff on strings!" 1/ the words are separated by a singke space What string will str refer to after execution of the following code segment? int x = fine indexOf"m"); String str = line.substring(10, 15) + line substring(25, 25 + x); a) interest c) inter ff b) interft 4) intert 17. A program has a String variable filName that stores a first name, followed by a space, followed by a last name. There are no spaces in before or afler the first or last names. Here are some exampks of fulName values: "Anthony Coppola", “Jimmy Carroll" and "Tom DeWire" . Consider the following code segment that extracts the last name fom a fillName variable, and stores it in lastName with no surrounding blanks: int k = fullName.indexO f{" ") // find index of blank String lastName = /* expression */ Which is a correct replacement for /* expression */ ? 1. fallName.substring(k); I. filName.substring(k + 1); TIL fullName.substring(k. + 1, fillName. length); b) Tonly a) Lonly 4) [and IIT only c) Wand 111 only 2023-24/Grade- X /Slip Test 3/Computer Application Page 3 of 918. This question refers to the getString method shown below: public static String getString(String st, String s2) { int index = s1.indexOfs2); retum sI.substring(index, index + s2.length()); 4 Which is true about getString, where s1= computer and s2=compute? It may return a string that ... 1... is equal to 52. I. ... has no characters in common with s2. IL... is equal to sl a) [and IIT only ©) I and II only b) 1.1, and IIT ¢) Tonly 19. public class StrEqual { public static void main) new String(""hello"); "hello"; 32) { Systemout-printIn("s1_ and s2 equal’); } ebe { Systemout.printin("s! and s2 not equal); i if (s1 =s3) t Systemout-printIn("s1_ and s3 equal’); } ebe Systemout.printIn("S1 and s3 not equal"); 4 ' } Which one of the following options provides the output of this program when executed? a) sl and s2 equal sl and s3 equal b) sl and s2 equal s1 and s3 not equal °) sl and s2 not equal sl and s3 equal d) sl and s2 not equal sl and s3 not equal 2023-24/Grade- X /Slip Test 3/Computer Application Page 4 of 920. public class Test { public static void main(String{] args) { String s= new String("5"); Systemout printIn(1 + 10+s+1+ 10); } i a) 11511 ©) 15110 b) 1105110 d)27 21. Which of the following methods is used to compare two strings for equality in Java? a) equals() ©) contains() b) compareTo() 4) coneat() 22. What will be the output of the following code? public class Main{ public static void main(String [Jargs){ String str = "Tava String str2 = "Tava", String str3 =new String(“Java"); Systemout-printIn(strlequals(stt2) && strl.equals(str3)); } 1 a) true ©) Compile error b) fae 4) Runtime error 23. What will be the output of the following code? public class Main{ public static void main(String [Jargs){ String. str] = "Java"; String str2 = "Java"; Systemout printIn(strl toUpperCase()); Systemout-printin(strl); System.out println(str2=str2.toUpperCase()); Systemout.printin(str2); 1 } a) JAVA JAVA LEARN LEARN b) JAVA Java LEARN LEARN ©) JAVA JAVA LEARN Lea 2023-24/Grade- X /Slip Test 3/Computer Application Page 5 of 924, Java Array can allocate a) Dynamic Memory ©) Both A and B b) Static Memory 4) Runtime allocation of memory 25. Which of the following is used to declare,construct, and initlaize an array? a) int arr (] b) int (] arr = (1, 2, 3); ) int [J arr= {{1}.12}}5 ) int arr (}E) = (41, 23,43} }5 26. In java, array elements are stored in memory locations, ACL, 2,3, 4}; a) Random ¢) Sequential & Random. b) Sequential ¢) Binary search 27. What does the following method do? public static void numbers (int [ ] num) { for(int x= 1;x
brown? Fox< jumped\ over? the: “lazy/ dog, Sample output: dog lazy the over jumped for brown quick (6. Program to print words whose first character of the word is uppercase and last character of the word is lowercase. Sample input 1 Enter the sentence: Quick brown fox Jumped over the Lazy dog Sample output: Words whose first letter is uppercase and last letter is lowercase: Quick Jumped Lazy Sample input 2: Enter the sentence: The capital of India is New Delhi 2023-24/Grade- X /Slip Test 3/Computer Application Page 8 of 9Words whose first letter is uppercase and last letter is lowercase: The India New Delhi Q7. Write a program to input integer elements into an array of size 20 and perform the following ‘operations: () Display largest number from the array. (ii) Display smallest number from the array. (ii) Display sum of all the elements of the array. Q8. Write a program to accept the names of 10 cities in a singke dimensional string array and their STD codes in another single dimensional integer array. Search for a name of a city input by the user in the list. If found, display "search successful” and STD of the city else "search unsuccessful”. Make use of binary search. Also sort the array in descending order of the STD codes and display the sorted array ie STD code and city name 2023-24/Grade- X /Slip Test 3/Computer Application Page 9 of 9
You might also like
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
From Everand
The Subtle Art of Not Giving a F*ck: A Counterintuitive Approach to Living a Good Life
Mark Manson
Rating: 4 out of 5 stars
4/5 (6025)
Principles: Life and Work
From Everand
Principles: Life and Work
Ray Dalio
Rating: 4 out of 5 stars
4/5 (626)
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
From Everand
The Gifts of Imperfection: Let Go of Who You Think You're Supposed to Be and Embrace Who You Are
Brené Brown
Rating: 4 out of 5 stars
4/5 (1133)
Never Split the Difference: Negotiating As If Your Life Depended On It
From Everand
Never Split the Difference: Negotiating As If Your Life Depended On It
Chris Voss
Rating: 4.5 out of 5 stars
4.5/5 (911)
The Glass Castle: A Memoir
From Everand
The Glass Castle: A Memoir
Jeannette Walls
Rating: 4.5 out of 5 stars
4.5/5 (1741)
Sing, Unburied, Sing: A Novel
From Everand
Sing, Unburied, Sing: A Novel
Jesmyn Ward
Rating: 4 out of 5 stars
4/5 (1245)
Grit: The Power of Passion and Perseverance
From Everand
Grit: The Power of Passion and Perseverance
Angela Duckworth
Rating: 4 out of 5 stars
4/5 (628)
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
From Everand
Hidden Figures: The American Dream and the Untold Story of the Black Women Mathematicians Who Helped Win the Space Race
Margot Lee Shetterly
Rating: 4 out of 5 stars
4/5 (938)
Shoe Dog: A Memoir by the Creator of Nike
From Everand
Shoe Dog: A Memoir by the Creator of Nike
Phil Knight
Rating: 4.5 out of 5 stars
4.5/5 (548)
The Perks of Being a Wallflower
From Everand
The Perks of Being a Wallflower
Stephen Chbosky
Rating: 4.5 out of 5 stars
4.5/5 (2122)
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
From Everand
The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
Ben Horowitz
Rating: 4.5 out of 5 stars
4.5/5 (359)
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
From Everand
Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
Ashlee Vance
Rating: 4.5 out of 5 stars
4.5/5 (481)
The Emperor of All Maladies: A Biography of Cancer
From Everand
The Emperor of All Maladies: A Biography of Cancer
Siddhartha Mukherjee
Rating: 4.5 out of 5 stars
4.5/5 (275)
Steve Jobs
From Everand
Steve Jobs
Walter Isaacson
Rating: 4.5 out of 5 stars
4.5/5 (821)
Bad Feminist: Essays
From Everand
Bad Feminist: Essays
Roxane Gay
Rating: 4 out of 5 stars
4/5 (1062)
Angela's Ashes: A Memoir
From Everand
Angela's Ashes: A Memoir
Frank McCourt
Rating: 4.5 out of 5 stars
4.5/5 (444)
The Yellow House: A Memoir (2019 National Book Award Winner)
From Everand
The Yellow House: A Memoir (2019 National Book Award Winner)
Sarah M. Broom
Rating: 4 out of 5 stars
4/5 (99)
Yes Please
From Everand
Yes Please
Amy Poehler
Rating: 4 out of 5 stars
4/5 (1961)
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
From Everand
Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
Gilbert King
Rating: 4.5 out of 5 stars
4.5/5 (273)
The World Is Flat 3.0: A Brief History of the Twenty-first Century
From Everand
The World Is Flat 3.0: A Brief History of the Twenty-first Century
Thomas L. Friedman
Rating: 3.5 out of 5 stars
3.5/5 (2283)
The Outsider: A Novel
From Everand
The Outsider: A Novel
Stephen King
Rating: 4 out of 5 stars
4/5 (1955)
The Art of Racing in the Rain: A Novel
From Everand
The Art of Racing in the Rain: A Novel
Garth Stein
Rating: 4 out of 5 stars
4/5 (4264)
A Tree Grows in Brooklyn
From Everand
A Tree Grows in Brooklyn
Betty Smith
Rating: 4.5 out of 5 stars
4.5/5 (1934)
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
From Everand
A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
Dave Eggers
Rating: 3.5 out of 5 stars
3.5/5 (233)
Team of Rivals: The Political Genius of Abraham Lincoln
From Everand
Team of Rivals: The Political Genius of Abraham Lincoln
Doris Kearns Goodwin
Rating: 4.5 out of 5 stars
4.5/5 (235)
On Fire: The (Burning) Case for a Green New Deal
From Everand
On Fire: The (Burning) Case for a Green New Deal
Naomi Klein
Rating: 4 out of 5 stars
4/5 (75)
Fear: Trump in the White House
From Everand
Fear: Trump in the White House
Bob Woodward
Rating: 3.5 out of 5 stars
3.5/5 (805)
Rise of ISIS: A Threat We Can't Ignore
From Everand
Rise of ISIS: A Threat We Can't Ignore
Jay Sekulow
Rating: 3.5 out of 5 stars
3.5/5 (141)
Manhattan Beach: A Novel
From Everand
Manhattan Beach: A Novel
Jennifer Egan
Rating: 3.5 out of 5 stars
3.5/5 (883)
The Unwinding: An Inner History of the New America
From Everand
The Unwinding: An Inner History of the New America
George Packer
Rating: 4 out of 5 stars
4/5 (45)
John Adams
From Everand
John Adams
David McCullough
Rating: 4.5 out of 5 stars
4.5/5 (2520)
The Constant Gardener: A Novel
From Everand
The Constant Gardener: A Novel
John le Carré
Rating: 3.5 out of 5 stars
3.5/5 (109)
Edexcel Gcse Computerscience Notes
Document
164 pages
Edexcel Gcse Computerscience Notes
Shakila.D Raks Pallikkoodam
100% (1)
06FlashMXHOT Symbols Instances
Document
45 pages
06FlashMXHOT Symbols Instances
Shakila.D Raks Pallikkoodam
No ratings yet
HTML Workbook Exercise
Document
12 pages
HTML Workbook Exercise
Shakila.D Raks Pallikkoodam
No ratings yet
T SC 1686919682 Robots Mind Map Ver 1
Document
1 page
T SC 1686919682 Robots Mind Map Ver 1
Shakila.D Raks Pallikkoodam
No ratings yet
Poster Computer Network
Document
1 page
Poster Computer Network
Shakila.D Raks Pallikkoodam
No ratings yet
Cambridge IGCSE: Mock 5 Assessment
Document
10 pages
Cambridge IGCSE: Mock 5 Assessment
Shakila.D Raks Pallikkoodam
No ratings yet
Flash Ch6
Document
4 pages
Flash Ch6
Shakila.D Raks Pallikkoodam
No ratings yet
Arm Micro Course - V2 PDF
Document
94 pages
Arm Micro Course - V2 PDF
Shakila.D Raks Pallikkoodam
No ratings yet
Planning Overview - Word Processing Skills
Document
2 pages
Planning Overview - Word Processing Skills
Shakila.D Raks Pallikkoodam
No ratings yet
Flash Ch4
Document
5 pages
Flash Ch4
Shakila.D Raks Pallikkoodam
No ratings yet
Guidelines
Document
9 pages
Guidelines
Shakila.D Raks Pallikkoodam
No ratings yet
3.6. Optimisation Algorithm
Document
18 pages
3.6. Optimisation Algorithm
Shakila.D Raks Pallikkoodam
No ratings yet
Artificial Intelligence Reading Comprehension
Document
2 pages
Artificial Intelligence Reading Comprehension
Shakila.D Raks Pallikkoodam
100% (1)
X-CTA-Practice Paper 2022-23
Document
13 pages
X-CTA-Practice Paper 2022-23
Shakila.D Raks Pallikkoodam
No ratings yet
From Platinum To Smartphone - How Maths Models Can Be Used To Streamline Supply Chains
Document
8 pages
From Platinum To Smartphone - How Maths Models Can Be Used To Streamline Supply Chains
Shakila.D Raks Pallikkoodam
No ratings yet
Clewell Check Understandfinal
Document
8 pages
Clewell Check Understandfinal
Shakila.D Raks Pallikkoodam
No ratings yet
Python Revision Flashcards
Document
6 pages
Python Revision Flashcards
Shakila.D Raks Pallikkoodam
No ratings yet
Databases Special Homework
Document
4 pages
Databases Special Homework
Shakila.D Raks Pallikkoodam
No ratings yet
Dijkdtra Algorithm
Document
2 pages
Dijkdtra Algorithm
Shakila.D Raks Pallikkoodam
No ratings yet
GCSE D&T Unit 1 Booklet
Document
32 pages
GCSE D&T Unit 1 Booklet
Shakila.D Raks Pallikkoodam
No ratings yet
Nyu Arctic Activity1 Worksheet
Document
5 pages
Nyu Arctic Activity1 Worksheet
Shakila.D Raks Pallikkoodam
No ratings yet
2.3.5. Path Finding Algorithms
Document
8 pages
2.3.5. Path Finding Algorithms
Shakila.D Raks Pallikkoodam
No ratings yet
Data Loss Questions
Document
1 page
Data Loss Questions
Shakila.D Raks Pallikkoodam
No ratings yet
Cambridge International AS & A Level: Computer Science 9608/22
Document
20 pages
Cambridge International AS & A Level: Computer Science 9608/22
Shakila.D Raks Pallikkoodam
No ratings yet
My Digital Career Worksheet Sue Keay
Document
4 pages
My Digital Career Worksheet Sue Keay
Shakila.D Raks Pallikkoodam
No ratings yet
Robots Student Worksheet
Document
3 pages
Robots Student Worksheet
Shakila.D Raks Pallikkoodam
No ratings yet
The Internet Info Worksheet
Document
2 pages
The Internet Info Worksheet
Shakila.D Raks Pallikkoodam
No ratings yet
Roboinsect Worksheet
Document
5 pages
Roboinsect Worksheet
Shakila.D Raks Pallikkoodam
No ratings yet
The Internet and The World Wide Web
Document
6 pages
The Internet and The World Wide Web
Shakila.D Raks Pallikkoodam
No ratings yet
Week 4 Worksheet Completed
Document
3 pages
Week 4 Worksheet Completed
Shakila.D Raks Pallikkoodam
No ratings yet
Little Women
From Everand
Little Women
Louisa May Alcott
Rating: 4 out of 5 stars
4/5 (105)