Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can you please anwser these C++ questions for me, thank you in advanced. 11) What is the output of the following code fragment if x

Can you please anwser these C++ questions for me, thank you in advanced.

11) What is the output of the following code fragment if x is 15?

if(x < 20)

if(x <10)

cout << "less than 10 ";

else

cout << "large ";

less than 10 nothing large no output, syntax error

What is wrong with the following code fragment?

const int SIZE =5;

float scores[SIZE];

for(int i=0; i<=SIZE;i++)

{

cout << "Enter a score ";

cin >> scores[i];

}

Arrays must be integers Array indexes must be less than the size of the array Should be cin >> scores[0]; Array indexes start at 1 not 0

13 What is wrong with the following code fragment? const int SIZE =5;

float scores[SIZE];

for(int i=0; i<=SIZE;i++)

{

cout << "Enter a score ";

cin >> scores[i];

}

Array indexes must be less than the size of the array Array indexes start at 1 not 0 Arrays must be integers Should be cin >> scores[0];

14) 1. Which of the following is a valid identifier? A. 3com

B. three_com

C. 3_com

D. 3-com

E. dollar$

Argument Parameter Event handler C

15) In order to make a user-defined ADT available that is defined in the file myfile.h, you would #include #include "myfile.h" #include #include myfile.h

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Internals A Deep Dive Into How Distributed Data Systems Work

Authors: Alex Petrov

1st Edition

1492040347, 978-1492040347

More Books

Students also viewed these Databases questions

Question

How can we use language to enhance skill in perceiving?

Answered: 1 week ago