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
lidiya [134]
2 years ago
6

Design and implement a structured program for manipulating arrays data structures, as follow:

Computers and Technology
1 answer:
tekilochka [14]2 years ago
6 0

#include <stdio.h>

struct student {

char firstName[50];

int roll;

float marks;

} s[5];

int main() {

int i;

printf("Enter information of students:\n");

// storing information

for (i = 0; i < 5; ++i) {

s[i].roll = i + 1;

printf("\nFor roll number%d,\n", s[i].roll);

printf("Enter first name: ");

scanf("%s", s[i].firstName);

printf("Enter marks: ");

scanf("%f", &s[i].marks);

}

printf("Displaying Information:\n\n");

// displaying information

for (i = 0; i < 5; ++i) {

printf("\nRoll number: %d\n", i + 1);

printf("First name: ");

puts(s[i].firstName);

printf("Marks: %.1f", s[i].marks);

printf("\n");

}

return 0;

}

#◌⑅⃝●♡⋆♡Nåmřāthā ♡⋆♡●⑅◌

You might be interested in
Give an example of an if/else statment and a case statment that are equivalent. Your example should contain at least three choic
zimovet [89]

Answer:

The if - else and equivalent switch case statements in c++ language are given below.

if ( ch == 1 )

       cout << " sum is " << x + y << endl;

   else if ( ch == 2 )

       cout << " difference is " << x - y << endl;

   else if ( ch == 3 )

   {

       cout << " Quitting " << endl;

       exit;

   }

switch( ch )

   {

       case 1 :    cout << " Sum is " << x + y << endl;

                   break;

       case 2 :    cout << " Difference is " << x - y << endl;

                   break;

       case 3 :    cout << " Quitting " << endl;

                   break;

   }      

Explanation:

The above statements use three variables which are declared and initialized as shown.

int x = 10;

    int y = 25;

    int ch;

The above statements execute for of addition, subtraction or to quit the program.

cout << " 1. Addition " << endl;

    cout << " 2. Subtraction. " << endl;

    cout << " 3. Quit " << endl;

    cout << " Enter your choice " << endl;

The variable ch holds the numerical option entered by the user.

    cin >> ch;

For if - else statements, the if statement is executed based on the value of variable ch entered by the user. After execution, the compiler goes out of the statements automatically.

Following the if – else, if any statement is present, it will be executed.

For switch case, every case ends with break keyword. After the required case is executed based on the value of variable ch entered by the user, the break statement is executed which causes the switch case to terminate the control goes out of the statements.

Following the switch case, if any statement is present, it will be executed.

4 0
3 years ago
Select the answer that best describes the activity
Anastasy [175]

Answer:

software piracy

Explanation:

8 0
3 years ago
Read 2 more answers
You have recently been hired as the new network administrator for a startup company. The company's network was implemented prior
AleksAgata [21]

Answer: • Physically secure high-value systems

• Identify and document each user on the network

Explanation:

To develop a manageable network plan, the milestones include:

• prepare to document

• mapping network,

• protect your network

• network accessibility

• user access etc...

When identifying ways to protect the network, the tasks that should be completed are:

•®Physically secure high-value systems

• Identify and document each user on the network

4 0
3 years ago
Advantage of social media for today'​
Lyrx [107]

Answer:

This social media advantage helps your business in numerous ways: You get to know them better: When you know your audience better, you can deliver more valuable content to them. ... You provide better customer service: A direct connection with your audience allows you to resolve issues easier

Explanation:

(happy to help)

6 0
3 years ago
How can you assess a website for currency?
aliya0001 [1]

Answer:

By checking the page for dates showing when it was posted and when it was last revised

Hope this helps :)

<em>-ilovejiminssi♡</em>

6 0
3 years ago
Read 2 more answers
Other questions:
  • Under normal operations, cisco recommends that you configure switch ports on which vlan
    5·1 answer
  • Is cloud computing a hardware service used to keep computers working? True or False
    11·1 answer
  • A ____ is used to perform a forward-only (sequential) access of the data in the data source while a ____ is used to populate a d
    11·1 answer
  • Write a python function c that converts bitstring array back to an integer numpy array
    5·1 answer
  • Climax Medical Technology, a fast-growing global research firm, has accumulated so much client information that conventional dat
    15·1 answer
  • What is the term for a set of actions carried out on inputs?
    7·1 answer
  • All the crtl keys on the keyboard
    8·2 answers
  • Topic: Video Games
    15·1 answer
  • Why is internet download speed slower on a computer vs phone
    5·1 answer
  • PLEASE HELP
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!