Question

Visual Basic 1.Order the integer data types by their relative size and the decimal-type data types...

Visual Basic

1.Order the integer data types by their relative size and the decimal-type data types by their relative size. Give an example that can be encapsulated by that level, but not ones lower than it.

2.

How do the following structures differ in execution? Give an example of a task that might benefit from each structure.

a.     IF THEN

b.     IF THEN ELSE

c.     IF THEN ELSEIF THEN

d.     IF THEN ELSEIF THEN ELSE

e.     SELECT CASE

3.Write a function that will determine that a text string contains exactly one @ symbol and furthermore that the characters after that symbol contain at least one “.” that is not the first character nor the last. [Incidentally, this is important to e-mail validation]

0 0
Add a comment Improve this question Transcribed image text
Answer #1

// Recursive C++ program to check if a string is subsequence of another string

#include<iostream>

#include<cstring>

using namespace std;

// Returns true if str1[] is a subsequence of str2[]. m is

// length of str1 and n is length of str2

bool isSubSequence(char str1[], char str2[], int m, int n)

{

    // Base Cases

    if (m == 0) return true;

    if (n == 0) return false;

    // If last characters of two strings are matching

    if (str1[m-1] == str2[n-1])

        return isSubSequence(str1, str2, m-1, n-1);

    // If last characters are not matching

    return isSubSequence(str1, str2, m, n-1);

}

// Driver program to test methods of graph class

int main()

{

    char str1[] = "gksrek";

    char str2[] = "geeksforgeeks";

    int m = strlen(str1);

    int n = strlen(str2);

    isSubSequence(str1, str2, m, n)? cout << "Yes ":

                                     cout << "No";

    return 0;

}

Add a comment
Know the answer?
Add Answer to:
Visual Basic 1.Order the integer data types by their relative size and the decimal-type data types...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Visual Basic 2015: Extra 18-1 Use inheritance with the Inventory Maintenance Application Source Code: 1. frmNewItem.vb...

    Visual Basic 2015: Extra 18-1 Use inheritance with the Inventory Maintenance Application Source Code: 1. frmNewItem.vb Public Class frmNewItem Public InvItem As InvItem Private Sub frmNewItem_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.LoadComboBox() End Sub Private Sub LoadComboBox() cboSizeOrManufacturer.Items.Clear() If rdoPlant.Checked Then cboSizeOrManufacturer.Items.Add("1 gallon") cboSizeOrManufacturer.Items.Add("5 gallon") cboSizeOrManufacturer.Items.Add("15 gallon") cboSizeOrManufacturer.Items.Add("24-inch box") cboSizeOrManufacturer.Items.Add("36-inch box") Else cboSizeOrManufacturer.Items.Add("Bayer") cboSizeOrManufacturer.Items.Add("Jobe's") cboSizeOrManufacturer.Items.Add("Ortho") cboSizeOrManufacturer.Items.Add("Roundup") cboSizeOrManufacturer.Items.Add("Scotts") End If End Sub Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click If IsValidData() Then InvItem = New InvItem(CInt(txtItemNo.Text),...

  • Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C -...

    Question 1 An array is NOT: A - Made up of different data types. B - Subscripted by integers. C - A consecutive group of memory chunks. D - None of the choices. Question 2 How many times is the body of the loop executed? int i=1; while(true) { cout << i; if(++i==5) break; } A - Forever B - 4 C - 5 D - 6 E - 0 Question 3 What is wrong with the following piece of...

  • 1. program to use with number 1. 2. Comparing Python and Java Discussion Forum 14 days ago Use the Python...

    1. program to use with number 1. 2. Comparing Python and Java Discussion Forum 14 days ago Use the Python IDLE editor to create the source code for the "numberguess.py" pro- gram. This program is in the "Basic Python Pro- gramming" chapter in its "An Example Python Program: Guessing a Number" section. If you mistakenly create syntax errors, find and fix them. Run the program and test it with various values. Refer to the "numberguess.py Program document to see example...

  • 1. You are given a C file which contains a partially completed program. Follow the instructions...

    1. You are given a C file which contains a partially completed program. Follow the instructions contained in comments and complete the required functions. You will be rewriting four functions from HW03 (initializeStrings, printStrings, encryptStrings, decryptStrings) using only pointer operations instead of using array operations. In addition to this, you will be writing two new functions (printReversedString, isValidPassword). You should not be using any array operations in any of functions for this assignment. You may use only the strlen() function...

  • For this assignment, suppose that a fence is recording entry and exit into the park via...

    For this assignment, suppose that a fence is recording entry and exit into the park via a string as the gate swings open and folks walk in or out with their pet. For example, C++ DP+dp+CP+cp would indicate that an adult dog and an adult entered the park, then a puppy and child entered the park, then an adult cat and an adult entered the park and finally a kitten and a child entered the park. From this information, note...

  • The following guidelines outline the basic template for a robot vacuum cleaner game. The game must...

    The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use the following libraries: #include <math.h> #include <stdlib.h> #include <string.h> #include <limits.h> and any .graphics and .timers libraries. The guidelines are outlined as follows: Terminal Set-up: you may assume that the terminal will be quite large, for example, on the order of 150×50, or more. Status Display: The...

  • These are my answere to the following questions: are they right? 1. B 2. T 3....

    These are my answere to the following questions: are they right? 1. B 2. T 3. T 4. T 5. F 6. T 7. A 8. D 9. E 10. B 11. B 12. A 13. A 14. D 15. C 16. D 17. T 18. C 19. T 20. T 21. T 22. A 23. T 24. D 25. B 26. A 27. A 28. A 29. T 30. C 31. D 32. A 33. T 34. F 35....

  • Santa Monica College CS 20A: Data Structures with C++ Spring 2019 Name: True/False: Circle one Assignment...

    Santa Monica College CS 20A: Data Structures with C++ Spring 2019 Name: True/False: Circle one Assignment 1 ID: 1. True / False 2. True / False 3. True / False 4. True / False 5. True / False 6. True / False 7. True / False 8. True / False 9. True / False 10. True / False Variable and functions identifiers can only begin with alphabet and digit. Compile time array sizes can be non-constant variables. Compile time array...

  • The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use...

    The following guidelines outline the basic template for a robot vacuum cleaner game. The game must be implemented in c programming language. It mimics a robotic vacuum cleaner. The code must only use the following libraries: #include <math.h> #include <stdlib.h> #include <string.h> #include <limits.h> and any .graphics and .timers libraries. The guidelines are outlined as follows: Terminal Set-up: you may assume that the terminal will be quite large, for example, on the order of 150×50, or more. Status Display: The...

  • TEST 1: ANSWERS INTS EACH). This section takes around 5 minutes. Name Spring 2019 8) A researcher wants to determine whether female teachers give higher or lower grades, on average, then male t...

    TEST 1: ANSWERS INTS EACH). This section takes around 5 minutes. Name Spring 2019 8) A researcher wants to determine whether female teachers give higher or lower grades, on average, then male teachers. She picks a random sample by picking a random sample of schools, in the schools picked, picking a random sample of departments, and in the departments picked, picking a random sample of teachers. What kind of sampling was performed? d) voluntary response e) cluster b) stratified Random...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT