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
arlik [135]
4 years ago
8

Write a program that defines a type for a structure that stores information on a student in ENG EK 125. Declare two variables to

be this structure type, and call a function to initialize both of the structure variables, using call-by-reference.
Computers and Technology
1 answer:
Mashcka [7]4 years ago
8 0

Answer:

Following are the program in the C Programming Language.

#include<stdio.h> //header file

#include<string.h> //header file

struct student//creating structure

{

 //set integer variables

int marks;

int roll;

};

//define function

void initial(struct student *stu)

{

 //set integer type variables

int marks=420;

int roll_no=45,i;

stu->marks=marks;//assigning the values

stu->roll=roll_no;//assigning the values

}

//define main method to call the function

int main()

{

struct student stu;

initial(&stu);//calling the function

printf("Total marks : %d\n",stu.marks); //print output

printf("Roll No. : %d\n",stu.roll); //print output

return 0;

}

<u>Output:</u>

Total marks : 420

Roll No. : 45

Explanation:

Here, we define the structure "student" with a struct keyword for creating a structure.

  • inside the structure, we set two integer type variable "marks", "roll".

Then, we define a function "initial()" and pass an argument in the parameter of the function.

  • inside the function, we set two integer type variable "marks", "roll_no" and assign the value in the variable "marks" to 420 and variable "roll_no" to 45.
  • Assign the value in the structure's integer variables from the function's variable.

Finally, we set the main method inside it we call the function "initial()" and pass the value and then, we print the output with message.

You might be interested in
Analyzing computer systems to gather potential legal evidence is computer ________
hodyreva [135]
It is called computer forensics.
5 0
3 years ago
Select the correct answer. Arcade games such as Donkey Kong, Mr. Do! , and Venture were adapted from arcade titles to home conso
Andrew [12]

Answer:

D. Magnavox

hgjvyihbnjbuhklnk. hvgvjnm;lkbhkvkbl.

4 0
4 years ago
Given the data model, what would a CROSS JOIN
natta225 [31]

Every combination of each genre with each instrument, even those that are not represented in the genre_instrument table

Explanation:

The CROSS JOIN clause creates a combination of every row from two or more different tables. Determining the number of results in a result set for a CROSS JOIN is as simple as the product of the number of records in each table. 

3 0
2 years ago
By applying styles, _______ formats are being applied each time. A. various B. different C. the same D. similar
Dmitry [639]
I just took the test on (PF) it's C. the same

i hope this helped someone.
;-)
4 0
4 years ago
Read 2 more answers
that average july high temperature is 85 degrees fahrenheit in new york, 88 degrees fahrenheit in denver, and 106 degrees fahren
goblinko [34]

Answer:

public class num8 {

   public static void main(String[] args) {

       System.out.println("Average Temperature in New York is 85 degrees fahrenheit");

       System.out.println("Average Temperature in Denver is 88 degrees fahrenheit");

       System.out.println("Average Temperature in Phoenix is 106 degrees fahrenheit");

   // Calculating the new average Temperatures

       System.out.println("The New Average Temperature in New York " +

               "is "+ ((0.02*85)+85 )+ " degrees fahrenheit");

       System.out.println("The New Average Temperature in Denver " +

               "is " +((0.02*88)+88 )+ " degrees fahrenheit");

       System.out.println("The New  Average Temperature in Phoenix " +

               "is "+((0.02*106)+106 )+ " degrees fahrenheit");

   }

}

Explanation:

  1. Using Java first display the previous average temperatures for the three cities as given in the question
  2. Then calculates the new average temperature by multiplying by 0.02, because of a 2 percent increase in the average temperature
  3. Display the new temperature using the System.out,println

8 0
3 years ago
Other questions:
  • What wired channel, commonly used for cable tv, consists of an insulated copper wire wrapped in a solid or braided shield placed
    12·1 answer
  • Which css property is used to change the text color of an element?
    15·1 answer
  • Which description best explains a placeholder?
    7·1 answer
  • If you were looking for a record in a very large database and you knew the ID number, which of the following commands would be t
    10·1 answer
  • You can use the Ignore All button to ignore the current and all future occurrences of a flagged word. True or False
    5·1 answer
  • Which windows 10 edition can a device with windows 8 or 8.1 pro upgrade to
    5·1 answer
  • Which from the following list are an example of productivity software?
    7·2 answers
  • Erik is the president and owner of Watch Out, a local website development company that helps clients create and build unique web
    15·1 answer
  • Question 11 of 20
    8·1 answer
  • Which of the following Office Online apps is most effective for creating multi-media presentations?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!