COMPUTER SYSTEMS&MOD MSGT/ET SA AC PKG
COMPUTER SYSTEMS&MOD MSGT/ET SA AC PKG
3rd Edition
ISBN: 9780134671123
Author: Bryant
Publisher: PEARSON
Question
Book Icon
Chapter 6.2, Problem 6.8PP
Program Plan Intro

Given Information:

Three different functions are given:

Function-1:

/*clear1 function with a pointer variable and integer as arguments */

void clear1 ( point *p, int n)

{

//variable declaration

int i,j;

//traverse throughout the structure

for(i=0;i<n;i++)

for(j=0;j<3;j++)

  //multiply the point with velocity

  p[i].vel[j]=0;

      for(j=0;j<3;j++)

  //multiply the point with acceleration

  p[i].acc[j]=0;

}

}

Function-2:

/*clear2 function with a pointer variable and integer as arguments */

void clear2 ( point *p, int n)

{

//variable declaration

int i,j;

//traverse throughout the structure

for(i=0;i<n;i++)

for(j=0;j<3;j++)

  //multiply the point with velocity

  p[i].vel[j]=0;

  //multiply the point with acceleration

  p[i].acc[j]=0;

}

Function-3:

/*clear3 function with a pointer variable and integer as arguments */

void clear3 ( point *p, int n)

{

//variable declaration

int i,j;

//traverse throughout the structure

for(j=0;j<3;i++)

for(i=0;i<n;j++)

  //multiply the point with velocity

  p[i].vel[j]=0;

     for(i=0;i<n;j++)

  //multiply the point with acceleration

  p[i].acc[j]=0;

}

}

Blurred answer
Students have asked these similar questions
I need help making this EER diagram in Chen Notation.
In Java I have an input in a text file that I can't submit here. So, please use it as input.txt
Perceptual acuity, according to Ram Charan, explains how Ted Turner became the first CEO to recognize the potential of 24-hour news and thereby created CNN. a) True  b) False
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Operations Research : Applications and Algorithms
Computer Science
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Brooks Cole
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning