Local variable

Question57

The ostream member function ___________ is used to perform unformatted output

Write

Question59

Write a single statement that performs the specified task. Assume that floating-point variables number1 and number2 have been declared and that number1 has been initialized to 7.3. Assume that variable ptr is of type char *. Assume that arrays s1 and s2 are each 100-element char arrays that are initialized with string literals. Compare the string in s1 with the string in s2, and print the result.

a. cout << "strcmp(s1, s2) = " << strcmp(s1, s2) << endl;

Question60

What is the index number of the last element of an array with 29 elements?

. 28

Question62

What is the output of the program?

#include <iostream>
using namespace std;
int main() {
int a = 17;
if (a<10) {
cout << "A";
}
if (a%17==0) {
cout << "B";
} else {
cout << "C";
}
cout << endl;
return 0;
}

B

Question64

What value gets printed by the program?

#include <iostream>

int foo(int y);

int foo(int x)

{

return x+1;

}

int main(int argc, char** argv)

{

int x = 3;

int y = 6;

std::cout << foo(x) << std::endl;

return 0;}

Question67

Write single C++ statements that determine whether i is less than or equal to y

. if (i<=y)

Question69

Evaluate!(1 &&!(0 || 1)).

Ответ:

True False

Question70

If I do not want to use return in my function myFunc() what I have to speciafy as return type?

Void

Question72

The modulus operator (%) can be used only with integer operands.

Ответ:

True False

Question73

What statement is used to make decisions:

if

Question74

By default, memory addresses are displayed as long integers

Ответ:

True False

Question75

If a member initializer is not provided for a member object of a class, the object's __________ is called


Понравилась статья? Добавь ее в закладку (CTRL+D) и не забудь поделиться с друзьями:  



double arrow
Сейчас читают про: