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
frozen [14]
3 years ago
9

Add the following functions to the code:

Computers and Technology
1 answer:
artcher [175]3 years ago
7 0

Answer:

See explaination

Explanation:

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

void oddsOnly(char* str)

{

int i;

for (i = 0;i < strlen(str);i++)

{

if(i%2 != 0)

{

str[i/2] = str[i];

}

}

str[i/2] = '\0';

}

char* mySubstring(char* string ,int beginIndex,int endIndex)

{

char* new_string = malloc(endIndex- beginIndex);

for (int i = beginIndex ;i < endIndex;i++)

{

new_string[i -beginIndex] = string[i];

}

new_string[endIndex] = '\0';

return new_string;

}

int main(void)

{

char str[] = "hello there";

oddsOnly(str);

char* str1 = mySubstring("smiles",1,5);

printf("%s\n",str);

printf("%s\n",str1);

}

You might be interested in
__________ are the first line of defense against unsafe drivers.
vova2212 [387]
Peace officers are the first line of defense against unsafe drivers. These officers are appointed for a specific purpose of upholding law and order, so they would be the ones who are there to help you in case of an accident caused by unsafe drivers. A peace officers is just another term for a law enforcement officer, or just the police.
5 0
2 years ago
In a study on software license infringement, those from United States were significantly more permissive than those from the Net
daser333 [38]

Answer:

The answer is "False"

Explanation:

In the given statement some information is missing, that is options "true or false", which can be described as follows:

The software suite breach has become a lawful effort, that arises as just a consequence of piracy, in which the court charges resulting as a condition of piracy is the patent license violation charge. Its use, replication or sharing of proprietary technology is not allowed as online piracy.

  • It enables firms to provide their operating systems more effectively.  
  • In this the US was rather more strict, than the Netherlands and other countries, that's why the given statement is false.
8 0
2 years ago
So im new how exactly does this point system work???​
lapo4ka [179]

Answer:

Ok so basicly every time you see a question and you can answer it you press on the answer bar you type in your answers then you will automaticly get points depending on the question you answer, you need to get more than 5+ to ask a question  of your own

Explanation:

5 0
2 years ago
Sarah maintains a blog about her soap-making business, and she has hired someone to create a database for this business. She mak
ivann1987 [24]
The database planner would most likely create a table that contains customer contact information since these would be the individuals who placed an order for Sarah's products after visiting her blog. 
4 0
2 years ago
To what are multiple servers arranged in racks related
qaws [65]

Various number of servers placed in racks are related to Rack servers in data center.

Explanation:

In data center commonly used server is Rack servers.  Servers are being arranged in the mounted racks are generally called as rack servers in the data center. Internal fans are being fitted inside the racks make the servers to make a good airflow and maintain the cooling. There are different types of racks available the user can choose based on their requirement.

5 0
2 years ago
Read 2 more answers
Other questions:
  • Let's say you're creating a search stream in your hootsuite dashboard, to find mentions of the phrase vacation holiday getaway.
    15·1 answer
  • Most Internet users access commercial websites, which have higher-quality information because of higher editing standards and th
    12·1 answer
  • A _____ defines what must take place, not how it will be accomplished.​
    12·1 answer
  • Csc105 final graded project
    9·1 answer
  • What are 25 items that trees made?
    6·2 answers
  • a pair of shoes is on sale for 15% off with this discount customers will pay $9 if they buy the shoes ​
    14·1 answer
  • HELP ASAP, AND YES I KNOW, WRONG CATEGORY. SORRY!
    10·2 answers
  • Which requires large computer memory?
    15·1 answer
  • How would you want to change the copyright laws?
    11·1 answer
  • KELLY Connect
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!