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
Which term means a cryptography mechanism that hides secret communications within various forms of data?.
andrezito [222]

Answer:

anything u have daling

Explanation:

6 0
2 years ago
Which of the following is a preferable method to secure wireless access in a SOHO?
NARA [144]
Use a Ghost program follow throught with 2hyttlg5:6\:56
6 0
3 years ago
The modulus ( % ) actually gives you the ___________ of an integer division problem.
Svetlanka [38]
The answer is (e) sum
7 0
4 years ago
A homeowner uses a smart assistant to set the house alarm, get packages delivery updates, and set time on the outdoor lights. Wh
ch4aika [34]

The example where the alarm of the house set up, delivery updated should be provided, etc should represent the function example of the artificial intelligence.

The following information related to artificial intelligence is:

  • It refers to the human intelligence where the machines could be treated as humans and according to this, the actions should be mimic.
  • It should be used for any kind of machine where the traits should be associated along with the mind of the human-like for learning & problem-solving purpose.

Therefore we can conclude that The example where the alarm of the house set up, delivery updated should be provided, etc should represent the function example of the artificial intelligence.

Learn more about the machine here: brainly.com/question/2555822

3 0
3 years ago
A computer mouse is an example of a(n)
Komok [63]
Input device

A cpu processes all your programs
An input device is something like a keyboard or mouse, when you use it it inputs data to the computer
An output device is something like your headphones
Software is a program that you run like microsoft word
8 0
3 years ago
Other questions:
  • Add is a function that accepts two int parameters and returns their sum.
    8·1 answer
  • Load the titanic sample dataset from the Seaborn library into Python using a Pandas dataframe, and visualize the dataset. Create
    10·1 answer
  • Fedora operating system
    9·1 answer
  • How do i find the greatest common factor of two numbers?
    14·1 answer
  • If I'm screen sharing and I plug in a HDMI, will it screen share what the HDMI is plugged into, and can you talk at the same tim
    11·1 answer
  • Cuales son las paginas web​
    12·1 answer
  • ¿que significa “TTAQMMQMPDATLSPLNDTMGCCLFEQMMPQTEIUMDR” ?
    5·2 answers
  • Did it surprise you to discover that the Sun is actually a star in the middle of its life cycle? Why or why not?
    8·1 answer
  • How is it possible for the router to know whether it is supposed to send a cat photo to your laptop
    5·1 answer
  • Given a list of syntax errors from a compiler, a programmer should focus attention on which error(s), before recompiling?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!