Question
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
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started