1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
antoniya [11.8K]
3 years ago
8

Write the following function without using the C++ string class or any functions in the standard library, including strlen(). Yo

u may use pointers, pointer arithmetic or array notation.
Write the function first Of Any(). The function has two parameters (str1, str2), both pointers to the first character in a C-style string. You should be able to use literals for each argument. The function searches through str1, trying to find a match for the first character inside str1 that does NOT appear inside str2. Return the index of the first character in str1 that does not appear inside str2. Note that if all of the characters in str1 appear in str2, then return the length of the C-String s1. (This will happen automatically if you write function correctly.)
Computers and Technology
1 answer:
belka [17]3 years ago
6 0

Answer:

See explaination

Explanation:

#include<iostream>

using namespace std;

const char* firstOfAny(const char *str1,const char *str2){

const char *p=str1;

while((*p)!='\0'){

const char *q=str2;

while((*q)!='\0'){

if((*p)==(*q)){return p;}

q++;

}

p++;

}

return p;

}

int main(){

cout<<firstOfAny("ZZZZuker","aeiou");

cout<<endl;

cout<<firstOfAny("ZZZzyx","aeiou");

return 0;

}

You might be interested in
A ____ is harmful computer code that spreads without your interaction, slipping from one network to another and replicating itse
blondinia [14]
Malware is the answer

3 0
4 years ago
You have stumbled on an unknown civilization while sailing around the world. The people, who call themselves Zebronians, do math
marshall27 [118]

Answer:

a. 6 bits

b. 1

Explanation:

Ans (a)

40 Characters need to be represent by binary coded Zebronian (BCZ) , So You will need 6 bits.

5 bits wold only give you 32 = 2 x 2 x 2 x 2 x 2 unique characters.

So 6 bits would allow you to represent 64 characters.

Ans(b)

BCD = Binrary Coded Decimal is very common in electronics, particularly it displays numerical data.

BCD Encodes each digit of a decimal number into 4 digit binary form.

Each decimal digit is indiviidually converted to oits binary equivalent

For Example : 146 , the decimal degits are replaced by 0001 , 0100 and 0110 respectively

Addition

1 0 = 10 is binary value of 2 2

+1 1 = 11 is binary value of 3 + 3

---------- -----------

1 0 1 5 Ans

Subtraction

1 1= binary value of 3 3

- 1 0 = binary value of 2 - 2

--------- -----------

0 1 1 Ans

6 0
3 years ago
Frequently used commands can be placed in or on the _____ in the top left corner of the window.
podryga [215]

Answer:

b. Quick Access Toolbar                                        

Explanation:

  • Quick Access Toolbar is a customizable toolbar that is displayed in Microsoft Excel, Microsoft Word, and other Office products.
  • It appears in the top left corner of the window by default.  
  • QAT provides with quick access to frequently used features e.g. the Save, Undo, Redo features.
  • When you click on the drop down menu of QAT, it allows you to customize QAT. This enables you to add and remove the commands that are displayed in the toolbar. These are default commands however, it allows you to add your own commands. You can add commands to the QAT that you frequently use. You can import or export these modifications.
  • For example Excel Quick Access Toolbar contains only 3 buttons by default Save, Undo and Redo.

7 0
3 years ago
Which component of an email gives the recipient an idea of the email’s purpose and urgency?
Delvig [45]

Answer:

subject line

Explanation:

it is a brief description of what the email subject is.

4 0
3 years ago
If an engine has four cylinders and a total of 16 valves, how many valves would each cylinder have?
wel
4 because 4 x 4=16. Easy. I like to think of it as multiplication.
4 0
3 years ago
Other questions:
  • In which type of land contract does the seller earn interest on the difference between what the seller owes on an existing loan
    14·1 answer
  • Asian-American men are often represented in the media as _____.
    8·2 answers
  • You are the network administrator for a school system. Your boss informs you that she is thinking of implementing a BYOD program
    15·2 answers
  • Which type of error is a random error
    13·2 answers
  • Complete the below method, isPalindrome(), that takes in a String and returns a boolean. The boolean should be true if the Strin
    7·1 answer
  • WILL GIVE BRAINLIEST
    15·1 answer
  • Por que se dice que la tecnología ha tenido muchos aportes positivos para la sociedad pero también nos ha hecho dependientes de
    9·1 answer
  • An ALGORITHM IS?<br> PLEASE HELP
    14·1 answer
  • An analogue sensor has a bandwidth which extends from very low frequencies up to a maximum of 14.5 kHz. Using the Sampling Theor
    9·2 answers
  • write the files used on QBASIC (If u will answer right answer I will follow U and U will got 40 points)​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!