Question

#c++ Which of the following types is guaranteed to be strictly largest? A. short B. int...

#c++

Which of the following types is guaranteed to be strictly largest?

A. short

B. int

C. long int

D. long long

E. long long long

F. None of the above.

What is the output from this snippet of code?

int x; 
std::cout << x; 

A. x

B. 0

C. Impossible to say (undefined behavior).

D. Depends on if x was previously assigned to.

0 0
Add a comment Improve this question Transcribed image text
Answer #1


1) D. long long

2) C. Impossible to say (undefined behavior).

Add a comment
Know the answer?
Add Answer to:
#c++ Which of the following types is guaranteed to be strictly largest? A. short B. int...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the following C++code snippet and what is the output of this program? # include<iostream> using...

    Consider the following C++code snippet and what is the output of this program? # include<iostream> using namespace std; void arraySome (int[), int, int); int main () const int arraysize = 10; int a[arraysize]-1,2,3,4,5, 6,7,8,9,10 cout << "The values in the array are:" << endl; arraySome (a, 0, arraySize) cout<< endl; system ("pause") return 0; void arraySome (int b[], int current, int size) if (current< size) arraySome (b, current+1, size); cout << b[current] <<""; a) Print the array values b) Double...

  • 51. What is the output of the following code snippet? int number = 0; int ptr_num...

    51. What is the output of the following code snippet? int number = 0; int ptr_num -&number ptr_num 60; number-80 cout < "ptr num << endl b, 60 c. 80 d. the address of number Answer 52. What is the output of the following code snippet? double num-0.0; double* ptr = &num; num = 15.0; ptr ptr 15.0 cout << num <<"ptr <<endl; a. 15 15 b. 15 30 С. 30 15 d. 30 30 Answer: 53. What is the...

  • QUESTION 1 What is the output of the following code snippet? int main() { bool attendance...

    QUESTION 1 What is the output of the following code snippet? int main() { bool attendance = false; string str = "Unknown"; attendance = !(attendance); if (!attendance) { str = "False"; } if (attendance) { attendance = false; } if (attendance) { str = "True"; } else { str = "Maybe"; } cout << str << endl; return 0; } False True Unknown Maybe QUESTION 2 What is the output of the following code snippet? #include <iostream> #include <string> using...

  • C++ What is the result of the following program? #include <algorithm> int main() {int x =...

    C++ What is the result of the following program? #include <algorithm> int main() {int x = 10; int *y = &x; int *z = new int; z[0] = 20; std::swap (y, z); return x;} (A) Does not compile. (B) Runtime Error or Undefined Behavior (C) Returns 10 (D) Returns 20

  • #include <iostream> #include <climits> Using namespace std; Intmain() { Int I; Int j; Cout << “For...

    #include <iostream> #include <climits> Using namespace std; Intmain() { Int I; Int j; Cout << “For this compiler: “ << endl; Cout << “integers are: “ << sizeof(int) << “bytes” << endl; Cout << “largest integers is “ <<INT_MAX << endl; Cout << “smallest integers is “ <<INT_MIN << endl; Cout << “Input two integers values “ << endl; Cin >> i >> j; Cout << endl << “You entered the following values: “ << endl; Cout << “integer “...

  • C++ ONLY! Consider the following code and answer the questions in the table below. #include <iostream>...

    C++ ONLY! Consider the following code and answer the questions in the table below. #include <iostream> template <typename T, int N=10> class Array { private:   T array[N+1]; public:   Array() {     for(int i=0; i<N+1; i++) array[i] = 0;   }      T& operator [] (int index) {     if (index>N || index < 0)       return array[N];     else       return array[index];   }   template <typename S>   Array<T,N>& operator= (S &other) {     for(int i=0; i<N+1; i++)       array[i] = other[i];         return *this;   } }; template <typename T, typename...

  • (a) Consider the following C++ function: 1 int g(int n) { 2 if (n == 0)...

    (a) Consider the following C++ function: 1 int g(int n) { 2 if (n == 0) return 0; 3 return (n-1 + g(n-1)); 4} (b) Consider the following C++ function: 1 bool Function (const vector <int >& a) { 2 for (int i = 0; i < a. size ()-1; i ++) { 3 for (int j = i +1; j < a. size (); j ++) { 4 if (a[i] == a[j]) return false; 5 6 } 7 return...

  • What is the value of  result after the following code executes?   int a = 60; int b...

    What is the value of  result after the following code executes?   int a = 60; int b = 15; int result = 20; if (a = b) result *= 3; 30 20 60 10 code will not execute The numeric data types in C++ can be broken into two general categories which are integers and floating-point numbers singles and doubles real and unreal numbers numbers and characters numbers and literals Which line in the following program will cause a compiler error?...

  • 61. The following program is accepted by the compiler:         int sum( int x, int y...

    61. The following program is accepted by the compiler:         int sum( int x, int y )         {             int result;             result = x + y;            }                            T__   F__ 62. The following implementation is accepted by the compiler:         void product()         {             int a; int b; int c; int result;             cout << "Enter three integers: ";             cin >> a >> b >> c;             result = a * b * c;            ...

  • c++ question 1. C++ string Class What does the output look like after executing the following...

    c++ question 1. C++ string Class What does the output look like after executing the following statements? std::string numstr = "12"; numstr += "3"; std::cout << numstr << '\n'; A. None of these. B. The snippet has syntax errors. C. 15 D.123 // 2. Let S be a class that allows integers to be stored in its objects like an array. For example, if obj is an object of S, one can write statements like obj[0] = 100; or int...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT