Which of the following best describes appliancelist

Assignment Help Basic Computer Science
Reference no: EM13314439

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

 

 

Reference no: EM13314439

Questions Cloud

Find the speed of the suitcase at the end of the path : The suitcase has a mass of 15kg, and a constant friction of 15N opposes the motion. She starts with an initial speed of 0 and moves the suitcase a distance of 20m. Find the speed of the suitcase at the end of the path.
What is the linear speed of the yo-yo : Yo-Yo man releases a yo-yo from rest and allows it to drop, as he keeps the top end of the string stationary, What is the linear speed, v, of the yo-yo after it has dropped through a height 0.50hm
Find the initial velocity of the bullet before hit the tree : A 9 gram bullet is fired horizontally at a tree and is brought to a halt right before it exits the tree. the tree is 90cm thick and exerts a resistive force of 16000N on the bullet as it travels through the tree
Explain the method for checking for completeness : Describe the method for checking for completeness of precipitation. Briefly explain why precipitates are usually rinsed with distilled water before they are tested further.
Which of the following best describes appliancelist : Which of the following best describes applianceList? Which of the following statements correctly initializes the component length of bigRect?
What is knowledge management : What is knowledge management, and what is a knowledge management system? How does the concept of a community of practice relate to knowledge management?
Find what is the greatest vertical height ball achieves : a ball is thrown with a valocity of 30 m/s at an angle of 40 degrees above the horizontal from the top of a 100m tall building. what is balls velocity when it lands. (neglect air resistance in both cases) DO NOT USE 2D projectile motions, only work ..
Deytermine what is the penetration h for the pile : A pile resists the tension developed by three stay cables for a major for a tent (membrane) structure. Assuming no bending is desired in the pile (no resultant horizontal componenet),
Determine the lift : An experimental airplane is flying northwest from Nashville, at an altitude of 18,000 ft. Determine the lift

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Why method external object able modify attributes of object

n a method that accepts an object as an argument, writing code that accidentally modifies the object. When a reference variable is passed as an argument to a method, the method has access to the object that the variable references.

  Explaining it solutions to enhance workflows

The final method to include IT is not to go "looking for IT solutions" just for sake of using IT. But to have IT at the table to truly think about ways to develop workflows.

  Process for information systems management for organization

Describe the process for Information Systems Management for any organization using clear example.

  Determine characters in the encyclopedia

The text of the Encyclopedia Britannica is about 44 million words. For a sample of about 2000 words, the average word length was 6.1 characters per word. Approximately how many characters are there in the encyclopedia?

  Describe how history shaped today''s networks

Describe how history shaped today's networks. Focus on the network technology involved and its evolution through to its current state.

  Explaining concept of internet-first printing presses-mass

A number of historians explain concept of the internet as parallel to concept of first printing presses - mass communication.

  Write english statement into a logical statement

Why is it important to change an English statement into a logical statement that follows the framework given by pseudo code and mathematical logic? Share examples and any further thoughts.

  Calculates how many km had went a man

Write a program that calculates how many km had went a man and how far he was from the initial point .

  Write a program prompts user to enter the first digits

Need help to write problem displaying ISBN(international standard book numbers). Question as follows:

  What are some of the challenges associated with implementing

What are some of the challenges associated with implementing an EA governance framework?

  What is the value of x given the specified value for y

What is the value of X given the specified value for Y (both X are 8-bit unsigned values): /* which is 10100101 in Binary; a) Y=0xA5; X=Y & 0x0F; b) Y=ox88; X=Y | ox83; C) Y=0x25; X=Y && ~Y;

  Explain size of new working set system designers

Suppose a process changes its locality and size of new working set is too large to be stored into available free memory. What are some options system designers could choose from to handle this situation?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd