Home | CBSE X | CBSE XII | CBSE Results | Imp. Questions | Sample Papers | Question Bank
CBSE HOTS | Test Paper | Study Material | Projects | Syllabus | Download | Exam | Date Sheet | Admission | Contact
(Paper) Class XII Informatics Practices: Chapter Wise Papers (LIBRARY FUNCTIONS)
Email Newsletter
FREE SMS ALERTS
FACEBOOK ,
TWITTER
Class XII Informatics Practices Paper (Chapter Wise With Answer)
LIBRARY FUNCTIONS
1 Define the term Library Functions in Visual Basic. Name the
different categories of library functions available in Visual Basic. Give the
usage and syntax of any two library functions.
Sol.: Visual Basic offers many functions that are pre-defined or built-in
into the VB interpreter, which can be used directly in any program. These
functions are highly reliable and can tremendously reduce the amount of coding
required for a program.
Different categories are:
1. Numeric functions e.g Int(),Fix()
2. String functions e.g Mid(),Ucase()
3. Date Functions e.g Now(),date()
4. Miscellaneous function e.g Isdate(), Isnumeric()
Syntax of Mid Function
Mid ( string, start position, no. of char) : - Mid function is used to extract
characters from the middle of a string . We need three arguments : The original
string , the place to start extracting and the number of characters to extract.
Syntax of InStr function
InStr(start,string1,string2,compare):- Instr function searches for string within
string. Its first string is position in the string to start searching. The
second argument is the string to search in. The third argument is the string .to
search for and the last argument is whether or not you want a case-sensitive
search.(0 for yes, 1 for no) .
2. Write the output that the following code segment will generate :
x=”Class”
Print Mid (LTrim( “Computer Science” ),1,4)+”One”
Print(7*4>8+3) And (3^2 < 6/2)
Print Val(“l6 oranges”) + Len(x)
Print InStr(“Computers”, “ut”)
Sol.:
CompOne
False OR 0
21
5
3. Write the output that the following code segment will generate
Stringl = “Class XII”
String2 = “XI”
Print Stringl + String2
Print InStr (Stringl, String2)
Print Mid (LCase(Stringl), 6, 3 )
Print Int(4.7) + Len(String2)
Sol.:
Class XIIXI
7 OR 6
xi OR xii
6
4. Check that in the text box for Employee code (txtEmpCode) only numeric
data is entered.
sol.: If Not(IsNumeric(txtEmpCode.Text)) Then
Msgbox (“Please enter numbers only”)
End If
OR
If Not(Right(txtEmpCode.text,1) >= “0” And
Right(txtEmpCode.text,1) <=”9”) then
txtEmpCode.text = “” or msgbox(“Enter only numeric value”)
End if
5. Write a Visual, Basic procedure which takes a string as argument and
displays the following:
- The string in uppercase
- The length of the string
- The string with its first and last characters in uppercase and all the other
characters in lowercase.
Sol.: Sub Procname(str as string)
Dim newstr, L
Print UCASE (str)
L = LEN(str)
Print L
newstr = UCASE (LEFT(str, l)) OR (UCASE (MID (str,1,1))
+ LCASE (MID(str, 2, L-2))
+ UCASE(RIGHT(str, 1)) OR (UCASE (MID (str,L-l,1 ))
Print newstr
End Sub
Download Full Paper Here!
Get Your Dream Job.Post Your Resume Online.
Similar Entries by Tags
- Welcome to CBSEPortal.com
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (TRIGGERS)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (PROCEDURES/FUNCTIONS)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (CURSORS AND TRIGGERS)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (GETTING STARTED WITH PL/SQL)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (ORACLE SQL REVISION TOUR AND DATABASE FUNDAMENTALS)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (DATABASES AND ADO, OLE DB AND ODBC)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (VB INTERFACE STYLES)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (PROCEDURES, FUNCTIONS & MODULES IN VB)
- (Paper) Class XII Informatics Practices: Chapter Wise Papers (VISUAL BASIC REVISION TOUR AND CONTROL STRUCTURE)
Similar entries from the Class/EXAM
- (Syllabus) Madhya Pradesh Board : Class XII - Agriculture and Home Science
- (Paper) CBSE Class XII : Biology Exam Paper Year 2009 (Delhi)
- (Paper) CBSE Class XII : Chemistry Exam Paper Year 2009 (ISC Board)
- (Paper) CBSE Class XII : Computer Science Exam Paper Year 2009 (ISC Board)
- (Syllabus) Rajasthan Board : Class XII - English Literature
DTU DU LLB NCHMCT JEE NBE DNB CET Delhi UPGMEE DTU NDA PTU CET CSAT Orissa JEE CMC Vellore MHT-CET COMEDK UGET TANCET EAMCET NIPER JEE IPU CET BHU ENAT All about Entrance Exams & Admissions UPTECH AIIMS MBBS APSCHE CBEE LSAT KIITEE DUMET VEE GUJCET SRMEEE BSAUEEE BEEE NMAT MAH MBA CET AWES WAT IIT-JEE Springdales School Springdales School The Air Force School, Delhi The Air Force School, Delhi Divine Child International School Divine Child International School The Mother’s International School The Mother’s International School Bal Bharti Public School, Dwarka Bal Bharti Public School, Dwarka Birla Vidya Niketan Birla Vidya Niketan Sanskriti School Sanskriti School Tagore International School, Vasant Vihar Tagore International School, Vasant Vihar Delhi Public School, R.K Puram Delhi Public School, R.K Puram Mother Divine Public School Mother Divine Public School

















