VB Interview QUESTIONS.
VB Interview QUESTIONS.
10. Write a script which accepts p, t, r from the user & compute the Simple Interest
11. Write a script which accepts two numbers and prints the sum and product of these numbers
12. Write a VB script to accept 1st name, middle name and last name in separate input boxes and
display the output as shown below,
13. Write a VB script to accept first name, last name, age and date of birth of a user and display the
output as shown below,
11. Write a script to print all the odd and even numbers in a separate msgbox (from 1 to 20)
12. Write a VB script to print all the odd numbers between 100 to 200 in a single msgbox
13. Display the 1st 20 even numbers between 400 to 300
14. use do loop to compute the factorial of a number and continue if needed for more executions
15. Write a script to print 1 to 10 numbers using do – while in a single messagebox
16. Write a script to print 1st 10 even numbers between 200 to 300 in a single messagebox using
do – while loop
17. Write a program for finding out whether the given year is a leap year or not?
b) If average marks Greater than or equal to 60 and less than 75 , then grade is First
c) If average marks Greater than or equal to 50 and less than 60 , then grade is Second
d) If average marks Greater than or equal to 40 and less than 50 , then grade is Third
PATTERN MATCHING
1. Display a picture as shown below,
*
* *
* * *
* * * *
2. Display a picture as shown below,
* * * *
* * *
* *
*
3.Display the picture shown below
1
1 1
1 1 1
1 1 1 1
* * * *
* * * *
* * * *
* * * *
ARRAYS
1. Accept 5 numbers from an array and print the sum of them
2. Accept 5 numbers from an array and print them in the reverse order
3. DIFFERENCES between FOR & FOR EACH
1. Write a program to print a 2 * 2 matrix (2 rows, 2 columns)
2. Write a Program to print a matrix and also its transpose
3. VB Script to add 2 matrices
4. Accept ‘n’ numbers from the user & print the sum of them. Make use of ‘for each’ loop
5. Write the same program shown above making use of ‘UBOUND’ in FOR loop
6. Accept some of the city names from the user. Also accept the delimiter from the user that
separates each of the city names. Print each of the city names in separate message boxes using
SPLIT function.
7. Differences between FUNCTION & SUBROUTINE
8. Write a function to compute Simple Interest
9. Write a function to check whether the number is prime or not
10. Accept a string and display a message if the string is not having atleast 5 characters
11. Accept a string and print whether letter ‘A’ is present in it.
12. Accept 5 numbers & store in a array. Display highest among them
13. Accept a string & check if it is a palindrome or not
14. Accept 2 strings & print which is the greatest. If they are same, display the message accordingly
FSO
52.Write s program to Create a Folder
53. Write a VB Script to check if a folder exists or not
54. Write a VB Script to copy a folder from 1 location to another location
55.Accept a drive name (drive letter) & print the total size of it
56.Accept a folder name & display the date of creation, its name & total size of it
57. Write a Program to rename a new folder
58. Write a Program to display the drive name, free space & total size of it
59. Write a VB Script to open a file & perform basic read operations
60. Write a VB Script to read all the contents of a file & print each of the line in a separate msgbox
61. WRITE a script to enter some strings in a given file
EXCEL Operations
62. Write a VB Script to perform basic read operations from an excel file
63. Write a VB Script to perform basic write operations
64. Write a VB Script to set the font properties
65. Write a VB Script to generate all the color(s) between 1 to 56 in an Excel sheet
66. Write a VB Script to copy from 1 excel sheet to another
ASSIGNMENT PROGRAMS
1) Enhance program in PAGE 70 to check the existence of the given folder before creating it. If it exists -
then dont create the folder & display a message that folder already exists.
2) Modify the program in Page 70 to allow the copy only if the source folder is existing
4) Write a script to create a text file & print if it is successfully created or not
vfso.createtextfile "C:\temp.doc"
5) Write a script to display an output as show below for a given drive in a single msgbox,
Drive Name C
Total size X GB
Used space Y GB
Free space Z GB
in page 73,
9) Script to copy the contents of a file from 1 to another file without using copy file method
12) Write a script to handle file not found & path not found error