Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
103 views
in Computer by (95.2k points)
closed by

Which of the following Visual Basic statements will assign the value "QUICK" from the variable y to the string variable x ?

y = "THE QUICK RED FOX JUMPED OVER THE DOG" 


1. x = left (y,5)
2. x = Instr (5,y "QUICK")
3. x = mid (y,5,5) 
4. x = middle (y,5,5) 

1 Answer

0 votes
by (95.4k points)
selected by
 
Best answer
Correct Answer - Option 3 : x = mid (y,5,5) 

Concept:

Visual basic is an object oriented programming language used for the creation of type-safe. NET apps. It is a user friendly and event-driven programming language. It was created for the development of the web as well as mobile applications.

Explanation:

Visual basic has a mid function and a mid statement. These elements operate on a specified number of characters in a string but the mid function returns the characters while mid statement replaces the characters. 

Here to get the value QUICK from variable y we have to use the mid function.

y = "THE QUICK RED FOX JUMPED OVER THE DOG" 

x will be :

x = mid (y,5,5) 

it means, it starts from 5th character of the string and prints up to length 5 from that character and finally copies QUICK to variable x.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...