Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

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

Under the trade model with external economies of scale is

Under the trade model with external economies of scale, is it possible for a country to be worse off with trade than it would have been without trade? Justify your answer.

You can shuffle a list using randomshufflelstwrite your own

You can shuffle a list using random.shuffle(lst). Write your OWN function without using random.shuffle(lst) to shuffle a list and return the list. Use the following function header: def shuffle(lst): Write a test program ...

A compute the sumnbsps1nbsp 1 2 3 nbsp nbsp 9999 the sum

(a) Compute the sum S1 = 1 + 2 + 3 + . . . + 9999 (the sum of all integers from 1 to 9999). Do not use a program. (b) Compute the sum S2 = 1+3+5+...+9999 (the sum of all odd integers from 1 to 9999). Do not use a program ...

Ssk software has their main office in sylvania ohio and

SSK Software has their main office in Sylvania Ohio and remote locations in Chicago, Toledo, Cleveland and Cincinnati. SSK Software currently has 62 devices connected to the network in Chicago, 30 computers in Toledo, 60 ...

Across the nine cities in multilevel multivariate analysis

Across the nine cities, in multilevel, multivariate analysis, controlling for income inequality (GINI coefficient), percent living in poverty and percent Non-Hispanic Black population, the ZIP code level overall HIV diag ...

A streaming company needs to measure the average time

A streaming company needs to measure the AVERAGE time spread for users who watch video on their platform in a session. Each user has one time spread, which is the difference between her longest session streaming video an ...

Here is a series of address references given as word

Here is a series of address references given as word addresses: 1, 4, 8, 5, 20, 17, 19, 56, 9, 11, 4, 43, 5, 6, 9, 17. Using this references, show the hits and misses and final cache contents for direct-mapped cache with ...

Suppose we have a magnetic disk with the following

Suppose we have a magnetic disk with the following parameters: • Average seek time = 8 ms • Rotation rate = 7200 RPM • Transfer rate = 150 MB/second • Sector size = 512 bytes. What is the average time to read a single se ...

What are information silos what are the problems caused by

What are information silos? What are the problems caused by information silos? How organizations can solve the problems caused by information silos?

Question suppose that a bayesian spam filter is trained on

Question : Suppose that a Bayesian spam filter is trained on a set of 10000 spam messages and 5000 messages that are not spam. The word "opportunity" appears in 175 spam messages and 20 messages that are not spam. Would ...

  • 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