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
Which of the following correctly stores 45 squared in the variable x?
timama [110]

Answer:

x = 45

x = x ** 2

6 0
3 years ago
The four smallest numbers (40 points) Write an ANNA assembly program (smallest_four.ac) that finds the four smallest numbers ent
kari74 [83]

Answer:

the answer is -25

Explanation:

6 0
2 years ago
Write a program that reads a 4-bit binary number from the keyboard as a string and then converts it into decimal. For example, i
adell [148]

Answer:

import java.util.Scanner;

public class ss11{

       public static void main (String[]args) {

             Scanner keyboard = new Scanner (System.in)

             String a1, a2, a3, a4, a5;

              int i1, i2, i3, i4, i5;

              System.out.println("Enter a four bit binary number:");

               a1= keyboard.next();

               a2= a1.substring(0,1);

               a3= a1.substring(1,2);

               a4= a1.substring(2,3);

               a5= a1.substring(3,4);

                i1 = Integer.parseInt(a2);

                i2 = Integer.parseInt(a3);

                i3 = Integer.parseInt(a4);

                i4 = Integer.parseInt(a5);

                i1= i1 * 8;

                i2= i1 * 4;

                i3= i1 * 2;

                i4= i1 * 1;

                i5= i1+i2+i3+i4;

                System.out.println("The converted decimal number is: +i5);

}

}

Explanation:

7 0
3 years ago
What is one advantage of using object-oriented programming?
maxonik [38]
That answer would be B hope it helps
6 0
3 years ago
Read 2 more answers
If one employee is assigned to a project and each project has only one employee working on it, there is a(n) ____ relationship b
Len [333]

Answer:

One-to-one is the answer because there is one project and one employee working on one project.

5 0
2 years ago
Other questions:
  • In this scenario, what is the importance of anti-virus software and other similar virus protection programs?
    11·1 answer
  • What is the output of the following code? public class Test { public static void main(String[] args) { String s1 = new String("J
    9·1 answer
  • In which of the following situations will a macro make your work more efficient?
    9·1 answer
  • In Python, if var1 = "Happy" and var2= "Birthday" and var3 = (var 1+var2) *2, then var3 stores the string
    6·1 answer
  • Which database item would show details such as a customer’s name, their last purchase, and other details about a customer?
    11·2 answers
  • In the view that follows, which field can't be updated create view example_2 as select invoice_number, invoice_date, invoice_tot
    13·1 answer
  • Interactive sites where users write about personal topic and comment to threaded discussion are called?
    10·2 answers
  • Write a for loop that computes the following sum: 5+10+15+20+...+485+490+495+500. The sum should be placed in a variable sum tha
    7·1 answer
  • Write a Python program string_functions.py that defines several functions. Each function re-implements Python's built-in string
    9·1 answer
  • ___ is a career discipline focusing on helping companies use computer technology effectively.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!