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]
4 years ago
9

Add the following functions to the code:

Computers and Technology
1 answer:
artcher [175]4 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
How do I cancel a friend request?
dusya [7]

Answer:

By pushing cancel

Explanation:

It's simple

3 0
3 years ago
Read 2 more answers
All margins of a report are _____ inch. *<br><br> 1<br> 2<br> 3<br> 4
MA_775_DIABLO [31]

Answer:

The answer is "1 inch"

Explanation:

The margin is also known as space, it is the distance between the document 's text and edge. In default, its distance is 1, and it also allows you to customize, the new document, which is set to standard.

  • In other words, we can say that it implies the one-inch gap between the text and each edge, which is based on your specifications.
  • It also allows you to customize the margin size of the document, and other choices were wrong because it is the customize size.

6 0
3 years ago
De dónde proviene la mayoría de cosas que utilizamos en el hogar​
Mashutka [201]

Answer:

La mayoría de las cosas que utilizamos en el hogar proviene de distintas industrias ubicadas a lo largo y ancho del mundo, dado que vivimos en un mundo globalizado e industrializado, en el que las distintas naciones intercambian bienes y servicios a través del comercio internacional.

De esta manera, en los distintos hogares hay cosas de diversos orígenes, como electrodomésticos provenientes de China, Japón o los Estados Unidos, muebles provenientes de México o Suecia, alimentos provenientes de Argentina, etc.

7 0
3 years ago
Animation affects can be applied on both................ and................ on a slide​
babunello [35]
Answer: Animation effects can be applied on both (text and graphics) on a slide.

hi!
3 0
3 years ago
By default Windows desktop displays
ankoles [38]
Every time Windows starts, or unlocks from the start screen, the Start Button and Task Bar is always displayed by default.

You will also see, the system tray and desktop background but these vary based on the amount of apps installed and user choice of wallpaper, so wouldn't necessarily count as defaults. 
3 0
3 years ago
Other questions:
  • The amount of money you can charge to a credit card is called
    7·1 answer
  • In steps<br> Urgent please
    14·1 answer
  • Compare the logical link control and the media access control. Which of the following is a correct statement?
    7·2 answers
  • While interoperability and unrestricted connectivity is an important trend in networking, the reality is that many diverse syste
    12·1 answer
  • ____ includes any attempt to intentionally conduct dishonest activities online.
    5·1 answer
  • Your it department enforces the use of 128-bit encryption on all company transmissions. your department also protects the compan
    13·1 answer
  • Q: If a program is invoked with "python program.py -r input.dat output.dat", what are the elements of argv?
    10·1 answer
  • Is jesus dead or alive
    11·1 answer
  • A restaurant recorded the ages of customers on two separate days. You are going to write a program to compare the number of cust
    5·1 answer
  • Michael is stuck due to an electric shock generated at the fridge. What should you do to save michael?.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!