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
FinnZ [79.3K]
3 years ago
8

Suppose that I have the following function declaration:

Computers and Technology
1 answer:
I am Lyosha [343]3 years ago
6 0

Answer:

b. The function will execute slowly because "val", and the return value of the function will both require a lot of data copying. This is because C is call-by-value.

Explanation:

Given Function signature: struct x_struct my_function( struct x_struct val );

The function my_function takes a structure of type struct x_struct as arguments and returns a structure of the same type.

C make use of call by value. So it will involve a copy of the struct argument and the return value as part of function execution. This will slow down the speed of execution particularly if the size of the structure is large.So option b is the correct option.

You might be interested in
The Circle of Growth
larisa86 [58]

Answer:

B

Explanation:

it shows you your weaknesses so you can work on them so you can find your way to success

5 0
3 years ago
python (Business: check ISBN-10) An ISBN-10 (International Standard Book Number) consists of 10 digits: d1d2d3d4d5d6d7d8d9d10. T
iogann1982 [59]

Answer:

<em>The programming language is not stated;</em>

<em>However, I'll answer this question using C++ programming language</em>

<em>The program uses few comments; See explanation section for more detail</em>

<em>Also, the program assumes that all input will always be an integer</em>

#include<iostream>

#include<sstream>

#include<string>

using namespace std;

int main()

{

string input;

cout<<"Enter the first 9 digits of an ISBN as a string: ";

cin>>input;

//Check length

if(input.length() != 9)

{

 cout<<"Invalid input\nLength must be exact 9";

}

else

{

 int num = 0;

//Calculate sum of products

for(int i=0;i<9;i++)

{

 num += (input[i]-'0') * (i+1);    

}

//Determine checksum

if(num%11==10)

{

 input += "X";

 cout<<"The ISBN-10 number is "<<input;

}

else

{

 ostringstream ss;

 ss<<num%11;

 string dig = ss.str();

 cout<<"The ISBN-10 number is "<<input+dig;

}

}  

 return 0;

}

Explanation:

string input;  -> This line declares user input as string

cout<<"Enter the first 9 digits of an ISBN as a string: ";  -> This line prompts the user for input

cin>>input;  -> The user input is stored here

if(input.length() != 9)  { cout<<"Invalid input\nLength must be exact 9";  }  -> Here, the length of input string is checked; If it's not equal to then, a message will be displayed to the screen

If otherwise, the following code segment is executed

else  {

int num = 0; -> The sum of products  of individual digit is initialized to 0

The sum of products  of individual digit is calculated as follows

for(int i=0;i<9;i++)

{

num += (input[i]-'0') * (i+1);

}

The next lines of code checks if the remainder of the above calculations divided by 11 is 10;

If Yes, X is added as a suffix to the user input

Otherwise, the remainder number is added as a suffix to the user input

if(num%11==10)  {  input += "X";  cout<<"The ISBN-10 number is "<<input; }

else

{

ostringstream ss;

ss<<num%11;

string dig = ss.str();

cout<<"The ISBN-10 number is "<<input+dig;

}

}  

5 0
4 years ago
What is used to accurately position objects on the slide using a single horizontal and vertical line that intersects in the cent
oksian1 [2.3K]

Answer: Grids are a set of static horizontal and vertical lines with several intersection points that appear when you enable them on the slide. They can be used to accurately place or position the objects to bring out the visual feel on a slide.

8 0
3 years ago
Read 2 more answers
Please help me i’ll give you brainlist
Genrish500 [490]

answer: C

explanation: because it's the biggest of the given platforms

5 0
3 years ago
List any two programs that are required to play multimedia products
AnnyKZ [126]

Answer:

the two programs to play multimedia products are;windows media player and VLC media player and the two programs to create multimedia products are;photoshop and PowerPoint

3 0
3 years ago
Other questions:
  • HELP PLEASE
    7·2 answers
  • Your computer is configured to obtain an ipv4 address and dns server address automatically. what utility will help you to find t
    7·1 answer
  • What is one of the most helpful things about having a role model?
    10·2 answers
  • If, when asked for a date of birth, the user enters a future date, this error should be caught by a ________ check.
    8·1 answer
  • _____the measuring instrument is not necssery​
    10·1 answer
  • 25 POINTS PLATO
    6·2 answers
  • The sequence of Figures shows a pattern. if the pattern repeats, how many triangles will the figure 5 have ?​
    7·1 answer
  • How to get the lightning round in dares of eternity
    5·1 answer
  • The underlying color of a slide.
    9·1 answer
  • Why are pirated software considered a threat?​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!