Dev - C++ - What type of variable would I use for homeTown?

 
Vista:
sin imagen de perfil

What type of variable would I use for homeTown?

Publicado por Julio (6 intervenciones) el 28/01/2018 05:55:03
What type of variable would I use for..numberStudents?

What type of variable would I use for pi ?


What type of variable would I use for homeTown?


What type of variable would I use for priceApples?

Which of the following takes up the least space in memory?

Question 5 options:

bool value;


char value[256];


char value;


long double value;

Save
Question 6 (1 point) Question 6 Unsaved
Which is equivalent to the following expression?

a = a + b * c++ / 4;
Question 6 options:

A)

a = ((a + b) * (c++)) / 4;


B)

a = a + ((b * (c++)) / 4);


C)

a = a + (b * ((c++) / 4));


D)

a = (a + (b * (c++))) / 4;

Save
Question 7 (1 point) Question 7 Unsaved
What is the value of yards at the end of execution?

{
float feet = 7;
float yards = (1/3) feet;
}
Question 7 options:

A)

2.333


B)

compile error


C)

2.0


D)

0.0

Save
Question 8 (1 point) Question 8 Unsaved
Remember, when working with integers, the computer drops the decimal with every computation.

What is the value of "a" at the end of execution?

int a = (2 + 3) / 3;
Question 8 options:

1.333


1.0


1


2

Save
Question 9 (1 point) Question 9 Unsaved
What is the value of "b" at the end of execution?

int b = 2 / 3 + 1 / 2;
Question 9 options:

0


1


2.0


1.166

Save
Question 10 (1 point) Question 10 Unsaved
What is the value of "c" at the end of execution?

int f = 34;
int c = 5 / 9 * (f - 32);
Question 10 options:

A)

1.1


B)

1.0


C)

0


D)

1

Save
Question 11 (1 point) Question 11 Unsaved
What is the value of "d" at the end of execution?

int d = (float) 1 / 4 * 10;
Question 11 options:

2


3


0


2.5

Save
Question 12 (1 point) Question 12 Unsaved
Write a program to prompt the user for a number of days and display the number of days and weeks.

How many days: 17
weeks: 2
days: 3
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
-2
Responder