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
Harlamova29_29 [7]
3 years ago
9

A structure, in C, has been given by: struct MYSTRUCT { char buf[15] shorts S int i; } * Select the proper keywords in the prope

r order) needed to declare, in C, an array of 8 structures (called MYSTR) of type MYSTRUCT. * Choose the following the expression for accessing Element 4 (i.e., index 4) of the char array (BUF) in the third element (i.e., index 3) of MYSTR. * Choose the statement to declare, in C, a pointer called MYSPTR that points to a structure of type MYSTRUCT. * Select the proper method to access the short, S, in a structure pointed to by MYSPTR by de-referencing the pointer.*Select the proper method to access the short, S, in a structure pointed to by MYSPTR by using the shorthand notation.
Computers and Technology
1 answer:
vodka [1.7K]3 years ago
7 0

Answer:

MYSTRUCT myStruct[8]; // statemnt to create an array of struct variables

myStruct[3].buf[4] // statement to access the fourth element of the array of the struct variables.

struct * MYSPTR = &myStruct; // This statement creates a pointer.

To dereference and access the S variable of the struct data structure in the array;

(*MYSPTR).S and its shorthand notation MYSPTR -> S

Explanation:

A structure is a data structure in C language that is used to hold descriptive data of an object. The keyword struct is used to create the structure. An array of struct holds instances of a struct variable, where each struct can be accessed using the regular array indexing and the variables of the structs in the array can be accessed using dot notation.

You might be interested in
How do i put pics on this app ​
natka813 [3]
It says insert image I think. Or there’s a button that looks like a picture
6 0
4 years ago
The involvement of the United States in the ______ and ______ resulted in _______ .
Aleksandr-060686 [28]

The involvement of the United States in the <u>Iraq</u> and <u>Kuwait conflict</u> resulted in <u>Persian Gulf War</u>.

<h3>What is the Persian Gulf War?</h3>

The Persian Gulf War can be defined as an international conflict that was led by the United States of America alongside the forces of the United Nations (UN) against the larger state of Iraq, in response to her invasion and annexation of the smaller country of Kuwait.

In this context, we can infer and logically deduce that the involvement of the United States in the <u>Iraq</u> and <u>Kuwait conflict</u> resulted in <u>Persian Gulf War</u>.

Read more on Persian Gulf War here: brainly.com/question/1105731

#SPJ1

8 0
3 years ago
Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is
vlabodo [156]

Answer:

C++:

C++ Code:

#include <iostream>

#include <string>

using namespace std;

struct date

{

  int d,m,y;

};

int isLeap(int y)

{

  if(y%100==0)

  {

      if(y%400==0)

      return 1;

      return 0;

  }

  if(y%4==0)

  return 1;

  return 0;

}

int day_no(date D)

{

  int m = D.m;

  int y = D.y;

  int d = D.d;

  int i;

  int mn[13] = {0,31,28,31,30,31,30,31,31,30,31,30,31};

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

  {

      d += mn[i];

  }

  if(isLeap(y))

  {

      if(m>2)

      d++;

  }

  return d;

}

date get_info(string s)

{

  date D;

  int i,p1,p2,l = s.length();

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

  {

      if(s[i] == '-')

      {

      p1 = i;

      break ;

      }

  }

  for(i=p1+1;i<l;i++)

  {

      if(s[i] == '-')

      {

      p2 = i;

      break ;

      }

  }

 

  D.m = 0;

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

  D.m = (D.m)*10 + (s[i]-'0');

 

  D.d = 0;

  for(i=p1+1;i<p2;i++)

  D.d = (D.d)*10 + (s[i]-'0');

 

  D.y = 0;

  for(i=p2+1;i<l;i++)

  D.y = (D.y)*10 + (s[i]-'0');

 

  return D;

 

}

int main()

{

  string s1 = "4-5-2008";

  string s2 = "12-30-1995";

  string s3 = "6-21-2000";

  string s4 = "1-31-1500";

  string s5 = "7-19-1983";

  string s6 = "2-29-1976";

 

  cout<<"Date\t\tDay no\n\n";

  cout<<s1<<"\t"<<day_no(get_info(s1))<<endl;

  cout<<s2<<"\t"<<day_no(get_info(s2))<<endl;

  cout<<s3<<"\t"<<day_no(get_info(s3))<<endl;

  cout<<s4<<"\t"<<day_no(get_info(s4))<<endl;

  cout<<s5<<"\t"<<day_no(get_info(s5))<<endl;

  cout<<s6<<"\t"<<day_no(get_info(s6))<<endl;

 

 

  return 0;

}

Explanation:

4 0
3 years ago
Rasha is working in QuickBooks as a heavy storm begins. Her building is notorious for losing power during storms, so she wants t
Anestetic [448]

Answer:

B.

Explanation:

Manually Back Up:

1. File Menu and click Back Up

2. Click Back Up Company.

3. Click Browse if you wanna a specific location o change the name. Then click Save.

5 0
3 years ago
Read 2 more answers
What is wifi calling???
Nutka1998 [239]
You may be talking about calling via WiFi, that is where you use WiFi to call people. That is normally used in tablets where you can't have a phone provider, so you just use WiFi to call and that saves a lot of money.
7 0
4 years ago
Read 2 more answers
Other questions:
  • What kinds of online behaviors could be considered cyberbullying?
    7·2 answers
  • Stella likes using social networking websites. Which Netiquette practice should Stella follow?
    9·2 answers
  • Alisha's teacher usually includes lots of comments on student tests to help them understand why their answers were
    8·2 answers
  • Select the correct answer. Tom recently visited a science exhibition where he learned that computer experts programmed robots to
    6·2 answers
  • Why is statistics important for business professionals in many career fields?
    13·2 answers
  • Write a program that grades the written portion of the driver's license exam. The exam has 20 multiple choice questions (answers
    10·1 answer
  • Greg works outside. He is often found cutting grass and making the local park grounds look nice for guests.
    10·1 answer
  • What word describes a violation of copyright laws? What rights do copyright holders have over their work of art
    5·2 answers
  • Worksheet-I • Make a list of 10 application software and 5 utility programs installed in your computer, along with their uses. U
    9·1 answer
  • How does abstraction make programming languages easier to use
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!