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
What specific authentication method has no encryption for user credentials or data, and is not recommended for most applications
GrogVix [38]

Answer:

PAP authentication method

Explanation:

PAP known as Pass word authentication protocol Basically, PAP works like a standard login procedure; the remote system authenticates itself to the using a static user name and password combination, so not recommended for applications.

6 0
3 years ago
A key benefit of inheritance is Group of answer choices an object can have several types, it is type compatible with any of its
NARA [144]

Answer:

A key benefit of inheritance is: an object can have several types, it is type compatible with any of its super classes

Explanation:

  • Inheritance is one of the fundamental concepts of Object Oriented Programming.
  • Inheritance allows classes (derived classes) to inherit the methods and properties of a class (base class).
  • The class or classes that inherits the characteristics from another class is called a derived class, child class or sub class. Derived class can also has it own methods and attributes additionally.
  • The class whose methods and properties are inherited by the derived class or classes is called a base class, super class or a parent class.
  • Benefit of inheritance is that inheritance new objects can take properties of existing objects and an object can have many types.
  • Also a child class can inherit from more than one super classes which is called multiple inheritance.
  • Multiple inheritance allows a class to implement more than one abstract classes.
  • An object can have several types. These types can be of an object's own class and also other types which include all classes that a class inherits.
  • If a variable is declared to be the type of super class then value of that variable can refer to any instance that instantiated from any class that inherits that super class. This means that an object is type compatible with an of its super classes.
8 0
3 years ago
_____________ is the characteristic of a resource that ensures that access is restricted to only permitted users, applications,
Maksim231197 [3]

Answer:

The answer to this question is "Confidentiality".

Explanation:

The answer is Confidentiality because in any computer system many files are important for there user. If the file was deleted, corrupted or stolen from the computer. So the user faces the difficulty to avoid this type of problem computer system provides a technique that is access control or it is also known as Confidentiality. It is a technique that controls who or what type of user's use of resources in a computing environment.

So the answer to this question is Confidentiality.

4 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
Sonja [21]

An AI algorithm helps you trust the solutions that are being provided by Al systems.

<h3>What is AI?</h3>

AI is an acronym for Artificial Intelligence which is also known as Machine learning (ML) and it can be defined as a subfield in computer science that's focused on the use of advanced computer algorithms and technology to develop a smart computer-controlled robot with the abilities to proffer solutions to complex problems.

In Computer technology, an Artificial Intelligence (AI) algorithm helps you trust the solutions that are being provided by Al systems.

Read more on Artificial Intelligence here: brainly.com/question/25523571

#SPJ1

7 0
3 years ago
TV stations in the U.S. normally broadcast horizontally-polarized signals. Is this TV antenna mounted correctly, or should it be
Marrrta [24]

Answer:basic computer skills

Explanation:

How to passed my test

3 0
4 years ago
Other questions:
  • Convot the following biliary number into decimal form using any method ? (1010.100)2
    8·1 answer
  • _____ is the standard that enables wireless devices to access web-based information and services. world wide web tcp/ip ethernet
    5·1 answer
  • Can someone please help with two? I will mark brainlest!!!
    12·1 answer
  • You need to write a class called SingleItemBox (in a file called SingleItemBox.java that you create). This class has a construct
    6·1 answer
  • I NEED HELP ASAP:
    8·1 answer
  • Samuel loves playing the violin, but he feels embarrassed after a classmate posts a video on a social networking site making fun
    6·2 answers
  • What is the output?<br> &gt;&gt;&gt; password = "sdf#_356"<br> &gt;&gt;&gt; password.isalnum()
    8·2 answers
  • What is the purpose of a report?
    6·2 answers
  • When a client PC is booted, it broadcasts a __________________________ message over the network to locate DHCP servers on the sa
    13·1 answer
  • why is it important for software manufacturers to update their programs to work with the latest operating systems? compuscholar
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!