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
Lerok [7]
3 years ago
11

Consider the following program where the zu format specifier is used to display as an integer the result of sizeof. #include #in

clude typedef union { int *i1; int *i2; }U; int main() { U temp; int i = 50; temp.i1 = &i; printf("%zu and %d\n", sizeof(temp), *(temp.i2)); return 0; } What is the output of the program above? Note in the choices below indicates output that isn't any of the literal values in the code above.
Computers and Technology
1 answer:
Galina-37 [17]3 years ago
4 0

Answer:

4 and 50

Explanation:

To answer the question above, we are to first of all consider the size of union will be the max size of datatype in union data. I.E.

sizeof(int *) is 4 bytes

so, sizeof(U) = sizeof(temp) is 4

and we saved 50 in temp.i1. so, 50 we can access 50 from temp.i2 as well

so, output is 4 and 50

You might be interested in
Artie believes that all Asian people are more intelligent than other people. Artie is engaging in?
Luden [163]
Artie is Stereotyping
5 0
3 years ago
Read 2 more answers
A(an) _______ is a set of instructions that a computer follows to perform a task.
Vikentia [17]
A(an) _______ is a set of instructions that a computer follows to perform a task.Answer is Program .
I hope the answer of the question.
7 0
4 years ago
The function below takes a single string parameter: sentence. Complete the function to return a list of strings indicating which
Katena32 [7]

Answer:

import java.util.*;

public class num3 {

   public static void main(String[] args) {

   String sentence = "All good people";

       System.out.println("The vowels in the sentence are ");

       returnVowels(sentence);

   }

   public static void returnVowels(String word){

       String newWord = word.toLowerCase();

       String vowels ="";

       for (int i = 0; i < newWord.length(); i++){

           if(newWord.charAt(i)=='a'||newWord.charAt(i)=='e'||newWord.charAt(i)==i||

           newWord.charAt(i)=='o'||newWord.charAt(i)=='u'){

               vowels = vowels+newWord.charAt(i);

               //System.out.print(newWord.charAt(i)+" ");

           }

       }

     

       String [] chars = vowels.split("");

       Set<String> uniqueVowels = new LinkedHashSet<>();

       for (String s : chars) {

           uniqueVowels.add(s);

       }

       System.out.println(uniqueVowels);

   }

}

Explanation:

In Java

Create the method/function to receive a string as argument

Change the string to all small letters using the toLowerMethod

Iterate through the string using if statement identify the vowels and store in a new String

Since the sentence does not contain unique vowel characters, use the set collections in java to extract the unique vowels and print out

7 0
3 years ago
Why do companies send updates to devices
Luden [163]
To ensure that they are up to date and running smoother than before. Withought updates our devices wouldnt work properly the way they are supposed to!
3 0
4 years ago
If you want to develop an Android app, you need to become a registered developer with which platform?
Orlov [11]
C is the correct answer
3 0
3 years ago
Other questions:
  • Ideation includes all of the following EXCEPT
    5·1 answer
  • Who made the Apple company?
    9·2 answers
  • Select the correct answer.
    12·2 answers
  • Answer to this if you have apex legends on either pc xbox one or PS4 for the one that answers and does gets brainliest please do
    7·2 answers
  • A digital native is a person who has been exposed to technology at a(n) ___________ and is comfortable using it.a. old ageb. sch
    14·1 answer
  • C++ Language Use functions to solve all problems in the mentioned assignment
    12·1 answer
  • I think my knee....
    14·1 answer
  • It's 50 points.
    5·2 answers
  • Dgvdsgf cvdzgb fgvsdxchygfdrzvdszfgvsdzxd
    9·1 answer
  • Please please help I don’t understand this
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!