Ask Computer Engineering Expert

Question 1 

________may contain different data types.

Question 1 options:

 

a)

structures

 

b)

arrays

 

c)

both a and b

 

d)

none of these

 

Question 2 

 

What does the deck[52] array contain in the following statement?

 struct card a, deck[52], *cPtr;

Question 2 options:

 

a)

card structure elements

 

b)

a structure elements

 

c)

*cPtr elements

 

d)

none of these

 

Question 3 

 

Keyword __________ introduces the structure definition.

Question 3 options:

 

a)

structure

 

b)

str

 

c)

strdef

 

d)

struct

 

Question 4 

 

What does the following statement do?

struct card a = { "Three", "Hearts" };

Question 4 options:

 

a)

It creates a variable card of type struct with two members specified in the list.

 

b)

It creates two variables named Three and Hearts of type struct card a.

 

c)

It creates a variable a to be of type struct card and initializes it to the values in the list.

 

d)

It creates two variables named Three and Hearts of type struct card.

 

Question 5 

 

Creating a new name with typedef __________.

Question 5 options:

 

a)

creates a new type

 

b)

creates a new type name

 

c)

creates a new variable

 

d)

creates a new variable name

 

Question 6 

 

A string array

Question 6 options:

 

a)

stores an actual string in each of its elements

 

b)

can only provide access to strings of a certain length

 

c)

is actually an array of pointers

 

d)

is always less memory efficient than an equivalent double-subscripted array

 

Question 7 

 

Assuming that t is an array and tPtr is a pointer to that array, what expression refers to the address of element 3?

Question 7 options:

 

a)

*( tPtr + 3 )

 

b)

tPtr[ 3 ]

 

c)

&t[ 3 ]

 

d)

*( t + 3 )

 

Question 8 

 

Given that k is an integer array starting at location 2000, kPtr is a pointer to k, and each integer is stored in 4 bytes of memory, what location does kPtr + 3 point to?

Question 8 options:

 

2003

 

2006

 

2012

 

2024

 

Question 9 

Which of the following can have a pointer as an operand?

Question 9 options:

 

a)

++

 

b)

*=

 

c)

%

 

d)

/

 

Question 10 

Preprocessing occurs

Question 10 options:

 

a)

before a program is compiled.

 

b)

during compilation.

 

c)

after compilation but before execution.

 

d)

immediately before execution.

 

Question 11 

The #include preprocessor directive causes a(n) ____________ to be included in place of the directive.

Question 11 options:

 

a)

copy of a file

b)

# character 

 

c)

pointer to a file

 

d)

constant

Question 12 

Which of the following statements is correct?

Question 12 options:

 

a)

#define X = 3

 

b)

#define X 3, Y 4

 

c)

#define X 3

 

d)

#define X:3

 

Question 13 

If the macro

       #define RECTANGLE_AREA( x, y ) ( ( x ) * ( y ) )

has been defined.  Then the line

       rectArea = RECTANGLE_AREA( a + 4, b + 7 );

will be expanded to

Question 13 options:

 

a)

rectArea = 11;

 

b)

rectArea = ( a + 4 * b + 7 );

 

c)

rectArea = ( ( a + 4 ) * ( b + 7 ) );

 

d)

RECTANGLE_AREA( a + 4 , b + 7 );

 

Question 14 

Which of the following is not a valid directive?

Question 14 options:

 

a)

#endif

 

b)

#if

 

c)

#for

 

d)

#elif

Question 15 

You can use an assignment statement to copy the contents of one struct into another struct of the same type.

Question 15 options:

 

True

 

False

 

Question 16 

The components of a struct are called the ____ of the struct.

Question 16 options:

 

variables

 

identifiers

 

elements

 

members

 

Question 17 

Which of the following struct definitions is correct in C?

Question 17 options:

 

struct studentType
{
    int ID;
};

 

struct studentType
{
    string name;
    int ID;
    double gpa;
}

 

int struct studentType
{
    ID;
}

 

struct studentType
{
    int ID = 1;
};

 

 

Question 18 

Consider the following struct definition:

struct rectangleData

{

    double length;

    double width;

    double area;

    double perimeter;

};

Which of the following variable declarations is correct?

Question 18 options:

 

struct rectangle rectangleData;

 

struct rectangleData;

 

struct rectangleData myRectangle;

 

rectangleData rectangle;

 

Question 19 

Typically, in a program, a struct is defined ____ in the program.

Question 19 options:

 

in the main function

 

before the definitions of all the functions

 

after the definitions of all the functions

 

in any function

Question 20 

An array name and index are separated using ____.

Question 20 options:

 

curly brackets

 

square brackets

 

a dot

 

a comma

 

Question 21 

The syntax for accessing a struct member is structVariableName____.

Question 21 options:

 

.memberName

 

*memberName

 

[memberName]

 

$memberName

Question 22 

Consider the following statements:

struct rectangleData

{

    double length;

    double width;

    double area;

    double perimeter;

};

struct rectangleData bigRect;

Which of the following statements correctly initializes the component length of bigRect?

Question 22 options:

 

bigRect = {10};

 

bigRect.length = 10;

 

length[0]= 10;

 

bigRect[0]= 10

 

Question 23 

You can assign the value of one struct variable to another struct variable of ____ type.

Question 23 options:

 

a simple data

 

the same

 

an array

 

any

Question 24 

Consider the following statements:


struct supplierType

{
    char name[20];
    int supplierID;

};

struct applianceType

{
    supplierType supplier;
    char modelNo[10];
    double cost;

};

struct applianceType applianceList[25];

Which of the following best describes applianceList?

Question 24 options:

 

It is a multidimensional array.

 

It is a struct.

 

It is an array of structs.

 

It is a struct of arrays.

 

Question 25 

Consider the following statements:

 

struct supplierType

{

    string name;

    int supplierID;

};

 

struct paintType

{

    supplierType supplier;

    string color;

    string paintID;

};

struct paintType paint;

What is the data type of paint.supplier?

Question 25 options:

 

string

 

paintType

 

supplierType

 

struct

 

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9893751
  • Price:- $60

Priced at Now at $60, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As