08 Jun this is my quiz Iam taking now need quick answers
Question
this is my quiz Iam taking now need quick answers thanks
Question 1
- Unions…
permit different memory spaces to hold the same value permit the same memory space to hold different types permit different memory spaces to hold the same type permit the same memory space to hold different values simultaneously
10 points
Question 2
- #define COMBINE(x,y,z) ((x)>(z)?(y+x):(y-x))
What is the output of the following statement:
printf(“%d”,COMBINE(4,6,1));
2 -2 5 10
10 points (Extra Credit)
Question 3
- What is the purpose of enumeration
Define meaningful names for integer values Express real numbers with distinct name Assign unique names to variables Associate integer values with unqiue variables
10 points
Question 4
- #define MAX(x,y) ((x)>(y)?(x):(y))
This is an example of…
Switch macro Basic macro Conditional macro Parametrized macro
10 points
Question 5
- Preprocessor directives always begin with…
~ * # %
10 points
Question 6
- With preprocessor directives the preprocessor…
acts on the directives during compilation acts on the directives and removes the lines before compilation acts on the directives in place of compilation acts on the directives after compilation
15 points
Question 7
- What is the output of the following code
union
{
int di;
double dd;
} my_uid;
int main()
{
my_uid.di = 52;
my_uid.dd = 12.98;
printf (“%dn”, my_uid.di);
return 0;
}
12.98 -1889785610 The output is unpredictable 52
10 points
Question 8
- What is the output of the following code
typedef enum
{
red = 2,
blue = 4,
green,
yellow = 8
} color_t;
int main ( void )
{
color_t cur_color = green;
printf (“%dn”, cur_color);
return 0;
}
5 7 0 unknown (could be any integer)
15 points
Question 9
- Why is it a good idea to use structs with unions
To help indicate the current type of the stored data To provide a mechanism for changing the content of the union To prevent buffer overflows To ensure that syntax errors do not ocurr
10 points
Question 10
- Enumerations are always…
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Writedemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.